diff options
author | Francois Andriot <francois.andriot@free.fr> | 2013-05-09 19:00:06 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-05-09 19:00:06 +0200 |
commit | a5d1d4850014980eabdc0c98ba19937f820db54b (patch) | |
tree | 67b710219a38833b097f70082b91702627d431bd /kicker | |
parent | 18e3729805b1629bea80433ad3b912949123b304 (diff) | |
download | tdebase-a5d1d4850014980eabdc0c98ba19937f820db54b.tar.gz tdebase-a5d1d4850014980eabdc0c98ba19937f820db54b.zip |
Kickoff menu: Enable the 'timed logout' feature
Diffstat (limited to 'kicker')
-rw-r--r-- | kicker/kicker/ui/k_new_mnu.cpp | 31 |
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 1c9c0f9e2..3cbe530ff 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)TDEApplication::ShutdownTypeNone, (int)TDEApplication::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( TDEApplication::ShutdownConfirmNo, - TDEApplication::ShutdownTypeNone, - TDEApplication::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( TDEApplication::ShutdownConfirmNo, - TDEApplication::ShutdownTypeHalt, - TDEApplication::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( TDEApplication::ShutdownConfirmNo, - TDEApplication::ShutdownTypeReboot, - TDEApplication::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 |