@ -97,15 +97,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
void KSMServer : : logout ( int confirm , int sdtype , int sdmode )
{
shutdown ( ( K Application: : ShutdownConfirm ) confirm ,
( K Application: : ShutdownType ) sdtype ,
( K Application: : ShutdownMode ) sdmode ) ;
shutdown ( ( TDE Application: : ShutdownConfirm ) confirm ,
( TDE Application: : ShutdownType ) sdtype ,
( TDE Application: : ShutdownMode ) sdmode ) ;
}
bool KSMServer : : checkStatus ( bool & logoutConfirmed , bool & maysd ,
K Application: : ShutdownConfirm confirm ,
K Application: : ShutdownType sdtype ,
K Application: : ShutdownMode sdmode )
TDE Application: : ShutdownConfirm confirm ,
TDE Application: : ShutdownType sdtype ,
TDE Application: : ShutdownMode sdmode )
{
pendingShutdown . stop ( ) ;
if ( dialogActive )
@ -130,15 +130,15 @@ bool KSMServer::checkStatus( bool &logoutConfirmed, bool &maysd,
config - > setGroup ( " General " ) ;
logoutConfirmed =
( confirm = = K Application: : ShutdownConfirmYes ) ? false :
( confirm = = K Application: : ShutdownConfirmNo ) ? true :
( confirm = = TDE Application: : ShutdownConfirmYes ) ? false :
( confirm = = TDE Application: : ShutdownConfirmNo ) ? true :
! config - > readBoolEntry ( " confirmLogout " , true ) ;
maysd = false ;
if ( config - > readBoolEntry ( " offerShutdown " , true ) & & DM ( ) . canShutdown ( ) )
maysd = true ;
if ( ! maysd ) {
if ( sdtype ! = K Application: : ShutdownTypeNone & &
sdtype ! = K Application: : ShutdownTypeDefault & &
if ( sdtype ! = TDE Application: : ShutdownTypeNone & &
sdtype ! = TDE Application: : ShutdownTypeDefault & &
logoutConfirmed )
return false ; /* unsupported fast shutdown */
}
@ -146,9 +146,9 @@ bool KSMServer::checkStatus( bool &logoutConfirmed, bool &maysd,
return true ;
}
void KSMServer : : shutdownInternal ( K Application: : ShutdownConfirm confirm ,
K Application: : ShutdownType sdtype ,
K Application: : ShutdownMode sdmode ,
void KSMServer : : shutdownInternal ( TDE Application: : ShutdownConfirm confirm ,
TDE Application: : ShutdownType sdtype ,
TDE Application: : ShutdownMode sdmode ,
TQString bopt )
{
bool maysd = false ;
@ -160,12 +160,12 @@ void KSMServer::shutdownInternal( KApplication::ShutdownConfirm confirm,
config - > setGroup ( " General " ) ;
if ( ! maysd ) {
sdtype = K Application: : ShutdownTypeNone ;
} else if ( sdtype = = K Application: : ShutdownTypeDefault )
sdtype = ( K Application: : ShutdownType )
config - > readNumEntry ( " shutdownType " , ( int ) K Application: : ShutdownTypeNone ) ;
if ( sdmode = = K Application: : ShutdownModeDefault )
sdmode = K Application: : ShutdownModeInteractive ;
sdtype = TDE Application: : ShutdownTypeNone ;
} else if ( sdtype = = TDE Application: : ShutdownTypeDefault )
sdtype = ( TDE Application: : ShutdownType )
config - > readNumEntry ( " shutdownType " , ( int ) TDE Application: : ShutdownTypeNone ) ;
if ( sdmode = = TDE Application: : ShutdownModeDefault )
sdmode = TDE Application: : ShutdownModeInteractive ;
// shall we show a logout status dialog box?
bool showLogoutStatusDlg = KConfigGroup ( KGlobal : : config ( ) , " Logout " ) . readBoolEntry ( " showLogoutStatusDlg " , true ) ;
@ -282,8 +282,8 @@ void KSMServer::shutdownInternal( KApplication::ShutdownConfirm confirm,
dialogActive = false ;
}
void KSMServer : : shutdown ( K Application: : ShutdownConfirm confirm ,
KApplication: : ShutdownType sdtype , K Application: : ShutdownMode sdmode )
void KSMServer : : shutdown ( TDE Application: : ShutdownConfirm confirm ,
TDEApplication: : ShutdownType sdtype , TDE Application: : ShutdownMode sdmode )
{
shutdownInternal ( confirm , sdtype , sdmode ) ;
}
@ -297,9 +297,9 @@ void KSMServer::logoutTimed( int sdtype, int sdmode, TQString bootOption )
KConfig * config = KGlobal : : config ( ) ;
config - > setGroup ( " General " ) ;
if ( sdtype = = K Application: : ShutdownTypeHalt )
if ( sdtype = = TDE Application: : ShutdownTypeHalt )
confirmDelay = config - > readNumEntry ( " confirmShutdownDelay " , 31 ) ;
else if ( sdtype = = K Application: : ShutdownTypeReboot )
else if ( sdtype = = TDE Application: : ShutdownTypeReboot )
confirmDelay = config - > readNumEntry ( " confirmRebootDelay " , 31 ) ;
else
confirmDelay = config - > readNumEntry ( " confirmLogoutDelay " , 31 ) ;
@ -307,14 +307,14 @@ void KSMServer::logoutTimed( int sdtype, int sdmode, TQString bootOption )
bool result = true ;
if ( confirmDelay ) {
KSMShutdownFeedback : : start ( ) ; // make the screen gray
result = KSMDelayedMessageBox : : showTicker ( ( K Application: : ShutdownType ) sdtype , bootOption , confirmDelay ) ;
result = KSMDelayedMessageBox : : showTicker ( ( TDE Application: : ShutdownType ) sdtype , bootOption , confirmDelay ) ;
KSMShutdownFeedback : : stop ( ) ; // make the screen become normal again
}
if ( result )
shutdownInternal ( K Application: : ShutdownConfirmNo ,
( K Application: : ShutdownType ) sdtype ,
( K Application: : ShutdownMode ) sdmode ,
shutdownInternal ( TDE Application: : ShutdownConfirmNo ,
( TDE Application: : ShutdownType ) sdtype ,
( TDE Application: : ShutdownMode ) sdmode ,
bootOption ) ;
}