diff -r -U5 kdebase-workspace-4.3.75svn1048496/plasma/desktop/applets/kickoff/core/itemhandlers.cpp kdebase-workspace-4.3.75svn1048496.classicmenu-logout/plasma/desktop/applets/kickoff/core/itemhandlers.cpp
--- kdebase-workspace-4.3.75svn1048496/plasma/desktop/applets/kickoff/core/itemhandlers.cpp 2009-09-16 07:40:52.000000000 -0400
+++ kdebase-workspace-4.3.75svn1048496.classicmenu-logout/plasma/desktop/applets/kickoff/core/itemhandlers.cpp 2009-11-21 17:46:56.000000000 -0500
@@ -107,11 +107,12 @@
} else if (m_logoutAction == "switch") {
// decouple dbus call, otherwise we'll run into a dead-lock
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;
} else if (m_logoutAction == "savesession") {
// decouple dbus call, otherwise we'll run into a dead-lock
@@ -158,10 +159,14 @@
kDebug() << "Switching user";
} else if (m_logoutAction == "restart") {
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;
}
//FIXME: the proper fix is to implement the KWorkSpace methods for Windows
#ifndef Q_WS_WIN
KWorkSpace::requestShutDown(confirm, type);
diff -r -U5 kdebase-workspace-4.3.75svn1048496/plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.cpp kdebase-workspace-4.3.75svn1048496.classicmenu-logout/plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.cpp
--- kdebase-workspace-4.3.75svn1048496/plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.cpp 2009-10-26 05:14:50.000000000 -0400
+++ kdebase-workspace-4.3.75svn1048496.classicmenu-logout/plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.cpp 2009-11-21 17:47:08.000000000 -0500
@@ -200,10 +200,11 @@
case SuspendRAM: return i18n("Sleep");
case Restart: return i18nc("Restart Computer", "Restart");
case Shutdown: return i18n("Shutdown");
case Logout: return i18n("Logout");
case Leave: return i18n("Leave");
+ case LeaveDialog: return i18n("Leave...");
}
return QString();
}
QString viewIcon(MenuLauncherApplet::ViewType vt) const {
@@ -225,10 +226,11 @@
case SuspendRAM: return "system-suspend-hibernate";
case Restart: return "system-reboot";
case Shutdown: return "system-shutdown";
case Logout: return "system-log-out";
case Leave: return "system-shutdown";
+ case LeaveDialog: return "system-shutdown";
}
return QString();
}
MenuLauncherApplet::ViewType viewType(const QByteArray& type) const {
diff -r -U5 kdebase-workspace-4.3.75svn1048496/plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.h kdebase-workspace-4.3.75svn1048496.classicmenu-logout/plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.h
--- kdebase-workspace-4.3.75svn1048496/plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.h 2009-09-16 07:40:52.000000000 -0400
+++ kdebase-workspace-4.3.75svn1048496.classicmenu-logout/plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.h 2009-11-21 17:47:19.000000000 -0500
@@ -57,11 +57,12 @@
SuspendDisk, ///< Suspend to Disk Action
SuspendRAM, ///< Suspend to RAM Action
Restart, ///< Restart Action
Shutdown, ///< Shutdown Action
Logout, ///< Logout Action
- Leave ///< Leave Menu
+ Leave, ///< Leave Menu
+ LeaveDialog ///< Leave Dialog Action
};
/**
* How the text of the menuitems got formatted.
*/