Coding standards

This commit is contained in:
Denis Fomin 2013-08-23 12:23:10 +04:00
parent 919310cac7
commit 3b41ce148f
3 changed files with 7 additions and 13 deletions

View File

@ -833,13 +833,11 @@ class GroupchatControl(ChatControlBase):
request_voice_separator = xml.get_object('request_voice_separator') request_voice_separator = xml.get_object('request_voice_separator')
if gtkgui_helpers.gtk_icon_theme.has_icon('bookmark-new'): if gtkgui_helpers.gtk_icon_theme.has_icon('bookmark-new'):
img = Gtk.Image() gtkgui_helpers.add_image_to_menuitem(bookmark_room_menuitem,
img.set_from_icon_name('bookmark-new', Gtk.IconSize.MENU) 'bookmark-new')
bookmark_room_menuitem.set_image(img)
if gtkgui_helpers.gtk_icon_theme.has_icon('document-open-recent'): if gtkgui_helpers.gtk_icon_theme.has_icon('document-open-recent'):
img = Gtk.Image() gtkgui_helpers.add_image_to_menuitem(history_menuitem,
img.set_from_icon_name('document-open-recent', Gtk.IconSize.MENU) 'document-open-recent'
history_menuitem.set_image(img)
if hide_buttonbar_items: if hide_buttonbar_items:
change_nick_menuitem.hide() change_nick_menuitem.hide()

View File

@ -254,9 +254,7 @@ control=None, gc_contact=None, is_anonymous=True):
account) account)
history_menuitem.connect('activate', roster.on_history, contact, account) history_menuitem.connect('activate', roster.on_history, contact, account)
if gtkgui_helpers.gtk_icon_theme.has_icon('document-open-recent'): if gtkgui_helpers.gtk_icon_theme.has_icon('document-open-recent'):
img = Gtk.Image() gtkgui_helpers.add_image_to_menuitem(history_menuitem, 'bookmark-new')
img.set_from_icon_name('document-open-recent', Gtk.IconSize.MENU)
history_menuitem.set_image(img)
if control: if control:
convert_to_gc_menuitem.connect('activate', convert_to_gc_menuitem.connect('activate',

View File

@ -5243,10 +5243,8 @@ class RosterWindow:
return return
history_menuitem = self.xml.get_object('history_menuitem') history_menuitem = self.xml.get_object('history_menuitem')
if gtkgui_helpers.gtk_icon_theme.has_icon('document-open-recent'): if gtkgui_helpers.gtk_icon_theme.has_icon('document-open-recent'):
history_icon = Gtk.Image() gtkgui_helpers.add_image_to_menuitem(history_menuitem,
history_icon.set_from_icon_name('document-open-recent', 'document-open-recent')
Gtk.IconSize.MENU)
history_menuitem.set_image(history_icon)
new_chat_menuitem = self.xml.get_object('new_chat_menuitem') new_chat_menuitem = self.xml.get_object('new_chat_menuitem')
single_message_menuitem = self.xml.get_object( single_message_menuitem = self.xml.get_object(
'send_single_message_menuitem') 'send_single_message_menuitem')