diff --git a/src/groupchat_control.py b/src/groupchat_control.py index 981ef5fbc..acc8c5569 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -833,13 +833,11 @@ class GroupchatControl(ChatControlBase): request_voice_separator = xml.get_object('request_voice_separator') if gtkgui_helpers.gtk_icon_theme.has_icon('bookmark-new'): - img = Gtk.Image() - img.set_from_icon_name('bookmark-new', Gtk.IconSize.MENU) - bookmark_room_menuitem.set_image(img) + gtkgui_helpers.add_image_to_menuitem(bookmark_room_menuitem, + 'bookmark-new') if gtkgui_helpers.gtk_icon_theme.has_icon('document-open-recent'): - img = Gtk.Image() - img.set_from_icon_name('document-open-recent', Gtk.IconSize.MENU) - history_menuitem.set_image(img) + gtkgui_helpers.add_image_to_menuitem(history_menuitem, + 'document-open-recent' if hide_buttonbar_items: change_nick_menuitem.hide() diff --git a/src/gui_menu_builder.py b/src/gui_menu_builder.py index 7813b3c5e..65867943b 100644 --- a/src/gui_menu_builder.py +++ b/src/gui_menu_builder.py @@ -254,9 +254,7 @@ 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'): - img = Gtk.Image() - img.set_from_icon_name('document-open-recent', Gtk.IconSize.MENU) - history_menuitem.set_image(img) + gtkgui_helpers.add_image_to_menuitem(history_menuitem, 'bookmark-new') if control: convert_to_gc_menuitem.connect('activate', diff --git a/src/roster_window.py b/src/roster_window.py index 80c5e3daf..0926e94c5 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -5243,10 +5243,8 @@ class RosterWindow: return history_menuitem = self.xml.get_object('history_menuitem') if gtkgui_helpers.gtk_icon_theme.has_icon('document-open-recent'): - history_icon = Gtk.Image() - history_icon.set_from_icon_name('document-open-recent', - Gtk.IconSize.MENU) - history_menuitem.set_image(history_icon) + gtkgui_helpers.add_image_to_menuitem(history_menuitem, + 'document-open-recent') new_chat_menuitem = self.xml.get_object('new_chat_menuitem') single_message_menuitem = self.xml.get_object( 'send_single_message_menuitem')