Adapt transport_menu to the style of the other menus
This commit is contained in:
parent
9f3fe8490b
commit
b41770d1f8
|
@ -2048,6 +2048,7 @@ class RosterWindow:
|
||||||
icon = gtk.image_new_from_stock(gtk.STOCK_NEW, gtk.ICON_SIZE_MENU)
|
icon = gtk.image_new_from_stock(gtk.STOCK_NEW, gtk.ICON_SIZE_MENU)
|
||||||
invite_to_new_room_menuitem.set_image(icon)
|
invite_to_new_room_menuitem.set_image(icon)
|
||||||
contact_transport = gajim.get_transport_name_from_jid(contact.jid)
|
contact_transport = gajim.get_transport_name_from_jid(contact.jid)
|
||||||
|
print gajim.connections[account].muc_jid
|
||||||
t = contact_transport or 'jabber' # transform None in 'jabber'
|
t = contact_transport or 'jabber' # transform None in 'jabber'
|
||||||
if not gajim.connections[account].muc_jid.has_key(t):
|
if not gajim.connections[account].muc_jid.has_key(t):
|
||||||
invite_to_new_room_menuitem.set_sensitive(False)
|
invite_to_new_room_menuitem.set_sensitive(False)
|
||||||
|
@ -2628,6 +2629,7 @@ class RosterWindow:
|
||||||
contact = gajim.contacts.get_contact_with_highest_priority(account, jid)
|
contact = gajim.contacts.get_contact_with_highest_priority(account, jid)
|
||||||
menu = gtk.Menu()
|
menu = gtk.Menu()
|
||||||
|
|
||||||
|
# Log on
|
||||||
item = gtk.ImageMenuItem(_('_Log on'))
|
item = gtk.ImageMenuItem(_('_Log on'))
|
||||||
icon = gtk.image_new_from_stock(gtk.STOCK_YES, gtk.ICON_SIZE_MENU)
|
icon = gtk.image_new_from_stock(gtk.STOCK_YES, gtk.ICON_SIZE_MENU)
|
||||||
item.set_image(icon)
|
item.set_image(icon)
|
||||||
|
@ -2638,6 +2640,7 @@ class RosterWindow:
|
||||||
item.set_sensitive(False)
|
item.set_sensitive(False)
|
||||||
item.connect('activate', self.on_agent_logging, jid, None, account)
|
item.connect('activate', self.on_agent_logging, jid, None, account)
|
||||||
|
|
||||||
|
# Log off
|
||||||
item = gtk.ImageMenuItem(_('Log _off'))
|
item = gtk.ImageMenuItem(_('Log _off'))
|
||||||
icon = gtk.image_new_from_stock(gtk.STOCK_NO, gtk.ICON_SIZE_MENU)
|
icon = gtk.image_new_from_stock(gtk.STOCK_NO, gtk.ICON_SIZE_MENU)
|
||||||
item.set_image(icon)
|
item.set_image(icon)
|
||||||
|
@ -2651,14 +2654,7 @@ class RosterWindow:
|
||||||
item = gtk.SeparatorMenuItem() # separator
|
item = gtk.SeparatorMenuItem() # separator
|
||||||
menu.append(item)
|
menu.append(item)
|
||||||
|
|
||||||
item = gtk.ImageMenuItem(_('_Edit'))
|
# Execute Command
|
||||||
icon = gtk.image_new_from_stock(gtk.STOCK_PREFERENCES, gtk.ICON_SIZE_MENU)
|
|
||||||
item.set_image(icon)
|
|
||||||
menu.append(item)
|
|
||||||
item.connect('activate', self.on_edit_agent, contact, account)
|
|
||||||
if gajim.account_is_disconnected(account):
|
|
||||||
item.set_sensitive(False)
|
|
||||||
|
|
||||||
item = gtk.ImageMenuItem(_('Execute Command...'))
|
item = gtk.ImageMenuItem(_('Execute Command...'))
|
||||||
icon = gtk.image_new_from_stock(gtk.STOCK_EXECUTE, gtk.ICON_SIZE_MENU)
|
icon = gtk.image_new_from_stock(gtk.STOCK_EXECUTE, gtk.ICON_SIZE_MENU)
|
||||||
item.set_image(icon)
|
item.set_image(icon)
|
||||||
|
@ -2668,6 +2664,16 @@ class RosterWindow:
|
||||||
if gajim.account_is_disconnected(account):
|
if gajim.account_is_disconnected(account):
|
||||||
item.set_sensitive(False)
|
item.set_sensitive(False)
|
||||||
|
|
||||||
|
# Edit
|
||||||
|
item = gtk.ImageMenuItem(_('_Edit'))
|
||||||
|
icon = gtk.image_new_from_stock(gtk.STOCK_PREFERENCES, gtk.ICON_SIZE_MENU)
|
||||||
|
item.set_image(icon)
|
||||||
|
menu.append(item)
|
||||||
|
item.connect('activate', self.on_edit_agent, contact, account)
|
||||||
|
if gajim.account_is_disconnected(account):
|
||||||
|
item.set_sensitive(False)
|
||||||
|
|
||||||
|
# Rename
|
||||||
item = gtk.ImageMenuItem(_('_Rename'))
|
item = gtk.ImageMenuItem(_('_Rename'))
|
||||||
# add a special img for rename menuitem
|
# add a special img for rename menuitem
|
||||||
path_to_kbd_input_img = os.path.join(gajim.DATA_DIR, 'pixmaps',
|
path_to_kbd_input_img = os.path.join(gajim.DATA_DIR, 'pixmaps',
|
||||||
|
@ -2680,6 +2686,10 @@ class RosterWindow:
|
||||||
if gajim.account_is_disconnected(account):
|
if gajim.account_is_disconnected(account):
|
||||||
item.set_sensitive(False)
|
item.set_sensitive(False)
|
||||||
|
|
||||||
|
item = gtk.SeparatorMenuItem() # sepator
|
||||||
|
menu.append(item)
|
||||||
|
|
||||||
|
# Remove
|
||||||
item = gtk.ImageMenuItem(_('_Remove from Roster'))
|
item = gtk.ImageMenuItem(_('_Remove from Roster'))
|
||||||
icon = gtk.image_new_from_stock(gtk.STOCK_REMOVE, gtk.ICON_SIZE_MENU)
|
icon = gtk.image_new_from_stock(gtk.STOCK_REMOVE, gtk.ICON_SIZE_MENU)
|
||||||
item.set_image(icon)
|
item.set_image(icon)
|
||||||
|
|
Loading…
Reference in New Issue