Blob Blame History Raw
diff -ur kdebase-workspace-4.0.3/plasma/applets/kickoff/applet/applet.cpp kdebase-workspace-4.0.3-menu-switch/plasma/applets/kickoff/applet/applet.cpp
--- kdebase-workspace-4.0.3/plasma/applets/kickoff/applet/applet.cpp	2008-03-27 21:34:51.000000000 +0100
+++ kdebase-workspace-4.0.3-menu-switch/plasma/applets/kickoff/applet/applet.cpp	2008-03-31 16:29:44.000000000 +0200
@@ -55,6 +55,7 @@
     QCheckBox *switchOnHoverCheckBox;
     KIntNumInput *visibleCountEdit;
     QAction* switcher;
+    QList<QAction*> actions;
 
     Private() : launcher(0), dialog(0), switcher(0) {}
     ~Private() { delete dialog; delete launcher; }
@@ -79,6 +80,14 @@
     delete d;
 }
 
+void LauncherApplet::init()
+{
+    Q_ASSERT( ! d->switcher );
+    d->switcher = new QAction(i18n("Switch to Classic Menu Style"), this);
+    d->actions.append(d->switcher);
+    connect(d->switcher, SIGNAL(triggered(bool)), this, SLOT(switchMenuStyle()));
+}
+
 Qt::Orientations LauncherApplet::expandingDirections() const
 {
     return 0;
@@ -212,4 +221,9 @@
     d->icon->setPressed();
 }
 
+QList<QAction*> LauncherApplet::contextActions()
+{
+  return d->actions;
+}
+
 #include "applet.moc"
diff -ur kdebase-workspace-4.0.3/plasma/applets/kickoff/applet/applet.h kdebase-workspace-4.0.3-menu-switch/plasma/applets/kickoff/applet/applet.h
--- kdebase-workspace-4.0.3/plasma/applets/kickoff/applet/applet.h	2008-03-27 21:34:51.000000000 +0100
+++ kdebase-workspace-4.0.3-menu-switch/plasma/applets/kickoff/applet/applet.h	2008-03-31 15:54:34.000000000 +0200
@@ -44,10 +44,14 @@
         LauncherApplet(QObject *parent, const QVariantList &args);
         virtual ~LauncherApplet();
 
+        void init();
+
         virtual QSizeF sizeHint() const;
         void constraintsUpdated(Plasma::Constraints constraints);
         Qt::Orientations expandingDirections() const;
 
+        virtual QList<QAction*> contextActions();
+
 public slots:
         void showConfigurationInterface();
         void switchMenuStyle();
diff -ur kdebase-workspace-4.0.3/plasma/applets/kickoff/simpleapplet/simpleapplet.cpp kdebase-workspace-4.0.3-menu-switch/plasma/applets/kickoff/simpleapplet/simpleapplet.cpp
--- kdebase-workspace-4.0.3/plasma/applets/kickoff/simpleapplet/simpleapplet.cpp	2008-03-27 21:34:51.000000000 +0100
+++ kdebase-workspace-4.0.3-menu-switch/plasma/applets/kickoff/simpleapplet/simpleapplet.cpp	2008-03-31 16:30:51.000000000 +0200
@@ -63,6 +63,7 @@
         KDialog *dialog;
         QComboBox *viewComboBox;
 
+        QList<QAction*> actions;
         QAction* switcher;
         Private() : menuview(0), launcher(0), dialog(0), switcher(0) {}
         ~Private() { delete dialog; delete menuview; }
@@ -148,6 +149,11 @@
 
     Kickoff::UrlItemLauncher::addGlobalHandler(Kickoff::UrlItemLauncher::ExtensionHandler,"desktop",new Kickoff::ServiceItemHandler);
     Kickoff::UrlItemLauncher::addGlobalHandler(Kickoff::UrlItemLauncher::ProtocolHandler, "leave", new Kickoff::LeaveItemHandler);
+
+    Q_ASSERT( ! d->switcher );
+    d->switcher = new QAction(i18n("Switch to Kickoff Menu Style"), this);
+    d->actions.append(d->switcher);
+    connect(d->switcher, SIGNAL(triggered(bool)), this, SLOT(switchMenuStyle()));
 }
     
 QSizeF MenuLauncherApplet::sizeHint() const
@@ -331,4 +337,9 @@
     }
 }
 
+QList<QAction*> MenuLauncherApplet::contextActions()
+{
+  return d->actions;
+}
+
 #include "simpleapplet.moc"
diff -ur kdebase-workspace-4.0.3/plasma/applets/kickoff/simpleapplet/simpleapplet.h kdebase-workspace-4.0.3-menu-switch/plasma/applets/kickoff/simpleapplet/simpleapplet.h
--- kdebase-workspace-4.0.3/plasma/applets/kickoff/simpleapplet/simpleapplet.h	2008-03-27 21:34:51.000000000 +0100
+++ kdebase-workspace-4.0.3-menu-switch/plasma/applets/kickoff/simpleapplet/simpleapplet.h	2008-03-31 15:54:34.000000000 +0200
@@ -57,6 +57,8 @@
         void constraintsUpdated(Plasma::Constraints constraints);
         Qt::Orientations expandingDirections() const;
 
+        virtual QList<QAction*> contextActions();
+
 public slots:
         void showConfigurationInterface();
         void switchMenuStyle();