show first part of the JID in actions -> join group chat menu when there is no name.
This commit is contained in:
parent
735b2a6935
commit
48eac87cea
1 changed files with 6 additions and 1 deletions
|
@ -6108,8 +6108,13 @@ class RosterWindow:
|
||||||
gc_sub_menu.append(item)
|
gc_sub_menu.append(item)
|
||||||
|
|
||||||
for bookmark in gajim.connections[account].bookmarks:
|
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.
|
# 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.set_use_underline(False)
|
||||||
item.connect('activate', self.on_bookmark_menuitem_activate,
|
item.connect('activate', self.on_bookmark_menuitem_activate,
|
||||||
account, bookmark)
|
account, bookmark)
|
||||||
|
|
Loading…
Add table
Reference in a new issue