From 0c6588e31d8e19ee200169f6059827f7b3881d54 Mon Sep 17 00:00:00 2001
From: Denis Fomin <fominde@gmail.com>
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 69af7ebf50..2cf6aa1cd1 100644
--- a/src/groupchat_control.py
+++ b/src/groupchat_control.py
@@ -823,11 +823,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 caf2a03f26..07d5548364 100644
--- a/src/gui_menu_builder.py
+++ b/src/gui_menu_builder.py
@@ -254,8 +254,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 8b8adda5da..f7131f3af4 100644
--- a/src/roster_window.py
+++ b/src/roster_window.py
@@ -4331,6 +4331,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()
@@ -5219,8 +5220,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')
-- 
GitLab