changeset 722fd632fd42 in /home/hg/repos/gajim
branches: gtk3 details:http://hg.gajim.org/gajim?cmd=changeset;node=722fd632fd42 description: Change history icon if theme have 'document-open-recent' icon. Fixes #6893
diffstat:
src/roster_window.py | 23 +++++++++++++++++++---- 1 files changed, 19 insertions(+), 4 deletions(-)
diffs (47 lines):
diff -r b5cca6321af8 -r 722fd632fd42 src/roster_window.py --- a/src/roster_window.py Tue Aug 20 14:08:54 2013 +0400 +++ b/src/roster_window.py Fri Aug 23 11:26:48 2013 +0400 @@ -5241,6 +5241,12 @@ """ if not force and not self.actions_menu_needs_rebuild: 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) new_chat_menuitem = self.xml.get_object('new_chat_menuitem') single_message_menuitem = self.xml.get_object( 'send_single_message_menuitem') @@ -6173,8 +6179,13 @@ menu.append(item)
history_menuitem = Gtk.ImageMenuItem.new_with_mnemonic(_('_History')) - history_icon = Gtk.Image.new_from_stock(Gtk.STOCK_JUSTIFY_FILL, \ - Gtk.IconSize.MENU) + 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) + else: + history_icon = Gtk.Image.new_from_stock(Gtk.STOCK_JUSTIFY_FILL, \ + Gtk.IconSize.MENU) 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) @@ -6254,8 +6265,12 @@
# History manager item = Gtk.ImageMenuItem.new_with_mnemonic(_('History Manager')) - icon = Gtk.Image.new_from_stock(Gtk.STOCK_JUSTIFY_FILL, - Gtk.IconSize.MENU) + if gtkgui_helpers.gtk_icon_theme.has_icon('document-open-recent'): + icon = Gtk.Image() + icon.set_from_icon_name('document-open-recent', Gtk.IconSize.MENU) + else: + icon = Gtk.Image.new_from_stock(Gtk.STOCK_JUSTIFY_FILL, + Gtk.IconSize.MENU) item.set_image(icon) menu.append(item) item.connect('activate', self.on_history_manager_menuitem_activate)