Bug 101276 - escaping of amphersand (&) in context menus
Summary: escaping of amphersand (&) in context menus
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 1.2.1
Platform: Debian testing Linux
: NOR minor (vote)
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-11 02:10 UTC by Kevin Puetz
Modified: 2006-06-11 12:32 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Puetz 2005-03-11 02:10:14 UTC
Version:           1.2.1 (using KDE KDE 3.3.2)
Installed from:    Debian testing/unstable Packages
OS:                Linux

When strings containing ampersand are displayed in the context menu, the & is not escaped. This means that, instad of a literal &, the next character is treated as an accelerator (and displayed underlined).

This is visible by looking at a group of songs with an amphersand in the album; right clicking on the album column will include the "Write 'album' for selected tracks" choice, but it will show an underline on the next character instead of the ampersand.
Comment 1 Kevin Puetz 2005-03-11 02:10:53 UTC
dropping severity to minor
Comment 2 Roland 2005-03-11 23:27:23 UTC
CVS commit by rolandg: 

escape '&' char in contextmenu entry
CCMAIL: amarok-devel@sf.net
BUGS: 101276


  M +1 -1      playlist.cpp   1.453


--- kdeextragear-1/amarok/src/playlist.cpp  #1.452:1.453
@@ -1838,5 +1838,5 @@ Playlist::showContextMenu( QListViewItem
     popup.insertItem( trackColumn
             ? i18n("&Iteratively Assign Track Numbers")
-            : i18n("Write '%1' For Selected Tracks").arg( KStringHandler::rsqueeze( tag, 30 ) ), FILL_DOWN );
+  : i18n("Write '%1' For Selected Tracks").arg( KStringHandler::rsqueeze( tag, 30 ).replace( "&", "&&" ) ), FILL_DOWN );
     popup.insertItem( SmallIconSet( "editcopy" ), i18n( "&Copy Meta-String" ), 0, 0, CTRL+Key_C, COPY );
 
Comment 3 Alexandre Oliveira 2005-03-12 01:33:16 UTC
With this patch, "&" is set as an accelerator in the situation reported (anyone confirms?). That shouldn't happen, there should be a propper way of escaping that, but it seems && is really the only option.