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

List:       kde-commits
Subject:    branches/KDE/4.2/kdebase/workspace/plasma/applets/kickoff/applet
From:       Darío Andrés Rodríguez <andresbajotierra () gmail ! co
Date:       2009-04-25 15:18:22
Message-ID: 1240672702.488036.12331.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 959069 by darioandres:

Backport to 4.2branch of:
SVN commit 959066 by darioandres:

Preserve global shortcut when switching menu-style Kickoff<->SimpleMenu
This is just a workaround (because all the settings are lost on the switch)

The real fix would be not destroying the current applet and creating a new one
on switch but changing its style internally

Part 1

CCBUG: 178926


 M  +6 -1      applet.cpp  


--- branches/KDE/4.2/kdebase/workspace/plasma/applets/kickoff/applet/applet.cpp #959068:959069
@@ -129,7 +129,12 @@
 void LauncherApplet::switchMenuStyle()
 {
     if (containment()) {
-        containment()->addApplet("simplelauncher", QVariantList(), geometry());
+        Plasma::Applet * simpleLauncher = 
+                            containment()->addApplet("simplelauncher", QVariantList(), geometry());
+        //Switch shortcuts with the new launcher to avoid losing it
+        KShortcut currentShortcut = globalShortcut();
+        setGlobalShortcut(KShortcut());
+        simpleLauncher->setGlobalShortcut(currentShortcut);
         destroy();
     }
 }
[prev in list] [next in list] [prev in thread] [next in thread] 

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