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