Enlightenment CVS committal Author : devilhorns Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_int_menus.c Log Message: Fetch the border name(s) once and reuse them. =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_int_menus.c,v retrieving revision 1.197 retrieving revision 1.198 diff -u -3 -r1.197 -r1.198 --- e_int_menus.c 21 Feb 2007 00:05:27 -0000 1.197 +++ e_int_menus.c 21 Feb 2007 01:03:37 -0000 1.198 @@ -922,8 +922,14 @@ bd1 = d1; bd2 = d2; - if (strcmp((const char*)bd1->client.icccm.class, (const char*)bd2->client.icccm.class) > 0) return 1; - if (strcmp((const char*)bd1->client.icccm.class, (const char*)bd2->client.icccm.class) < 0) return -1; + if (strcmp((const char*)bd1->client.icccm.class, + (const char*)bd2->client.icccm.class) > 0) + return 1; + + if (strcmp((const char*)bd1->client.icccm.class, + (const char*)bd2->client.icccm.class) < 0) + return -1; + return -1; /* Returning '-1' on equal is intentional */ } @@ -932,15 +938,19 @@ { E_Border *bd1; E_Border *bd2; - + const char *name1; + const char *name2; + if (!d1) return 1; if (!d2) return -1; bd1 = d1; bd2 = d2; - - if (strcasecmp(e_border_name_get(bd1), e_border_name_get(bd2)) > 0) return 1; - if (strcasecmp(e_border_name_get(bd1), e_border_name_get(bd2)) < 0) return -1; + name1 = e_border_name_get(bd1); + name2 = e_border_name_get(bd2); + + if (strcasecmp(name1, name2) > 0) return 1; + if (strcasecmp(name1, name2) < 0) return -1; return 0; } @@ -957,7 +967,8 @@ { E_Border *bd; bd = l->data; - if ( strcmp(class, bd->client.icccm.class) != 0 && e_config->clientlist_separate_with != E_CLIENTLIST_GROUP_SEP_NONE) + if (strcmp(class, bd->client.icccm.class) != 0 && + e_config->clientlist_separate_with != E_CLIENTLIST_GROUP_SEP_NONE) { if (e_config->clientlist_separate_with == E_CLIENTLIST_GROUP_SEP_MENU) { @@ -980,7 +991,8 @@ else _e_int_menus_clients_item_create(bd, m); } - if (e_config->clientlist_separate_with == E_CLIENTLIST_GROUP_SEP_MENU && subm && mi) + if ((e_config->clientlist_separate_with == E_CLIENTLIST_GROUP_SEP_MENU) + && subm && mi) e_menu_item_submenu_set(mi, subm); } @@ -1002,7 +1014,7 @@ { if (!bd->iconic || (bd->iconic && e_config->clientlist_separate_iconified_apps == E_CLIENTLIST_GROUPICONS_OWNER)) - { + { alt = evas_list_append(alt, bd); continue; } @@ -1025,7 +1037,8 @@ E_Border *bd; bd = l->data; - if ( bd->desk != desk && e_config->clientlist_separate_with != E_CLIENTLIST_GROUP_SEP_NONE) + if (bd->desk != desk && + e_config->clientlist_separate_with != E_CLIENTLIST_GROUP_SEP_NONE) { if (e_config->clientlist_separate_with == E_CLIENTLIST_GROUP_SEP_MENU) { @@ -1036,7 +1049,7 @@ e_util_menu_item_edje_icon_set(mi, "enlightenment/desktops"); subm = e_menu_new(); } - else + else { mi = e_menu_item_new(m); e_menu_item_separator_set(mi, 1); @@ -1048,7 +1061,8 @@ else _e_int_menus_clients_item_create(bd, m); } - if (e_config->clientlist_separate_with == E_CLIENTLIST_GROUP_SEP_MENU && subm && mi) + if (e_config->clientlist_separate_with == E_CLIENTLIST_GROUP_SEP_MENU + && subm && mi) e_menu_item_submenu_set(mi, subm); } } ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs