Mercurial > pidgin
changeset 18565:980d6e1b2d21
Fix a crash Eric found. These parameters were in reverse order.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Fri, 20 Jul 2007 21:41:05 +0000 |
parents | 36257cac2b11 |
children | 3c634117a7ef |
files | finch/gntblist.c finch/libgnt/gntwidget.c |
diffstat | 2 files changed, 18 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/finch/gntblist.c Thu Jul 19 21:34:35 2007 +0000 +++ b/finch/gntblist.c Fri Jul 20 21:41:05 2007 +0000 @@ -759,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); @@ -820,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); } @@ -861,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)) @@ -971,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; @@ -1056,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; @@ -1210,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;
--- a/finch/libgnt/gntwidget.c Thu Jul 19 21:34:35 2007 +0000 +++ b/finch/libgnt/gntwidget.c Fri Jul 20 21:41:05 2007 +0000 @@ -74,15 +74,7 @@ gnt_widget_dispose(GObject *obj) { GntWidget *self = GNT_WIDGET(obj); - - if(!(GNT_WIDGET_FLAGS(self) & GNT_WIDGET_DESTROYING)) { - GNT_WIDGET_SET_FLAGS(self, GNT_WIDGET_DESTROYING); - - g_signal_emit(self, signals[SIG_DESTROY], 0); - - GNT_WIDGET_UNSET_FLAGS(self, GNT_WIDGET_DESTROYING); - } - + g_signal_emit(self, signals[SIG_DESTROY], 0); parent_class->dispose(obj); GNTDEBUG; } @@ -320,10 +312,12 @@ { g_return_if_fail(GNT_IS_WIDGET(obj)); - gnt_widget_hide(obj); - delwin(obj->window); - if(!(GNT_WIDGET_FLAGS(obj) & GNT_WIDGET_DESTROYING)) + if(!(GNT_WIDGET_FLAGS(obj) & GNT_WIDGET_DESTROYING)) { + GNT_WIDGET_SET_FLAGS(obj, GNT_WIDGET_DESTROYING); + gnt_widget_hide(obj); + delwin(obj->window); g_object_run_dispose(G_OBJECT(obj)); + } GNTDEBUG; }