changeset 616a1e36b5c8 in /home/hg/repos/gajim
author: Yann Leboulanger asterix@lagaule.org branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=616a1e36b5c8 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 bf2bc1530719 -r 616a1e36b5c8 src/roster_window.py --- a/src/roster_window.py Tue Jan 05 21:09:40 2016 +0100 +++ b/src/roster_window.py Sat Jan 16 14:18:16 2016 +0100 @@ -6158,6 +6158,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.new_with_label(name) item.set_use_underline(False)