Bug 146583 - switching "limit size of tab labels" adds & ampersand to tab labels
Summary: switching "limit size of tab labels" adds & ampersand to tab labels
Status: RESOLVED NOT A BUG
Alias: None
Product: konversation
Classification: Applications
Component: general (show other bugs)
Version: 1.0.1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konversation Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-09 14:04 UTC by Lars DIECKOW
Modified: 2008-05-05 10:10 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
screenshot of afflicted label (2.92 KB, image/png)
2007-06-09 14:06 UTC, Lars DIECKOW
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars DIECKOW 2007-06-09 14:04:16 UTC
Version:           1.0.1 (using KDE 3.5.7 "release 10.1" , openSUSE )
Compiler:          Target: i586-suse-linux
OS:                Linux (i686) release 2.6.18.2-34-default

To reproduce:
1. Turn on the option "Limit the size of the tab labels to fit all on screen."
2. Open 17 tabs. Konversation automatically assigns accelerators to tab labels, showing them as underlined characters. Konversation truncates tab labels with ellipses. After opening so many tabs, only the first two characters of a label are still visible.
3. Turn off the option "Limit the size of the tab labels to fit all on screen."
4. Turn on the option "Limit the size of the tab labels to fit all on screen."

The bug: Tab labels that have their accelerator hidden by the truncation now have an ampersand added. Tab labels that have their accelerator in the first two characters, thus not hidden, are not affected. Repeat step 3 and 4 to make the problem worse. You quickly end up with a ridiculous amount of & in the labels.

In fixing this bug, be careful not to cause regressions of bug 127510 and bug 133612.
Comment 1 Lars DIECKOW 2007-06-09 14:06:44 UTC
Created attachment 20817 [details]
screenshot of afflicted label

The bug exhibits in both the tab labels proper and their tooltips.
Comment 2 Eike Hein 2008-05-05 10:10:00 UTC
This bug would need to be in kdelibs or Qt, in the tab widget. The only tab names we end up touching when resetting the tab widget options are those of status tabs to resync the configured network names to the UI, and in that case we don't come in contact with the accelerators. I.e. the tab widget (which is in kdelibs and Qt) manages to screw up the names all of its own. 

Presumably because it isn't aware of the possibility of the strings containing accelerators. The only other app I can find in a quick search that uses the automatic accelerator manager to put keyboard accels on tabs is Kopete, and Kopete doesn't have the option to toggle setAutomaticResizeTabs(), so it isn't exposed there. 

We could hack around this problem by setting the names anew after changing the option, but I don't want to do that.

In a quick test this problem seems to be resolved in the KDE 4 tab widget, so reassigning this to kdelibs probably isn't worth it either, since it's unlikely someone will fix it in KDE 3.