Change history icon if theme have 'document-open-recent' icon

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

View File

@ -353,6 +353,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

@ -340,6 +340,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
@ -820,6 +823,10 @@ class GroupchatControl(ChatControlBase):
img = Gtk.Image()
img.set_from_icon_name('bookmark-new', Gtk.IconSize.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

@ -254,6 +254,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',