@ -79,10 +79,10 @@ MSettingsDialog::MSettingsDialog(TQWidget *parent)
_configDialogManager = new TDEConfigDialogManager ( this , kshutdownrc ) ;
_configDialogManager - > updateWidgets ( ) ;
connect ( _configDialogManager , SIGNAL( widgetModified ( ) ) , SLOT( slotConfigChanged ( ) ) ) ;
connect ( _configDialogManager , TQ_ SIGNAL( widgetModified ( ) ) , TQ_ SLOT( slotConfigChanged ( ) ) ) ;
connect ( this , SIGNAL( applyClicked ( ) ) , SLOT( slotOKClicked ( ) ) ) ;
connect ( this , SIGNAL( okClicked ( ) ) , SLOT( slotOKClicked ( ) ) ) ;
connect ( this , TQ_ SIGNAL( applyClicked ( ) ) , TQ_ SLOT( slotOKClicked ( ) ) ) ;
connect ( this , TQ_ SIGNAL( okClicked ( ) ) , TQ_ SLOT( slotOKClicked ( ) ) ) ;
// lock after login
c_autoLock - > setChecked ( TQFile : : exists ( TDEGlobalSettings : : autostartPath ( ) + " /kshutdown-autolock.desktop " ) ) ;
@ -156,22 +156,22 @@ void MSettingsDialog::initActionsPage()
_shutDownItem = new TDEListViewItem ( _actions , ks_actions - > getName ( Action : : ShutDown ) ) ;
_shutDownItem - > setPixmap ( 0 , ks_actions - > getIcon ( Action : : ShutDown ) ) ;
connect ( _actions , SIGNAL( doubleClicked ( TQListViewItem * , const TQPoint & , int ) ) , SLOT( slotEditAction ( ) ) ) ;
connect ( _actions , SIGNAL( spacePressed ( TQListViewItem * ) ) , SLOT( slotEditAction ( ) ) ) ;
connect ( _actions , TQ_ SIGNAL( doubleClicked ( TQListViewItem * , const TQPoint & , int ) ) , TQ_ SLOT( slotEditAction ( ) ) ) ;
connect ( _actions , TQ_ SIGNAL( spacePressed ( TQListViewItem * ) ) , TQ_ SLOT( slotEditAction ( ) ) ) ;
// edit action
KPushButton * b_editAction = new KPushButton ( SmallIcon ( " edit " ) , i18n ( " Edit... " ) , gb_general , " KPushButton::b_editAction " ) ;
connect ( b_editAction , SIGNAL( clicked ( ) ) , SLOT( slotEditAction ( ) ) ) ;
connect ( b_editAction , TQ_ SIGNAL( clicked ( ) ) , TQ_ SLOT( slotEditAction ( ) ) ) ;
// check system configuration
KPushButton * b_checkSystemConfig = new KPushButton ( SmallIcon ( " button_ok " ) , i18n ( " Check System Configuration " ) , gb_general , " KPushButton::b_checkSystemConfig " ) ;
connect ( b_checkSystemConfig , SIGNAL( clicked ( ) ) , SLOT( slotCheckSystemConfig ( ) ) ) ;
connect ( b_checkSystemConfig , TQ_ SIGNAL( clicked ( ) ) , TQ_ SLOT( slotCheckSystemConfig ( ) ) ) ;
TQVGroupBox * gb_extras = new TQVGroupBox ( i18n ( " Extras Menu " ) , _actionsPage ) ;
KPushButton * b_modifyExtras = new KPushButton ( SmallIcon ( " edit " ) , i18n ( " Modify... " ) , gb_extras , " KPushButton::b_modifyExtras " ) ;
if ( ! ks_actions - > isEnabled ( Action : : Extras ) )
gb_extras - > hide ( ) ;
connect (
b_modifyExtras , SIGNAL( clicked ( ) ) ,
ks_extras , SLOT( slotModify ( ) ) ) ;
b_modifyExtras , TQ_ SIGNAL( clicked ( ) ) ,
ks_extras , TQ_ SLOT( slotModify ( ) ) ) ;
l - > addWidget ( gb_general ) ;
l - > addStretch ( ) ;
@ -189,7 +189,7 @@ void MSettingsDialog::initAdvancedPage()
// after login
TQVGroupBox * gb_afterLogin = new TQVGroupBox ( i18n ( " After Login " ) , _advancedPage ) ;
c_autoLock = new TQCheckBox ( i18n ( " Lock screen " ) , gb_afterLogin ) ;
connect ( c_autoLock , SIGNAL( clicked ( ) ) , SLOT( slotConfigChanged ( ) ) ) ;
connect ( c_autoLock , TQ_ SIGNAL( clicked ( ) ) , TQ_ SLOT( slotConfigChanged ( ) ) ) ;
// cd tray close
TQVGroupBox * gb_cdTrayClose = new TQVGroupBox ( i18n ( " Before Logout " ) , _advancedPage ) ;
@ -201,12 +201,12 @@ void MSettingsDialog::initAdvancedPage()
KLineEdit * in_cdTrayCloseCommand = new KLineEdit ( cdTrayCloseBox , " kcfg_cd_tray_close_command " ) ;
l_cdTrayCloseCommand - > setBuddy ( in_cdTrayCloseCommand ) ;
connect (
c_cdTrayClose , SIGNAL( toggled ( bool ) ) ,
in_cdTrayCloseCommand , SLOT( setEnabled ( bool ) ) ) ;
c_cdTrayClose , TQ_ SIGNAL( toggled ( bool ) ) ,
in_cdTrayCloseCommand , TQ_ SLOT( setEnabled ( bool ) ) ) ;
// kde settings
KPushButton * b_kdeSettings = new KPushButton ( SmallIcon ( " misc " ) , i18n ( " Related TDE Settings... " ) , _advancedPage , " KPushButton::b_kdeSettings " ) ;
connect ( b_kdeSettings , SIGNAL( clicked ( ) ) , SLOT( slotKDESettings ( ) ) ) ;
connect ( b_kdeSettings , TQ_ SIGNAL( clicked ( ) ) , TQ_ SLOT( slotKDESettings ( ) ) ) ;
l - > addWidget ( gb_afterLogin ) ;
l - > addWidget ( gb_cdTrayClose ) ;
@ -224,11 +224,11 @@ void MSettingsDialog::initGeneralPage()
KURLLabel * ul_shutDownProblem = new KURLLabel ( gb_problems ) ;
ul_shutDownProblem - > setText ( i18n ( " \" Turn Off Computer \" does not work " ) ) ;
connect ( ul_shutDownProblem , SIGNAL( leftClickedURL ( ) ) , SLOT( slotShutDownProblem ( ) ) ) ;
connect ( ul_shutDownProblem , TQ_ SIGNAL( leftClickedURL ( ) ) , TQ_ SLOT( slotShutDownProblem ( ) ) ) ;
KURLLabel * ul_trayMessageProblem = new KURLLabel ( gb_problems ) ;
ul_trayMessageProblem - > setText ( i18n ( " Popup messages are very annoying " ) ) ;
connect ( ul_trayMessageProblem , SIGNAL( leftClickedURL ( ) ) , SLOT( slotTrayMessageProblem ( ) ) ) ;
connect ( ul_trayMessageProblem , TQ_ SIGNAL( leftClickedURL ( ) ) , TQ_ SLOT( slotTrayMessageProblem ( ) ) ) ;
// links
TQVGroupBox * gb_links = new TQVGroupBox ( i18n ( " Add/Remove Links " ) , _generalPage ) ;
@ -258,12 +258,12 @@ void MSettingsDialog::initGeneralPage()
MTip * t_karamba = new MTip ( MTip : : Info , _generalPage ) ;
/* TODO: 2.0: superkaramba integration
t_karamba - > disconnect (
t_karamba , SIGNAL( linkClicked ( const TQString & ) ) ,
t_karamba , SLOT( openLink ( const TQString & ) )
t_karamba , TQ_ SIGNAL( linkClicked ( const TQString & ) ) ,
t_karamba , TQ_ SLOT( openLink ( const TQString & ) )
) ;
t_karamba - > connect (
t_karamba , SIGNAL( linkClicked ( const TQString & ) ) ,
this , SLOT( slotOpenKarambaLink ( const TQString & ) )
t_karamba , TQ_ SIGNAL( linkClicked ( const TQString & ) ) ,
this , TQ_ SLOT( slotOpenKarambaLink ( const TQString & ) )
) ;
*/
karambaThemes = karambaThemes . left ( i ) ;
@ -298,7 +298,7 @@ void MSettingsDialog::initMessagesPage()
in_warningMessageDelay - > setSuffix ( " " + i18n ( " minute(s) " ) ) ;
in_warningMessageDelay - > setRange ( 1 , 60 , 1 , true ) ;
KPushButton * b_warningMessageTest = new KPushButton ( KStdGuiItem : : test ( ) , w_warning , " KPushButton::b_warningMessageTest " ) ;
connect ( b_warningMessageTest , SIGNAL( clicked ( ) ) , SLOT( slotWarningMessageTest ( ) ) ) ;
connect ( b_warningMessageTest , TQ_ SIGNAL( clicked ( ) ) , TQ_ SLOT( slotWarningMessageTest ( ) ) ) ;
TQLabel * l_warningText = new TQLabel ( i18n ( " Recommended " ) , w_warning ) ;
l_warningText - > setFont ( TQFont ( l_warningText - > font ( ) . family ( ) , l_warningText - > font ( ) . pointSize ( ) , TQFont : : Bold ) ) ;
@ -332,12 +332,12 @@ void MSettingsDialog::initMessagesPage()
KPushButton * b_customMessagePresets = new KPushButton ( i18n ( " Presets " ) , w_customMessage , " KPushButton::b_customMessagePresets " ) ;
TDEPopupMenu * pm_customMessagePresets = new TDEPopupMenu ( b_customMessagePresets ) ;
pm_customMessagePresets - > insertItem ( " KDialog " , this , SLOT( slotSetKDialogCustomMessage ( ) ) ) ;
pm_customMessagePresets - > insertItem ( " Amor " , this , SLOT( slotSetAmorCustomMessage ( ) ) ) ;
pm_customMessagePresets - > insertItem ( " KDialog " , this , TQ_ SLOT( slotSetKDialogCustomMessage ( ) ) ) ;
pm_customMessagePresets - > insertItem ( " Amor " , this , TQ_ SLOT( slotSetAmorCustomMessage ( ) ) ) ;
b_customMessagePresets - > setPopup ( pm_customMessagePresets ) ;
KPushButton * b_testCustomMessage = new KPushButton ( KStdGuiItem : : test ( ) , w_customMessage , " KPushButton::b_testCustomMessage " ) ;
connect ( b_testCustomMessage , SIGNAL( clicked ( ) ) , SLOT( slotCustomMessageTest ( ) ) ) ;
connect ( b_testCustomMessage , TQ_ SIGNAL( clicked ( ) ) , TQ_ SLOT( slotCustomMessageTest ( ) ) ) ;
l_customMessage - > addWidget ( c_customMessageEnabled ) ;
l_customMessage - > addWidget ( l_customMessageCommand ) ;
l_customMessage - > addWidget ( in_customMessageCommand ) ;
@ -359,7 +359,7 @@ void MSettingsDialog::initMessagesPage()
" <b>Do not show this message again</b> feature. "
) )
) ;
connect ( b_enableAllMessages , SIGNAL( clicked ( ) ) , SLOT( slotEnableAllMessages ( ) ) ) ;
connect ( b_enableAllMessages , TQ_ SIGNAL( clicked ( ) ) , TQ_ SLOT( slotEnableAllMessages ( ) ) ) ;
l - > addWidget ( t_messages ) ;
l - > addWidget ( w_progressBar ) ;
@ -367,20 +367,20 @@ void MSettingsDialog::initMessagesPage()
l - > addWidget ( b_enableAllMessages ) ;
connect (
c_warningMessageEnabled , SIGNAL( toggled ( bool ) ) ,
in_warningMessageDelay , SLOT( setEnabled ( bool ) ) ) ;
c_warningMessageEnabled , TQ_ SIGNAL( toggled ( bool ) ) ,
in_warningMessageDelay , TQ_ SLOT( setEnabled ( bool ) ) ) ;
connect (
c_warningMessageEnabled , SIGNAL( toggled ( bool ) ) ,
b_warningMessageTest , SLOT( setEnabled ( bool ) ) ) ;
c_warningMessageEnabled , TQ_ SIGNAL( toggled ( bool ) ) ,
b_warningMessageTest , TQ_ SLOT( setEnabled ( bool ) ) ) ;
connect (
c_customMessageEnabled , SIGNAL( toggled ( bool ) ) ,
in_customMessageCommand , SLOT( setEnabled ( bool ) ) ) ;
c_customMessageEnabled , TQ_ SIGNAL( toggled ( bool ) ) ,
in_customMessageCommand , TQ_ SLOT( setEnabled ( bool ) ) ) ;
connect (
c_customMessageEnabled , SIGNAL( toggled ( bool ) ) ,
b_customMessagePresets , SLOT( setEnabled ( bool ) ) ) ;
c_customMessageEnabled , TQ_ SIGNAL( toggled ( bool ) ) ,
b_customMessagePresets , TQ_ SLOT( setEnabled ( bool ) ) ) ;
connect (
c_customMessageEnabled , SIGNAL( toggled ( bool ) ) ,
b_testCustomMessage , SLOT( setEnabled ( bool ) ) ) ;
c_customMessageEnabled , TQ_ SIGNAL( toggled ( bool ) ) ,
b_testCustomMessage , TQ_ SLOT( setEnabled ( bool ) ) ) ;
}
Action : : Type MSettingsDialog : : itemToActionType ( const TDEListViewItem * item ) const