# HG changeset patch # User Elliott Sales de Andrade # Date 1318140064 0 # Node ID c9b09afd79e7f7c9128dd4ec59e7dc3ed574dbaa # Parent 1eba1701b355299e4b7652c0b5d61fb7b5088e61 Add the Get Attention action to the PidginWindow menu structure, and correctly initialize its value. diff -r 1eba1701b355 -r c9b09afd79e7 pidgin/gtkconv.c --- a/pidgin/gtkconv.c Sun Oct 09 05:37:17 2011 +0000 +++ b/pidgin/gtkconv.c Sun Oct 09 06:01:04 2011 +0000 @@ -3567,6 +3567,10 @@ gtk_ui_manager_get_action(win->menu.ui, "/Conversation/ConversationMenu/SendFile"); + win->menu.get_attention = + gtk_ui_manager_get_action(win->menu.ui, + "/Conversation/ConversationMenu/GetAttention"); + win->menu.add_pounce = gtk_ui_manager_get_action(win->menu.ui, "/Conversation/ConversationMenu/AddBuddyPounce"); @@ -6925,7 +6929,7 @@ /* Deal with menu items */ gtk_action_set_visible(win->menu.view_log, TRUE); gtk_action_set_visible(win->menu.send_file, TRUE); - gtk_action_set_visible(g_object_get_data(G_OBJECT(win->window), "get_attention"), TRUE); + gtk_action_set_visible(win->menu.get_attention, TRUE); gtk_action_set_visible(win->menu.add_pounce, TRUE); gtk_action_set_visible(win->menu.get_info, TRUE); gtk_action_set_visible(win->menu.invite, FALSE); @@ -6954,7 +6958,7 @@ /* Deal with menu items */ gtk_action_set_visible(win->menu.view_log, TRUE); gtk_action_set_visible(win->menu.send_file, FALSE); - gtk_action_set_visible(g_object_get_data(G_OBJECT(win->window), "get_attention"), FALSE); + gtk_action_set_visible(win->menu.get_attention, FALSE); gtk_action_set_visible(win->menu.add_pounce, FALSE); gtk_action_set_visible(win->menu.get_info, FALSE); gtk_action_set_visible(win->menu.invite, TRUE); @@ -7036,7 +7040,7 @@ gtk_action_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_action_set_sensitive(g_object_get_data(G_OBJECT(win->window), "get_attention"), (prpl_info->send_attention != NULL)); + gtk_action_set_sensitive(win->menu.get_attention, (prpl_info->send_attention != NULL)); gtk_action_set_sensitive(win->menu.alias, (account != NULL) && (purple_find_buddy(account, purple_conversation_get_name(conv)) != NULL)); @@ -7057,8 +7061,7 @@ /* Then deal with menu items */ gtk_action_set_sensitive(win->menu.view_log, TRUE); gtk_action_set_sensitive(win->menu.send_file, FALSE); - gtk_action_set_sensitive(g_object_get_data(G_OBJECT(win->window), - "get_attention"), FALSE); + gtk_action_set_sensitive(win->menu.get_attention, FALSE); gtk_action_set_sensitive(win->menu.add_pounce, TRUE); gtk_action_set_sensitive(win->menu.get_info, FALSE); gtk_action_set_sensitive(win->menu.invite, FALSE); diff -r 1eba1701b355 -r c9b09afd79e7 pidgin/gtkconvwin.h --- a/pidgin/gtkconvwin.h Sun Oct 09 05:37:17 2011 +0000 +++ b/pidgin/gtkconvwin.h Sun Oct 09 06:01:04 2011 +0000 @@ -51,6 +51,7 @@ GtkAction *view_log; GtkAction *send_file; + GtkAction *get_attention; GtkAction *add_pounce; GtkAction *get_info; GtkAction *invite;