Change history icon if theme have 'document-open-recent' icon. Fixes #6893

This commit is contained in:
Denis Fomin 2013-03-16 23:56:22 +04:00
parent 120a0200eb
commit 107c98e5a0
3 changed files with 14 additions and 0 deletions

View file

@ -352,6 +352,9 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
contact, acct, resource=resource)
widget = self.xml.get_object('history_button')
if gtkgui_helpers.gtk_icon_theme.has_icon('document-open-recent'):
img = self.xml.get_object('image5')
img.set_from_icon_name('document-open-recent', Gtk.IconSize.MENU)
id_ = widget.connect('clicked', self._on_history_menuitem_activate)
self.handlers[id_] = widget

View file

@ -334,6 +334,9 @@ class GroupchatControl(ChatControlBase):
gajim.connections[self.account].pubsub_publish_options_supported))
widget.show()
if gtkgui_helpers.gtk_icon_theme.has_icon('document-open-recent'):
img = self.xml.get_object('image8')
img.set_from_icon_name('document-open-recent', Gtk.IconSize.MENU)
widget = self.xml.get_object('list_treeview')
id_ = widget.connect('row_expanded', self.on_list_treeview_row_expanded)
self.handlers[id_] = widget
@ -810,6 +813,10 @@ class GroupchatControl(ChatControlBase):
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'):
img = Gtk.Image()
img.set_from_icon_name('document-open-recent', Gtk.IconSize.MENU)
history_menuitem.set_image(img)
if hide_buttonbar_items:
change_nick_menuitem.hide()

View file

@ -253,6 +253,10 @@ control=None, gc_contact=None, is_anonymous=True):
rename_menuitem.connect('activate', roster.on_rename, 'contact', jid,
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)
if control:
convert_to_gc_menuitem.connect('activate',