diff options
Diffstat (limited to 'tdmlib')
-rw-r--r-- | tdmlib/dmctl.cpp | 22 | ||||
-rw-r--r-- | tdmlib/dmctl.h | 8 |
2 files changed, 15 insertions, 15 deletions
diff --git a/tdmlib/dmctl.cpp b/tdmlib/dmctl.cpp index 41a5cb206..bdcc51cf5 100644 --- a/tdmlib/dmctl.cpp +++ b/tdmlib/dmctl.cpp @@ -184,11 +184,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; @@ -200,26 +200,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.isEmpty()) 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() ); diff --git a/tdmlib/dmctl.h b/tdmlib/dmctl.h index da5aa2b0b..71363f9f4 100644 --- a/tdmlib/dmctl.h +++ b/tdmlib/dmctl.h @@ -40,8 +40,8 @@ public: ~DM(); bool canShutdown(); - void shutdown( KApplication::ShutdownType shutdownType, - KApplication::ShutdownMode shutdownMode, + void shutdown( TDEApplication::ShutdownType shutdownType, + TDEApplication::ShutdownMode shutdownMode, const TQString &bootOption = TQString::null ); void setLock( bool on ); @@ -72,8 +72,8 @@ public: DM() {} bool canShutdown() { return false; } - void shutdown( KApplication::ShutdownType shutdownType, - KApplication::ShutdownMode shutdownMode, + void shutdown( TDEApplication::ShutdownType shutdownType, + TDEApplication::ShutdownMode shutdownMode, const TQString &bootOption = TQString::null ) {} void setLock( bool ) {} |