diff options
author | Slávek Banko <[email protected]> | 2016-04-10 10:42:13 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2016-04-10 10:42:13 +0200 |
commit | ba407974cb68505e03dbf49a9d9cf3843873c8de (patch) | |
tree | c0302b1c937798efa89e1ff50e6a3fca2efc8b56 /src/dmctl.cpp | |
parent | 7fdc8b30e85418cca031b45ad02f723373b73433 (diff) | |
download | tastymenu-ba407974cb68505e03dbf49a9d9cf3843873c8de.tar.gz tastymenu-ba407974cb68505e03dbf49a9d9cf3843873c8de.zip |
Initial TDE conversion
Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'src/dmctl.cpp')
-rw-r--r-- | src/dmctl.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/dmctl.cpp b/src/dmctl.cpp index 65c255c..c6d3110 100644 --- a/src/dmctl.cpp +++ b/src/dmctl.cpp @@ -21,7 +21,7 @@ #ifdef Q_WS_X11 -#include <klocale.h> +#include <tdelocale.h> #include <dcopclient.h> #include <tqregexp.h> @@ -106,16 +106,16 @@ DM::exec( const char *cmd ) } /** - * Execute a KDM/GDM remote control command. + * Execute a TDM/GDM remote control command. * @param cmd the command to execute. FIXME: undocumented yet. * @param buf the result buffer. * @return result: * @li If true, the command was successfully executed. * @p ret might contain addional results. * @li If false and @p ret is empty, a communication error occurred - * (most probably KDM is not running). + * (most probably TDM is not running). * @li If false and @p ret is non-empty, it contains the error message - * from KDM. + * from TDM. */ bool DM::exec( const char *cmd, TQCString &buf ) @@ -176,11 +176,11 @@ DM::canShutdown() } void -DM::shutdown( KApplication::ShutdownType shutdownType, - KApplication::ShutdownMode shutdownMode, /* NOT Default */ +DM::shutdown( TDEApplication::ShutdownType shutdownType, + TDEApplication::ShutdownMode shutdownMode, /* NOT Default */ const TQString &bootOption ) { - if (shutdownType == KApplication::ShutdownTypeNone) + if (shutdownType == TDEApplication::ShutdownTypeNone) return; bool cap_ask; @@ -192,26 +192,26 @@ DM::shutdown( KApplication::ShutdownType shutdownType, return; cap_ask = false; } - if (!cap_ask && shutdownMode == KApplication::ShutdownModeInteractive) - shutdownMode = KApplication::ShutdownModeForceNow; + if (!cap_ask && shutdownMode == TDEApplication::ShutdownModeInteractive) + shutdownMode = TDEApplication::ShutdownModeForceNow; TQCString cmd; if (DMType == GDM) { - cmd.append( shutdownMode == KApplication::ShutdownModeForceNow ? + cmd.append( shutdownMode == TDEApplication::ShutdownModeForceNow ? "SET_LOGOUT_ACTION " : "SET_SAFE_LOGOUT_ACTION " ); - cmd.append( shutdownType == KApplication::ShutdownTypeReboot ? + cmd.append( shutdownType == TDEApplication::ShutdownTypeReboot ? "REBOOT\n" : "HALT\n" ); } else { cmd.append( "shutdown\t" ); - cmd.append( shutdownType == KApplication::ShutdownTypeReboot ? + cmd.append( shutdownType == TDEApplication::ShutdownTypeReboot ? "reboot\t" : "halt\t" ); if (!bootOption.isNull()) cmd.append( "=" ).append( bootOption.local8Bit() ).append( "\t" ); - cmd.append( shutdownMode == KApplication::ShutdownModeInteractive ? + cmd.append( shutdownMode == TDEApplication::ShutdownModeInteractive ? "ask\n" : - shutdownMode == KApplication::ShutdownModeForceNow ? + shutdownMode == TDEApplication::ShutdownModeForceNow ? "forcenow\n" : - shutdownMode == KApplication::ShutdownModeTryNow ? + shutdownMode == TDEApplication::ShutdownModeTryNow ? "trynow\n" : "schedule\n" ); } exec( cmd.data() ); |