summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Andriot <francois.andriot@free.fr>2013-05-09 19:00:06 +0200
committerSlávek Banko <slavek.banko@axis.cz>2013-05-09 19:56:15 +0200
commit15bafb83df706c6f30fb31e0e9177362236e2694 (patch)
treeb2cad7dc7bbd1fd1630855dea289e810cb49db0e
parentcc559e02b577577fa560ced45e9d362b110fac90 (diff)
downloadtdebase-15bafb83df706c6f30fb31e0e9177362236e2694.tar.gz
tdebase-15bafb83df706c6f30fb31e0e9177362236e2694.zip
Kickoff menu: Enable the 'timed logout' feature
(cherry picked from commit a5d1d4850014980eabdc0c98ba19937f820db54b)
-rw-r--r--kicker/kicker/ui/k_new_mnu.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/kicker/kicker/ui/k_new_mnu.cpp b/kicker/kicker/ui/k_new_mnu.cpp
index be4c78e69..072d8d040 100644
--- a/kicker/kicker/ui/k_new_mnu.cpp
+++ b/kicker/kicker/ui/k_new_mnu.cpp
@@ -2583,22 +2583,11 @@ void KMenu::slotStartURL(const TQString& u)
slotLock();
}
else if ( u == "kicker:/logout" ) {
-#ifdef KDELIBS_SUSE
TQByteArray params;
TQDataStream stream(params, IO_WriteOnly);
stream << 0 << -1 << "";
kapp->dcopClient()->send("ksmserver", "default", "logoutTimed(int,int,TQString)", params);
-#else
- DCOPRef mediamanager("ksmserver", "ksmserver");
- DCOPReply reply = mediamanager.call( "logoutTimed", (int)KApplication::ShutdownTypeNone, (int)KApplication::ShutdownModeDefault );
- if (!reply.isValid() && KMessageBox::Continue==KMessageBox::warningContinueCancel(this, i18n("Do you really want to end the session?"),
- i18n("Logout Confirmation"), KGuiItem(i18n("Logout"),"undo")))
- kapp->requestShutDown( KApplication::ShutdownConfirmNo,
- KApplication::ShutdownTypeNone,
- KApplication::ShutdownModeDefault );
-
-#endif
}
else if ( u == "kicker:/runcommand" )
{
@@ -2609,34 +2598,18 @@ void KMenu::slotStartURL(const TQString& u)
runUserCommand();
}
else if ( u == "kicker:/shutdown" ) {
-#ifdef KDELIBS_SUSE
TQByteArray params;
TQDataStream stream(params, IO_WriteOnly);
stream << 2 << -1 << "";
kapp->dcopClient()->send("ksmserver", "default", "logoutTimed(int,int,TQString)", params);
-#else
- if (KMessageBox::Continue==KMessageBox::warningContinueCancel(this, i18n("Do you really want to turn off the computer?"),
- i18n("Shutdown Confirmation"), KGuiItem(i18n("Shutdown"),"exit")))
- kapp->requestShutDown( KApplication::ShutdownConfirmNo,
- KApplication::ShutdownTypeHalt,
- KApplication::ShutdownModeDefault );
-#endif
}
else if ( u == "kicker:/restart" ) {
-#ifdef KDELIBS_SUSE
TQByteArray params;
TQDataStream stream(params, IO_WriteOnly);
stream << 1 << -1 << TQString();
kapp->dcopClient()->send("ksmserver", "default", "logoutTimed(int,int,TQString)", params);
-#else
- if (KMessageBox::Continue==KMessageBox::warningContinueCancel(this, i18n("Do you really want to reset the computer and boot (another operating system)?"),
- i18n("Restart Confirmation"), KGuiItem(i18n("Restart"),"reload")))
- kapp->requestShutDown( KApplication::ShutdownConfirmNo,
- KApplication::ShutdownTypeReboot,
- KApplication::ShutdownModeDefault );
-#endif
}
#ifdef KDELIBS_SUSE
else if ( u == "kicker:/suspend_disk" ) {
@@ -2664,7 +2637,6 @@ void KMenu::slotStartURL(const TQString& u)
else if ( u.startsWith("kicker:/switchuser_") )
DM().lockSwitchVT( u.mid(19).toInt() );
else if ( u.startsWith("kicker:/restart_") ) {
-#ifdef KDELIBS_SUSE
TQStringList rebootOptions;
int def, cur;
DM().bootOptions( rebootOptions, def, cur );
@@ -2674,9 +2646,6 @@ void KMenu::slotStartURL(const TQString& u)
stream << 1 << -1 << rebootOptions[u.mid(16).toInt()];
kapp->dcopClient()->send("ksmserver", "default", "logoutTimed(int,int,TQString)", params);
-#else
- KMessageBox::error( this, TQString( "Sorry, not implemented." ));
-#endif
}
#warning restart entry not supported
#if 0