Blame SOURCES/kde-workspace-4.7.80-classicmenu-logout.patch

652846
diff -up kde-workspace-4.7.80/plasma/desktop/applets/kickoff/core/itemhandlers.cpp.classicmenu-logout kde-workspace-4.7.80/plasma/desktop/applets/kickoff/core/itemhandlers.cpp
652846
--- kde-workspace-4.7.80/plasma/desktop/applets/kickoff/core/itemhandlers.cpp.classicmenu-logout	2011-10-11 16:42:11.000000000 +0200
652846
+++ kde-workspace-4.7.80/plasma/desktop/applets/kickoff/core/itemhandlers.cpp	2011-11-21 14:56:36.108858679 +0100
652846
@@ -105,7 +105,8 @@ bool LeaveItemHandler::openUrl(const KUr
652846
         QTimer::singleShot(0, this, SLOT(switchUser()));
652846
         return true;
652846
     } else if (m_logoutAction == "logout" || m_logoutAction == "logoutonly" ||
652846
-               m_logoutAction == "restart" || m_logoutAction == "shutdown") {
652846
+               m_logoutAction == "restart" || m_logoutAction == "shutdown" ||
652846
+               m_logoutAction == "leave") {
652846
         // decouple dbus call, otherwise we'll run into a dead-lock
652846
         QTimer::singleShot(0, this, SLOT(logout()));
652846
         return true;
652846
@@ -158,6 +159,10 @@ void LeaveItemHandler::logout()
652846
         type = KWorkSpace::ShutdownTypeReboot;
652846
     } else if (m_logoutAction == "shutdown") {
652846
         type = KWorkSpace::ShutdownTypeHalt;
652846
+    } else if (m_logoutAction == "leave") {
652846
+        // This one brings up the dialog, for use in the classic menu.
652846
+        confirm = KWorkSpace::ShutdownConfirmYes;
652846
+        type = KWorkSpace::ShutdownTypeDefault;
652846
     }
652846
 
652846
     KWorkSpace::requestShutDown(confirm, type);
652846
diff -up kde-workspace-4.7.80/plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.cpp.classicmenu-logout kde-workspace-4.7.80/plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.cpp
652846
--- kde-workspace-4.7.80/plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.cpp.classicmenu-logout	2011-11-04 15:33:12.000000000 +0100
652846
+++ kde-workspace-4.7.80/plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.cpp	2011-11-21 14:48:59.281609964 +0100
652846
@@ -209,6 +209,7 @@ public:
652846
             case Shutdown:                 return i18n("Shut down");
652846
             case Logout:                   return i18n("Log out");
652846
             case Leave:                    return i18n("Leave");
652846
+            case LeaveDialog:              return i18n("Leave...");
652846
         }
652846
         return QString();
652846
     }
652846
@@ -234,6 +235,7 @@ public:
652846
             case Shutdown:                 return "system-shutdown";
652846
             case Logout:                   return "system-log-out";
652846
             case Leave:                    return "system-shutdown";
652846
+            case LeaveDialog:              return "system-shutdown";
652846
         }
652846
         return QString();
652846
     }
652846
@@ -741,6 +743,8 @@ void MenuLauncherApplet::showMenu(bool p
652846
                 menuview->addAction(KIcon(d->viewIcon(LockScreen)), d->viewText(LockScreen))->setData(KUrl("leave:/lock"));
652846
             } else if(vtname == "Logout") {
652846
                 menuview->addAction(KIcon(d->viewIcon(Logout)), d->viewText(Logout))->setData(KUrl("leave:/logout"));
652846
+            } else if(vtname == "LeaveDialog") {
652846
+                menuview->addAction(KIcon(d->viewIcon(LeaveDialog)), d->viewText(LeaveDialog))->setData(KUrl("leave:/leave"));
652846
             } else if(vtname == "Leave") {
652846
                 Kickoff::LeaveModel *leavemodel = new Kickoff::LeaveModel(menuview);
652846
                 leavemodel->updateModel();
652846
diff -up kde-workspace-4.7.80/plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.h.classicmenu-logout kde-workspace-4.7.80/plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.h
652846
--- kde-workspace-4.7.80/plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.h.classicmenu-logout	2011-07-27 20:35:42.000000000 +0200
652846
+++ kde-workspace-4.7.80/plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.h	2011-11-21 14:48:59.282609967 +0100
652846
@@ -59,7 +59,8 @@ public:
652846
         Restart, ///< Restart Action
652846
         Shutdown, ///< Shutdown Action
652846
         Logout, ///< Logout Action
652846
-        Leave ///< Leave Menu
652846
+        Leave, ///< Leave Menu
652846
+        LeaveDialog ///< Leave Dialog Action
652846
     };
652846
 
652846
     /**