Coding standards

This commit is contained in:
Denis Fomin 2013-08-23 12:23:10 +04:00
parent 4dcfba32b1
commit 3e5c7b184d
3 changed files with 9 additions and 15 deletions

View File

@ -348,8 +348,8 @@ class GroupchatControl(ChatControlBase):
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.ICON_SIZE_MENU)
img = self.xml.get_object('image8')
img.set_from_icon_name('document-open-recent', gtk.ICON_SIZE_MENU)
widget = self.xml.get_object('list_treeview')
id_ = widget.connect('row_expanded', self.on_list_treeview_row_expanded)
self.handlers[id_] = widget
@ -823,13 +823,11 @@ class GroupchatControl(ChatControlBase):
request_voice_separator = xml.get_object('request_voice_separator')
if gtkgui_helpers.gtk_icon_theme.has_icon('bookmark-new'):
img = gtk.Image()
img.set_from_icon_name('bookmark-new', gtk.ICON_SIZE_MENU)
bookmark_room_menuitem.set_image(img)
gtkgui_helpers.add_image_to_menuitem(bookmark_room_menuitem,
'bookmark-new')
if gtkgui_helpers.gtk_icon_theme.has_icon('document-open-recent'):
img = gtk.Image()
img.set_from_icon_name('document-open-recent', gtk.ICON_SIZE_MENU)
history_menuitem.set_image(img)
gtkgui_helpers.add_image_to_menuitem(history_menuitem,
'document-open-recent')
if hide_buttonbar_items:
change_nick_menuitem.hide()

View File

@ -253,9 +253,7 @@ 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'):
img = gtk.Image()
img.set_from_icon_name('document-open-recent', gtk.ICON_SIZE_MENU)
history_menuitem.set_image(img)
gtkgui_helpers.add_image_to_menuitem(history_menuitem, 'bookmark-new')
if control:
convert_to_gc_menuitem.connect('activate',

View File

@ -5221,10 +5221,8 @@ class RosterWindow:
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.ICON_SIZE_MENU)
history_menuitem.set_image(history_icon)
gtkgui_helpers.add_image_to_menuitem(history_menuitem,
'document-open-recent')
new_chat_menuitem = self.xml.get_object('new_chat_menuitem')
single_message_menuitem = self.xml.get_object(
'send_single_message_menuitem')