fix SeparatorMenuItem

This commit is contained in:
Denis Fomin 2013-01-01 19:46:04 +04:00
parent 3ec91452e8
commit 342755d58a
6 changed files with 27 additions and 27 deletions

View File

@ -525,7 +525,7 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
"""
Override the default context menu and add our own menutiems
"""
item = Gtk.SeparatorMenuItem()
item = Gtk.SeparatorMenuItem.new()
menu.prepend(item)
menu2 = self.prepare_context_menu()
@ -573,7 +573,7 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
id_ = item.connect('activate', self.msg_textview.undo)
self.handlers[id_] = item
item = Gtk.SeparatorMenuItem()
item = Gtk.SeparatorMenuItem.new()
menu.prepend(item)
item = Gtk.ImageMenuItem(Gtk.STOCK_CLEAR)
@ -1066,7 +1066,7 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
menuitem[1])
menu.append(item)
item = Gtk.SeparatorMenuItem() # separator
item = Gtk.SeparatorMenuItem.new() # separator
menu.append(item)
item = Gtk.ImageMenuItem(_('Color'))
@ -1081,7 +1081,7 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools):
item.connect('activate', self.on_font_menuitem_activale)
menu.append(item)
item = Gtk.SeparatorMenuItem() # separator
item = Gtk.SeparatorMenuItem.new() # separator
menu.append(item)
item = Gtk.ImageMenuItem(_('Clear formating'))

View File

@ -728,7 +728,7 @@ class ConversationTextview(GObject.GObject):
"""
separator_menuitem_was_added = False
if not self.used_in_history_window:
item = Gtk.SeparatorMenuItem()
item = Gtk.SeparatorMenuItem.new()
menu.prepend(item)
separator_menuitem_was_added = True
@ -739,7 +739,7 @@ class ConversationTextview(GObject.GObject):
if self.selected_phrase:
if not separator_menuitem_was_added:
item = Gtk.SeparatorMenuItem()
item = Gtk.SeparatorMenuItem.new()
menu.prepend(item)
if not self.used_in_history_window:

View File

@ -563,7 +563,7 @@ class GroupchatControl(ChatControlBase):
and the ability to insert a nick
"""
ChatControlBase.on_msg_textview_populate_popup(self, textview, menu)
item = Gtk.SeparatorMenuItem()
item = Gtk.SeparatorMenuItem.new()
menu.prepend(item)
item = Gtk.MenuItem(_('Insert Nickname'))

View File

@ -136,7 +136,7 @@ def build_invite_submenu(invite_menuitem, list_, ignore_rooms=[]):
contacts_transport == gajim.get_transport_name_from_jid(room_jid):
rooms.append((room_jid, acct))
if len(rooms):
item = Gtk.SeparatorMenuItem() # separator
item = Gtk.SeparatorMenuItem.new() # separator
invite_to_submenu.append(item)
for (room_jid, account) in rooms:
menuitem = Gtk.MenuItem(room_jid.split('@')[0])

View File

@ -5470,7 +5470,7 @@ class RosterWindow:
item.set_sensitive(False)
# Manage GC bookmarks
newitem = Gtk.SeparatorMenuItem() # separator
newitem = Gtk.SeparatorMenuItem.new() # separator
gc_sub_menu.append(newitem)
newitem = Gtk.ImageMenuItem(_('_Manage Bookmarks...'))
@ -5579,7 +5579,7 @@ class RosterWindow:
status_menuitem.set_submenu(sub_menu)
for show in ('online', 'chat', 'away', 'xa', 'dnd', 'invisible'):
uf_show = helpers.get_uf_show(show, use_mnemonic=True)
uf_show = helpers.get_uf_show(show, use_mnemonic=False)
item = Gtk.ImageMenuItem(uf_show)
icon = state_images[show]
item.set_image(icon)
@ -5591,7 +5591,7 @@ class RosterWindow:
else:
item.connect('activate', self.change_status, account, show)
item = Gtk.SeparatorMenuItem()
item = Gtk.SeparatorMenuItem.new()
sub_menu.append(item)
item = Gtk.ImageMenuItem(_('_Change Status Message'))
@ -5602,7 +5602,7 @@ class RosterWindow:
if gajim.connections[account].connected < 2:
item.set_sensitive(False)
item = Gtk.SeparatorMenuItem()
item = Gtk.SeparatorMenuItem.new()
sub_menu.append(item)
uf_show = helpers.get_uf_show('offline', use_mnemonic=True)
@ -5633,7 +5633,7 @@ class RosterWindow:
self.on_publish_location_toggled)
pep_config = Gtk.ImageMenuItem(_('Configure Services...'))
item = Gtk.SeparatorMenuItem()
item = Gtk.SeparatorMenuItem.new()
pep_submenu.append(item)
pep_config.set_sensitive(True)
pep_submenu.append(pep_config)
@ -5699,7 +5699,7 @@ class RosterWindow:
sub_menu.append(item)
item.connect('activate', self.change_status, account, show)
item = Gtk.SeparatorMenuItem()
item = Gtk.SeparatorMenuItem.new()
sub_menu.append(item)
item = Gtk.ImageMenuItem(_('_Change Status Message'))
@ -5853,7 +5853,7 @@ class RosterWindow:
send_group_message_item.set_sensitive(False)
if not group in helpers.special_groups:
item = Gtk.SeparatorMenuItem() # separator
item = Gtk.SeparatorMenuItem.new() # separator
menu.append(item)
# Rename
@ -5979,7 +5979,7 @@ class RosterWindow:
gui_menu_builder.build_invite_submenu(invite_item, list_)
menu.append(invite_item)
item = Gtk.SeparatorMenuItem() # separator
item = Gtk.SeparatorMenuItem.new() # separator
menu.append(item)
# Manage Transport submenu
@ -5998,7 +5998,7 @@ class RosterWindow:
manage_contacts_submenu.append(edit_groups_item)
edit_groups_item.connect('activate', self.on_edit_groups, list_)
item = Gtk.SeparatorMenuItem() # separator
item = Gtk.SeparatorMenuItem.new() # separator
manage_contacts_submenu.append(item)
# Block
@ -6090,7 +6090,7 @@ class RosterWindow:
status_menuitems.append(status_menuitem)
menu.append(send_custom_status_menuitem)
item = Gtk.SeparatorMenuItem() # separator
item = Gtk.SeparatorMenuItem.new() # separator
menu.append(item)
# Execute Command
@ -6131,7 +6131,7 @@ class RosterWindow:
if gajim.account_is_disconnected(account):
item.set_sensitive(False)
item = Gtk.SeparatorMenuItem() # separator
item = Gtk.SeparatorMenuItem.new() # separator
manage_transport_submenu.append(item)
# Block
@ -6157,7 +6157,7 @@ class RosterWindow:
if gajim.account_is_disconnected(account):
item.set_sensitive(False)
item = Gtk.SeparatorMenuItem() # separator
item = Gtk.SeparatorMenuItem.new() # separator
menu.append(item)
# Information
@ -6207,7 +6207,7 @@ class RosterWindow:
account)
menu.append(disconnect_menuitem)
item = Gtk.SeparatorMenuItem() # separator
item = Gtk.SeparatorMenuItem.new() # separator
menu.append(item)
history_menuitem = Gtk.ImageMenuItem(_('_History'))
@ -6284,7 +6284,7 @@ class RosterWindow:
"""
Add a seperator and History Manager menuitem BELOW for account menuitems
"""
item = Gtk.SeparatorMenuItem() # separator
item = Gtk.SeparatorMenuItem.new() # separator
menu.append(item)
# History manager
@ -6308,7 +6308,7 @@ class RosterWindow:
# User has at least one bookmark.
if gajim.connections[account].bookmarks:
item = Gtk.SeparatorMenuItem()
item = Gtk.SeparatorMenuItem.new()
gc_sub_menu.append(item)
for bookmark in gajim.connections[account].bookmarks:

View File

@ -235,7 +235,7 @@ class StatusIcon:
sub_menu.append(item)
item.connect('activate', self.on_show_menuitem_activate, show)
item = Gtk.SeparatorMenuItem()
item = Gtk.SeparatorMenuItem.new()
sub_menu.append(item)
item = Gtk.ImageMenuItem(_('_Change Status Message...'))
@ -249,7 +249,7 @@ class StatusIcon:
connected_accounts_with_private_storage = 0
item = Gtk.SeparatorMenuItem()
item = Gtk.SeparatorMenuItem.new()
sub_menu.append(item)
uf_show = helpers.get_uf_show('offline', use_mnemonic = True)
@ -336,7 +336,7 @@ class StatusIcon:
gc_item.set_submenu(gc_menuitem_menu)
gc_sub_menu.show_all()
newitem = Gtk.SeparatorMenuItem() # separator
newitem = Gtk.SeparatorMenuItem.new() # separator
gc_sub_menu.append(newitem)
newitem = Gtk.ImageMenuItem(_('_Manage Bookmarks...'))
img = Gtk.Image.new_from_stock(Gtk.STOCK_PREFERENCES, Gtk.IconSize.MENU)
@ -363,7 +363,7 @@ class StatusIcon:
if os.name == 'nt':
if self.added_hide_menuitem is False:
self.systray_context_menu.prepend(Gtk.SeparatorMenuItem())
self.systray_context_menu.prepend(Gtk.SeparatorMenuItem.new())
item = Gtk.MenuItem(_('Hide this menu'))
self.systray_context_menu.prepend(item)
self.added_hide_menuitem = True