@ -674,7 +674,7 @@ void KSMShutdownIPFeedback::slotPaintEffect()
//////
//////
KSMShutdownDlg : : KSMShutdownDlg ( TQWidget * parent ,
KSMShutdownDlg : : KSMShutdownDlg ( TQWidget * parent ,
bool maysd , K Application: : ShutdownType sdtype , int * selection )
bool maysd , TDE Application: : ShutdownType sdtype , int * selection )
: TQDialog ( parent , 0 , TRUE , ( WFlags ) WType_Popup ) , targets ( 0 ) , m_selection ( selection )
: TQDialog ( parent , 0 , TRUE , ( WFlags ) WType_Popup ) , targets ( 0 ) , m_selection ( selection )
// this is a WType_Popup on purpose. Do not change that! Not
// this is a WType_Popup on purpose. Do not change that! Not
// having a popup here has severe side effects.
// having a popup here has severe side effects.
@ -903,7 +903,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
btnReboot - > setAccel ( " ALT+ " + btnReboot - > textLabel ( ) . lower ( ) [ i + 1 ] ) ;
btnReboot - > setAccel ( " ALT+ " + btnReboot - > textLabel ( ) . lower ( ) [ i + 1 ] ) ;
hbuttonbox2 - > addWidget ( btnReboot ) ;
hbuttonbox2 - > addWidget ( btnReboot ) ;
connect ( btnReboot , TQT_SIGNAL ( clicked ( ) ) , TQT_SLOT ( slotReboot ( ) ) ) ;
connect ( btnReboot , TQT_SIGNAL ( clicked ( ) ) , TQT_SLOT ( slotReboot ( ) ) ) ;
if ( sdtype = = K Application: : ShutdownTypeReboot )
if ( sdtype = = TDE Application: : ShutdownTypeReboot )
btnReboot - > setFocus ( ) ;
btnReboot - > setFocus ( ) ;
// BAD CARMA .. this code is copied line by line from standard konqy dialog
// BAD CARMA .. this code is copied line by line from standard konqy dialog
@ -938,7 +938,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
btnHalt - > setAccel ( " ALT+ " + btnHalt - > textLabel ( ) . lower ( ) [ i + 1 ] ) ;
btnHalt - > setAccel ( " ALT+ " + btnHalt - > textLabel ( ) . lower ( ) [ i + 1 ] ) ;
hbuttonbox2 - > addWidget ( btnHalt ) ;
hbuttonbox2 - > addWidget ( btnHalt ) ;
connect ( btnHalt , TQT_SIGNAL ( clicked ( ) ) , TQT_SLOT ( slotHalt ( ) ) ) ;
connect ( btnHalt , TQT_SIGNAL ( clicked ( ) ) , TQT_SLOT ( slotHalt ( ) ) ) ;
if ( sdtype = = K Application: : ShutdownTypeHalt )
if ( sdtype = = TDE Application: : ShutdownTypeHalt )
btnHalt - > setFocus ( ) ;
btnHalt - > setFocus ( ) ;
// cancel buttonbox
// cancel buttonbox
@ -959,7 +959,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
btnHalt - > setFont ( btnFont ) ;
btnHalt - > setFont ( btnFont ) ;
buttonlay - > addWidget ( btnHalt ) ;
buttonlay - > addWidget ( btnHalt ) ;
connect ( btnHalt , TQT_SIGNAL ( clicked ( ) ) , TQT_SLOT ( slotHalt ( ) ) ) ;
connect ( btnHalt , TQT_SIGNAL ( clicked ( ) ) , TQT_SLOT ( slotHalt ( ) ) ) ;
if ( sdtype = = K Application: : ShutdownTypeHalt | | getenv ( " TDM_AUTOLOGIN " ) )
if ( sdtype = = TDE Application: : ShutdownTypeHalt | | getenv ( " TDM_AUTOLOGIN " ) )
btnHalt - > setFocus ( ) ;
btnHalt - > setFocus ( ) ;
// Reboot
// Reboot
@ -969,7 +969,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
buttonlay - > addWidget ( btnReboot ) ;
buttonlay - > addWidget ( btnReboot ) ;
connect ( btnReboot , TQT_SIGNAL ( clicked ( ) ) , TQT_SLOT ( slotReboot ( ) ) ) ;
connect ( btnReboot , TQT_SIGNAL ( clicked ( ) ) , TQT_SLOT ( slotReboot ( ) ) ) ;
if ( sdtype = = K Application: : ShutdownTypeReboot )
if ( sdtype = = TDE Application: : ShutdownTypeReboot )
btnReboot - > setFocus ( ) ;
btnReboot - > setFocus ( ) ;
// this section is copied as-is into ubuntulogout as well
// this section is copied as-is into ubuntulogout as well
@ -1078,7 +1078,7 @@ KSMShutdownDlg::~KSMShutdownDlg()
void KSMShutdownDlg : : slotLogout ( )
void KSMShutdownDlg : : slotLogout ( )
{
{
m_shutdownType = K Application: : ShutdownTypeNone ;
m_shutdownType = TDE Application: : ShutdownTypeNone ;
accept ( ) ;
accept ( ) ;
}
}
@ -1087,7 +1087,7 @@ void KSMShutdownDlg::slotReboot()
{
{
// no boot option selected -> current
// no boot option selected -> current
m_bootOption = TQString : : null ;
m_bootOption = TQString : : null ;
m_shutdownType = K Application: : ShutdownTypeReboot ;
m_shutdownType = TDE Application: : ShutdownTypeReboot ;
accept ( ) ;
accept ( ) ;
}
}
@ -1095,7 +1095,7 @@ void KSMShutdownDlg::slotReboot(int opt)
{
{
if ( int ( rebootOptions . size ( ) ) > opt )
if ( int ( rebootOptions . size ( ) ) > opt )
m_bootOption = rebootOptions [ opt ] ;
m_bootOption = rebootOptions [ opt ] ;
m_shutdownType = K Application: : ShutdownTypeReboot ;
m_shutdownType = TDE Application: : ShutdownTypeReboot ;
accept ( ) ;
accept ( ) ;
}
}
@ -1103,7 +1103,7 @@ void KSMShutdownDlg::slotReboot(int opt)
void KSMShutdownDlg : : slotHalt ( )
void KSMShutdownDlg : : slotHalt ( )
{
{
m_bootOption = TQString : : null ;
m_bootOption = TQString : : null ;
m_shutdownType = K Application: : ShutdownTypeHalt ;
m_shutdownType = TDE Application: : ShutdownTypeHalt ;
accept ( ) ;
accept ( ) ;
}
}
@ -1160,7 +1160,7 @@ void KSMShutdownDlg::slotHibernate()
reject ( ) ; // continue on resume
reject ( ) ; // continue on resume
}
}
bool KSMShutdownDlg : : confirmShutdown ( bool maysd , K Application: : ShutdownType & sdtype , TQString & bootOption , int * selection )
bool KSMShutdownDlg : : confirmShutdown ( bool maysd , TDE Application: : ShutdownType & sdtype , TQString & bootOption , int * selection )
{
{
kapp - > enableStyles ( ) ;
kapp - > enableStyles ( ) ;
KSMShutdownDlg * l = new KSMShutdownDlg ( 0 ,
KSMShutdownDlg * l = new KSMShutdownDlg ( 0 ,
@ -1245,16 +1245,16 @@ void KSMDelayedPushButton::slotTimeout()
setDown ( false ) ;
setDown ( false ) ;
}
}
KSMDelayedMessageBox : : KSMDelayedMessageBox ( K Application: : ShutdownType sdtype , const TQString & bootOption , int confirmDelay )
KSMDelayedMessageBox : : KSMDelayedMessageBox ( TDE Application: : ShutdownType sdtype , const TQString & bootOption , int confirmDelay )
: TimedLogoutDlg ( 0 , 0 , true , ( WFlags ) WType_Popup ) , m_remaining ( confirmDelay )
: TimedLogoutDlg ( 0 , 0 , true , ( WFlags ) WType_Popup ) , m_remaining ( confirmDelay )
{
{
if ( sdtype = = K Application: : ShutdownTypeHalt )
if ( sdtype = = TDE Application: : ShutdownTypeHalt )
{
{
m_title - > setText ( i18n ( " Would you like to turn off your computer? " ) ) ;
m_title - > setText ( i18n ( " Would you like to turn off your computer? " ) ) ;
m_template = i18n ( " This computer will turn off automatically \n "
m_template = i18n ( " This computer will turn off automatically \n "
" after %1 seconds. " ) ;
" after %1 seconds. " ) ;
m_logo - > setPixmap ( BarIcon ( " exit " , 48 ) ) ;
m_logo - > setPixmap ( BarIcon ( " exit " , 48 ) ) ;
} else if ( sdtype = = K Application: : ShutdownTypeReboot )
} else if ( sdtype = = TDE Application: : ShutdownTypeReboot )
{
{
if ( bootOption . isEmpty ( ) )
if ( bootOption . isEmpty ( ) )
m_title - > setText ( i18n ( " Would you like to reboot your computer? " ) ) ;
m_title - > setText ( i18n ( " Would you like to reboot your computer? " ) ) ;
@ -1294,7 +1294,7 @@ void KSMDelayedMessageBox::updateText()
m_text - > setText ( m_template . arg ( m_remaining ) ) ;
m_text - > setText ( m_template . arg ( m_remaining ) ) ;
}
}
bool KSMDelayedMessageBox : : showTicker ( K Application: : ShutdownType sdtype , const TQString & bootOption , int confirmDelay )
bool KSMDelayedMessageBox : : showTicker ( TDE Application: : ShutdownType sdtype , const TQString & bootOption , int confirmDelay )
{
{
kapp - > enableStyles ( ) ;
kapp - > enableStyles ( ) ;
KSMDelayedMessageBox msg ( sdtype , bootOption , confirmDelay ) ;
KSMDelayedMessageBox msg ( sdtype , bootOption , confirmDelay ) ;