Mercurial > pidgin
changeset 32326:4f445c48581a
Add the get_attention widget to the PidginWindow structure, instead of
an added GObject data of the window.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Mon, 24 Oct 2011 01:15:48 +0000 |
parents | 9bbbd4a7dcea |
children | fb2458f2326b |
files | pidgin/gtkconv.c pidgin/gtkconvwin.h |
diffstat | 2 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkconv.c Sun Oct 23 23:50:19 2011 +0000 +++ b/pidgin/gtkconv.c Mon Oct 24 01:15:48 2011 +0000 @@ -3534,9 +3534,10 @@ gtk_item_factory_get_widget(win->menu.item_factory, N_("/Conversation/Send File...")); - g_object_set_data(G_OBJECT(win->window), "get_attention", + win->menu.get_attention = gtk_item_factory_get_widget(win->menu.item_factory, - N_("/Conversation/Get Attention"))); + N_("/Conversation/Get Attention")); + win->menu.add_pounce = gtk_item_factory_get_widget(win->menu.item_factory, N_("/Conversation/Add Buddy Pounce...")); @@ -6884,7 +6885,7 @@ /* Deal with menu items */ gtk_widget_show(win->menu.view_log); gtk_widget_show(win->menu.send_file); - gtk_widget_show(g_object_get_data(G_OBJECT(win->window), "get_attention")); + gtk_widget_show(win->menu.get_attention); gtk_widget_show(win->menu.add_pounce); gtk_widget_show(win->menu.get_info); gtk_widget_hide(win->menu.invite); @@ -6913,7 +6914,7 @@ /* Deal with menu items */ gtk_widget_show(win->menu.view_log); gtk_widget_hide(win->menu.send_file); - gtk_widget_hide(g_object_get_data(G_OBJECT(win->window), "get_attention")); + gtk_widget_hide(win->menu.get_attention); gtk_widget_hide(win->menu.add_pounce); gtk_widget_hide(win->menu.get_info); gtk_widget_show(win->menu.invite); @@ -6995,7 +6996,7 @@ gtk_widget_set_sensitive(win->menu.send_file, (prpl_info->send_file != NULL && (!prpl_info->can_receive_file || prpl_info->can_receive_file(gc, purple_conversation_get_name(conv))))); - gtk_widget_set_sensitive(g_object_get_data(G_OBJECT(win->window), "get_attention"), (prpl_info->send_attention != NULL)); + gtk_widget_set_sensitive(win->menu.get_attention, (prpl_info->send_attention != NULL)); gtk_widget_set_sensitive(win->menu.alias, (account != NULL) && (purple_find_buddy(account, purple_conversation_get_name(conv)) != NULL)); @@ -7016,8 +7017,7 @@ /* Then deal with menu items */ gtk_widget_set_sensitive(win->menu.view_log, TRUE); gtk_widget_set_sensitive(win->menu.send_file, FALSE); - gtk_widget_set_sensitive(g_object_get_data(G_OBJECT(win->window), - "get_attention"), FALSE); + gtk_widget_set_sensitive(win->menu.get_attention, FALSE); gtk_widget_set_sensitive(win->menu.add_pounce, TRUE); gtk_widget_set_sensitive(win->menu.get_info, FALSE); gtk_widget_set_sensitive(win->menu.invite, FALSE);