comparison finch/gntblist.c @ 20473:49baf4a0ae39

explicit merge of '9a7160daa1babd3ca644d25e4314310e3f24077e' and '691c4b8c8733c44a3a80e96a60b2f6963abf3fa7'
author Ka-Hing Cheung <khc@hxbc.us>
date Sat, 21 Jul 2007 23:56:16 +0000
parents fad459189cc5
children 980d6e1b2d21
comparison
equal deleted inserted replaced
20462:3537f82db107 20473:49baf4a0ae39
137 static gboolean 137 static gboolean
138 is_group_online(PurpleGroup *group) 138 is_group_online(PurpleGroup *group)
139 { 139 {
140 PurpleBlistNode *node; 140 PurpleBlistNode *node;
141 for (node = ((PurpleBlistNode*)group)->child; node; node = node->next) { 141 for (node = ((PurpleBlistNode*)group)->child; node; node = node->next) {
142 if (PURPLE_BLIST_NODE_IS_CHAT(node)) 142 if (PURPLE_BLIST_NODE_IS_CHAT(node) &&
143 purple_account_is_connected(((PurpleChat *)node)->account))
143 return TRUE; 144 return TRUE;
144 else if (is_contact_online((PurpleContact*)node)) 145 else if (is_contact_online((PurpleContact*)node))
145 return TRUE; 146 return TRUE;
146 } 147 }
147 return FALSE; 148 return FALSE;
676 PurpleBlistNode *node = ggblist->cnode; 677 PurpleBlistNode *node = ggblist->cnode;
677 if (action) { 678 if (action) {
678 void (*callback)(PurpleBlistNode *, gpointer); 679 void (*callback)(PurpleBlistNode *, gpointer);
679 callback = (void (*)(PurpleBlistNode *, gpointer))action->callback; 680 callback = (void (*)(PurpleBlistNode *, gpointer))action->callback;
680 if (callback) 681 if (callback)
681 callback(action->data, node); 682 callback(node, action->data);
682 else 683 else
683 return; 684 return;
684 } 685 }
685 } 686 }
686 687
1492 /* Escape was pressed */ 1493 /* Escape was pressed */
1493 remove_peripherals(ggblist); 1494 remove_peripherals(ggblist);
1494 } else if (strcmp(text, GNT_KEY_CTRL_O) == 0) { 1495 } else if (strcmp(text, GNT_KEY_CTRL_O) == 0) {
1495 purple_prefs_set_bool(PREF_ROOT "/showoffline", 1496 purple_prefs_set_bool(PREF_ROOT "/showoffline",
1496 !purple_prefs_get_bool(PREF_ROOT "/showoffline")); 1497 !purple_prefs_get_bool(PREF_ROOT "/showoffline"));
1497 } else if (GNT_TREE(ggblist->tree)->search == NULL) { 1498 } else if (!gnt_tree_is_searching(GNT_TREE(ggblist->tree))) {
1498 if (strcmp(text, "t") == 0) { 1499 if (strcmp(text, "t") == 0) {
1499 finch_blist_toggle_tag_buddy(gnt_tree_get_selection_data(GNT_TREE(ggblist->tree))); 1500 finch_blist_toggle_tag_buddy(gnt_tree_get_selection_data(GNT_TREE(ggblist->tree)));
1500 gnt_bindable_perform_action_named(GNT_BINDABLE(ggblist->tree), "move-down"); 1501 gnt_bindable_perform_action_named(GNT_BINDABLE(ggblist->tree), "move-down");
1501 } else if (strcmp(text, "a") == 0) { 1502 } else if (strcmp(text, "a") == 0) {
1502 finch_blist_place_tagged(gnt_tree_get_selection_data(GNT_TREE(ggblist->tree))); 1503 finch_blist_place_tagged(gnt_tree_get_selection_data(GNT_TREE(ggblist->tree)));