From 21f19dd60425a8cdb17327a093c919ec31a781a0 Mon Sep 17 00:00:00 2001 From: Gioele Barabucci Date: Wed, 29 May 2002 21:31:32 +0000 Subject: [PATCH] avoid "&" becoming "_" in desk_popup svn path=/trunk/kdebase/kwin/; revision=158508 --- workspace.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/workspace.cpp b/workspace.cpp index f33085af12..29b77ca450 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -1617,8 +1617,10 @@ QPopupMenu* Workspace::clientPopup( Client* c ) desk_popup = new QPopupMenu( popup ); desk_popup->setCheckable( TRUE ); desk_popup->setFont(KGlobalSettings::menuFont()); - connect( desk_popup, SIGNAL( activated(int) ), this, SLOT( sendToDesktop(int) ) ); - connect( desk_popup, SIGNAL( aboutToShow() ), this, SLOT( desktopPopupAboutToShow() ) ); + connect( desk_popup, SIGNAL( activated(int) ), + this, SLOT( sendToDesktop(int) ) ); + connect( desk_popup, SIGNAL( aboutToShow() ), + this, SLOT( desktopPopupAboutToShow() ) ); popup->insertItem( SmallIconSet( "move" ), i18n("&Move")+'\t'+keys->shortcut("Window Move").toString(), Options::MoveOp ); popup->insertItem( i18n("&Size")+'\t'+keys->shortcut("Window Resize").toString(), Options::ResizeOp ); @@ -3131,8 +3133,14 @@ void Workspace::desktopPopupAboutToShow() if (iinsertItem( basic_name.arg(i).arg( desktopName(i) ), i ); - if ( popup_client && !popup_client->isSticky() && popup_client->desktop() == i ) + id = desk_popup->insertItem( + basic_name + .arg(i) + .arg( desktopName(i).replace( QRegExp("&"), "&&" )), + i + ); + if ( popup_client && + !popup_client->isSticky() && popup_client->desktop() == i ) desk_popup->setItemChecked( id, TRUE ); } }