From d81f296e4c6e11bc5ccd4e60790b2b767066dfc6 Mon Sep 17 00:00:00 2001 From: Denis Fomin Date: Wed, 4 Sep 2013 18:01:57 +0400 Subject: [PATCH] Fix 'document-open-recent' icon problem. Fixes #7444 --- src/groupchat_control.py | 10 ++++++---- src/gui_menu_builder.py | 5 +++-- src/roster_window.py | 6 ++++-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/groupchat_control.py b/src/groupchat_control.py index 61befc52c..2536f5d27 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -833,11 +833,13 @@ class GroupchatControl(ChatControlBase): request_voice_separator = xml.get_object('request_voice_separator') if gtkgui_helpers.gtk_icon_theme.has_icon('bookmark-new'): - gtkgui_helpers.add_image_to_menuitem(bookmark_room_menuitem, - 'bookmark-new') + img = gtk.Image() + img.set_from_icon_name('bookmark-new', gtk.ICON_SIZE_MENU) + bookmark_room_menuitem.set_image(img) if gtkgui_helpers.gtk_icon_theme.has_icon('document-open-recent'): - gtkgui_helpers.add_image_to_menuitem(history_menuitem, - 'document-open-recent') + img = gtk.Image() + img.set_from_icon_name('document-open-recent', gtk.ICON_SIZE_MENU) + history_menuitem.set_image(img) if hide_buttonbar_items: change_nick_menuitem.hide() diff --git a/src/gui_menu_builder.py b/src/gui_menu_builder.py index e4a52ec99..04084bd71 100644 --- a/src/gui_menu_builder.py +++ b/src/gui_menu_builder.py @@ -257,8 +257,9 @@ control=None, gc_contact=None, is_anonymous=True): account) history_menuitem.connect('activate', roster.on_history, contact, account) if gtkgui_helpers.gtk_icon_theme.has_icon('document-open-recent'): - gtkgui_helpers.add_image_to_menuitem(history_menuitem, - 'document-open-recent') + img = gtk.Image() + img.set_from_icon_name('document-open-recent', gtk.ICON_SIZE_MENU) + history_menuitem.set_image(img) if control: convert_to_gc_menuitem.connect('activate', diff --git a/src/roster_window.py b/src/roster_window.py index 87e4d694e..a9cd902e1 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -4347,6 +4347,7 @@ class RosterWindow: w.set_sensitive(True) def on_view_menu_activate(self, widget): + self.make_menu() # Hide the show roster menu if we are not in the right windowing mode. if self.hpaned.get_child2() is not None: self.xml.get_object('show_roster_menuitem').show() @@ -5241,8 +5242,9 @@ class RosterWindow: return history_menuitem = self.xml.get_object('history_menuitem') if gtkgui_helpers.gtk_icon_theme.has_icon('document-open-recent'): - gtkgui_helpers.add_image_to_menuitem(history_menuitem, - 'document-open-recent') + img = gtk.Image() + img.set_from_icon_name('document-open-recent', gtk.ICON_SIZE_MENU) + history_menuitem.set_image(img) new_chat_menuitem = self.xml.get_object('new_chat_menuitem') single_message_menuitem = self.xml.get_object( 'send_single_message_menuitem')