Mercurial > pidgin
diff finch/gntblist.c @ 19171:9f7587b86b0d
propagate from branch 'tmpbranch' (head e6743aa2d424749cd40350df703d079ef61fd5ce)
to branch 'im.pidgin.soc.2007.finchfeat' (head a87f346863ddc48e5705c2c555c7ed842325a9a3)
author | Eric Polino <aluink@pidgin.im> |
---|---|
date | Sun, 22 Jul 2007 01:28:19 +0000 |
parents | 7a5025b8698c 980d6e1b2d21 |
children | 069c036d9b72 |
line wrap: on
line diff
--- a/finch/gntblist.c Thu Jul 19 10:35:11 2007 +0000 +++ b/finch/gntblist.c Sun Jul 22 01:28:19 2007 +0000 @@ -139,7 +139,8 @@ { PurpleBlistNode *node; for (node = ((PurpleBlistNode*)group)->child; node; node = node->next) { - if (PURPLE_BLIST_NODE_IS_CHAT(node)) + if (PURPLE_BLIST_NODE_IS_CHAT(node) && + purple_account_is_connected(((PurpleChat *)node)->account)) return TRUE; else if (is_contact_online((PurpleContact*)node)) return TRUE; @@ -678,7 +679,7 @@ void (*callback)(PurpleBlistNode *, gpointer); callback = (void (*)(PurpleBlistNode *, gpointer))action->callback; if (callback) - callback(action->data, node); + callback(node, action->data); else return; } @@ -758,7 +759,7 @@ } static void -chat_components_edit(PurpleChat *chat, PurpleBlistNode *selected) +chat_components_edit(PurpleBlistNode *selected, PurpleChat *chat) { PurpleRequestFields *fields = purple_request_fields_new(); PurpleRequestFieldGroup *group = purple_request_field_group_new(NULL); @@ -819,19 +820,19 @@ } static void -finch_add_buddy(PurpleGroup *grp, PurpleBlistNode *selected) +finch_add_buddy(PurpleBlistNode *selected, PurpleGroup *grp) { purple_blist_request_add_buddy(NULL, NULL, grp ? grp->name : NULL, NULL); } static void -finch_add_group(PurpleGroup *grp, PurpleBlistNode *selected) +finch_add_group(PurpleBlistNode *selected, PurpleGroup *grp) { purple_blist_request_add_group(); } static void -finch_add_chat(PurpleGroup *grp, PurpleBlistNode *selected) +finch_add_chat(PurpleBlistNode *selected, PurpleGroup *grp) { purple_blist_request_add_chat(NULL, grp, NULL, NULL); } @@ -860,19 +861,19 @@ } static void -finch_blist_get_buddy_info_cb(PurpleBuddy *buddy, PurpleBlistNode *selected) +finch_blist_get_buddy_info_cb(PurpleBlistNode *selected, PurpleBuddy *buddy) { finch_retrieve_user_info(buddy->account->gc, purple_buddy_get_name(buddy)); } static void -finch_blist_menu_send_file_cb(PurpleBuddy *buddy, PurpleBlistNode *selected) +finch_blist_menu_send_file_cb(PurpleBlistNode *selected, PurpleBuddy *buddy) { serv_send_file(buddy->account->gc, buddy->name, NULL); } static void -finch_blist_pounce_node_cb(PurpleBlistNode *node, PurpleBlistNode *selected) +finch_blist_pounce_node_cb(PurpleBlistNode *selected, PurpleBlistNode *node) { PurpleBuddy *b; if (PURPLE_BLIST_NODE_IS_CONTACT(node)) @@ -970,7 +971,7 @@ } static void -finch_blist_rename_node_cb(PurpleBlistNode *node, PurpleBlistNode *selected) +finch_blist_rename_node_cb(PurpleBlistNode *selected, PurpleBlistNode *node) { const char *name = NULL; char *prompt; @@ -1055,7 +1056,7 @@ } static void -finch_blist_remove_node_cb(PurpleBlistNode *node, PurpleBlistNode *selected) +finch_blist_remove_node_cb(PurpleBlistNode *selected, PurpleBlistNode *node) { PurpleAccount *account = NULL; char *primary; @@ -1209,13 +1210,14 @@ ggblist->context = context = gnt_menu_new(GNT_MENU_POPUP); g_signal_connect(G_OBJECT(context), "destroy", G_CALLBACK(context_menu_destroyed), ggblist); + g_signal_connect(G_OBJECT(context), "hide", G_CALLBACK(gnt_widget_destroy), NULL); if (!node) { create_group_menu(GNT_MENU(context), NULL); title = g_strdup(_("Buddy List")); } else if (PURPLE_BLIST_NODE_IS_CONTACT(node)) { - create_buddy_menu(GNT_MENU(context), - purple_contact_get_priority_buddy((PurpleContact*)node)); + ggblist->cnode = (PurpleBlistNode*)purple_contact_get_priority_buddy((PurpleContact*)node); + create_buddy_menu(GNT_MENU(context), (PurpleBuddy*)ggblist->cnode); title = g_strdup(purple_contact_get_alias((PurpleContact*)node)); } else if (PURPLE_BLIST_NODE_IS_BUDDY(node)) { PurpleBuddy *buddy = (PurpleBuddy *)node; @@ -1494,7 +1496,7 @@ } else if (strcmp(text, GNT_KEY_CTRL_O) == 0) { purple_prefs_set_bool(PREF_ROOT "/showoffline", !purple_prefs_get_bool(PREF_ROOT "/showoffline")); - } else if (GNT_TREE(ggblist->tree)->search == NULL) { + } else if (!gnt_tree_is_searching(GNT_TREE(ggblist->tree))) { if (strcmp(text, "t") == 0) { finch_blist_toggle_tag_buddy(gnt_tree_get_selection_data(GNT_TREE(ggblist->tree))); gnt_bindable_perform_action_named(GNT_BINDABLE(ggblist->tree), "move-down");