show first part of the JID in actions -> join group chat menu when there is no name.

This commit is contained in:
Yann Leboulanger 2014-08-11 22:10:23 +02:00
parent 735b2a6935
commit 48eac87cea
1 changed files with 6 additions and 1 deletions

View File

@ -6108,8 +6108,13 @@ class RosterWindow:
gc_sub_menu.append(item)
for bookmark in gajim.connections[account].bookmarks:
name = bookmark['name']
if bookmark['name'] == '':
# No name was given for this bookmark.
# Use the first part of JID instead...
name = bookmark['jid'].split("@")[0]
# Do not use underline.
item = Gtk.MenuItem.new_with_label(bookmark['name'])
item = Gtk.MenuItem.new_with_label(name)
item.set_use_underline(False)
item.connect('activate', self.on_bookmark_menuitem_activate,
account, bookmark)