[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/kicker/ui
From:       Stephan Binner <binner () kde ! org>
Date:       2004-12-01 7:42:37
Message-ID: 20041201074237.696801A0BF () office ! kde ! org
[Download RAW message or body]

CVS commit by binner: 

escape ampersand


  M +7 -6      appletop_mnu.cpp   1.38


--- kdebase/kicker/ui/appletop_mnu.cpp  #1.37:1.38
@@ -38,4 +38,6 @@ PanelAppletOpMenu::PanelAppletOpMenu(int
     bool isButton = (parent && parent->inherits("ButtonContainer"));
     bool isMenu = false;
+    QString titleText = title;
+    titleText=titleText.replace('&', "&&");
     if (isButton)
     {
@@ -48,9 +50,9 @@ PanelAppletOpMenu::PanelAppletOpMenu(int
                                             i18n("&Move %1 Button")) :
                                   i18n("&Move %1");
-        insertItem(SmallIcon("move"), text.arg(title), Move);
+        insertItem(SmallIcon("move"), text.arg(titleText), Move);
         text = isButton ? (isMenu ? i18n("&Remove %1 Menu") :
                                     i18n("&Remove %1 Button")) :
                           i18n("&Remove %1");
-        insertItem(SmallIcon("remove"), text.arg(title), Remove);
+        insertItem(SmallIcon("remove"), text.arg(titleText), Remove);
         needSeparator = true;
     }
@@ -73,5 +75,5 @@ PanelAppletOpMenu::PanelAppletOpMenu(int
                                                      KIcon::DefaultState,
                                                      0, true));
-        insertItem(iconPix, i18n("&About %1").arg( title ), About);
+        insertItem(iconPix, i18n("&About %1").arg( titleText ), About);
         needSeparator = !(actions & KPanelApplet::Help);
     }
@@ -88,6 +90,5 @@ PanelAppletOpMenu::PanelAppletOpMenu(int
     if (appletsMenu)
     {
-        QString titleText = title;
-        QString text = titleText.isEmpty() ? i18n("Applet Menu") : i18n("%1 \
Menu").arg(titleText.replace('&', "&&")); +        QString text = title.isEmpty() ? \
i18n("Applet Menu") : i18n("%1 Menu").arg(titleText);  
         if (icon.isEmpty())
@@ -110,5 +111,5 @@ PanelAppletOpMenu::PanelAppletOpMenu(int
         else
         {
-            insertItem(SmallIcon("configure"), i18n("&Configure %1...").arg(title), \
Preferences); +            insertItem(SmallIcon("configure"), i18n("&Configure \
%1...").arg(titleText), Preferences);  }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic