changeset 5ca3426c7dce in /home/hg/repos/gajim
author: Yann Leboulanger asterix@lagaule.org branches: gajim_0.16 details:http://hg.gajim.org/gajim?cmd=changeset;node=5ca3426c7dce description: [Bahtiar `kalkin-` Gadimov] Shorten name of a gc entry in "Join GC" submenu
Some XMPP clients save the subject of a group chat as the bookmark name. The subject can be very long thus the MenuItems can get also very long. This simple patch shortens the name to a carefully chosen value. Fixes #8218
diffstat:
src/roster_window.py | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diffs (14 lines):
diff -r f32fb7e1628c -r 5ca3426c7dce src/roster_window.py --- a/src/roster_window.py Tue Jan 05 20:53:54 2016 +0100 +++ b/src/roster_window.py Sat Jan 16 14:18:16 2016 +0100 @@ -6216,6 +6216,10 @@ # No name was given for this bookmark. # Use the first part of JID instead... name = bookmark['jid'].split("@")[0] + + # Shorten long names + name = (name[:42] + '..') if len(name) > 42 else name + # Do not use underline. item = gtk.MenuItem(name, False) item.connect('activate', self.on_bookmark_menuitem_activate,