|
|
|
@ -108,7 +108,7 @@ Smb4TDEConfigDialog::Smb4TDEConfigDialog( Smb4KSettings *settings, TQWidget *par
|
|
|
|
|
// done by the core. We only need to disable widgets here.
|
|
|
|
|
if ( Smb4KSettings::sudo().isEmpty() )
|
|
|
|
|
{
|
|
|
|
|
TQRadioButton *sudo = static_cast<TQRadioButton *>( TQT_TQWIDGET(super_user_options->child( "SudoButton", TQRADIOBUTTON_OBJECT_NAME_STRING, true )) );
|
|
|
|
|
TQRadioButton *sudo = static_cast<TQRadioButton *>( TQT_TQWIDGET(super_user_options->child( "SudoButton", "TQRadioButton", true )) );
|
|
|
|
|
|
|
|
|
|
if ( sudo )
|
|
|
|
|
{
|
|
|
|
@ -117,7 +117,7 @@ Smb4TDEConfigDialog::Smb4TDEConfigDialog( Smb4KSettings *settings, TQWidget *par
|
|
|
|
|
}
|
|
|
|
|
else if ( Smb4KSettings::super().isEmpty() )
|
|
|
|
|
{
|
|
|
|
|
TQRadioButton *super = static_cast<TQRadioButton *>( TQT_TQWIDGET(super_user_options->child( "SuperButton", TQRADIOBUTTON_OBJECT_NAME_STRING, true )) );
|
|
|
|
|
TQRadioButton *super = static_cast<TQRadioButton *>( TQT_TQWIDGET(super_user_options->child( "SuperButton", "TQRadioButton", true )) );
|
|
|
|
|
|
|
|
|
|
if ( super )
|
|
|
|
|
{
|
|
|
|
@ -568,12 +568,12 @@ void Smb4TDEConfigDialog::saveAuthenticationData()
|
|
|
|
|
|
|
|
|
|
bool Smb4TDEConfigDialog::writeSuperUserEntries()
|
|
|
|
|
{
|
|
|
|
|
TQRadioButton *sudo = static_cast<TQRadioButton *>( TQT_TQWIDGET(child( "SudoButton", TQRADIOBUTTON_OBJECT_NAME_STRING, true )) );
|
|
|
|
|
TQRadioButton *super = static_cast<TQRadioButton *>( TQT_TQWIDGET(child( "SuperButton", TQRADIOBUTTON_OBJECT_NAME_STRING, true )) );
|
|
|
|
|
TQRadioButton *sudo = static_cast<TQRadioButton *>( TQT_TQWIDGET(child( "SudoButton", "TQRadioButton", true )) );
|
|
|
|
|
TQRadioButton *super = static_cast<TQRadioButton *>( TQT_TQWIDGET(child( "SuperButton", "TQRadioButton", true )) );
|
|
|
|
|
#ifdef __linux__
|
|
|
|
|
TQCheckBox *force = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseForceUnmount", TQCHECKBOX_OBJECT_NAME_STRING, true )) );
|
|
|
|
|
TQCheckBox *force = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseForceUnmount", "TQCheckBox", true )) );
|
|
|
|
|
#endif
|
|
|
|
|
TQCheckBox *full_use = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_AlwaysUseSuperUser", TQCHECKBOX_OBJECT_NAME_STRING, true )) );
|
|
|
|
|
TQCheckBox *full_use = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_AlwaysUseSuperUser", "TQCheckBox", true )) );
|
|
|
|
|
|
|
|
|
|
// Check if we need to write anything at all:
|
|
|
|
|
Smb4KFileIO::Operation op = Smb4KFileIO::NoOperation;
|
|
|
|
@ -640,12 +640,12 @@ bool Smb4TDEConfigDialog::writeSuperUserEntries()
|
|
|
|
|
|
|
|
|
|
void Smb4TDEConfigDialog::removeSuperUserEntries()
|
|
|
|
|
{
|
|
|
|
|
TQRadioButton *sudo = static_cast<TQRadioButton *>( TQT_TQWIDGET(child( "SudoButton", TQRADIOBUTTON_OBJECT_NAME_STRING, true )) );
|
|
|
|
|
TQRadioButton *super = static_cast<TQRadioButton *>( TQT_TQWIDGET(child( "SuperButton", TQRADIOBUTTON_OBJECT_NAME_STRING, true )) );
|
|
|
|
|
TQRadioButton *sudo = static_cast<TQRadioButton *>( TQT_TQWIDGET(child( "SudoButton", "TQRadioButton", true )) );
|
|
|
|
|
TQRadioButton *super = static_cast<TQRadioButton *>( TQT_TQWIDGET(child( "SuperButton", "TQRadioButton", true )) );
|
|
|
|
|
#ifdef __linux__
|
|
|
|
|
TQCheckBox *force = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseForceUnmount", TQCHECKBOX_OBJECT_NAME_STRING, true )) );
|
|
|
|
|
TQCheckBox *force = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseForceUnmount", "TQCheckBox", true )) );
|
|
|
|
|
#endif
|
|
|
|
|
TQCheckBox *full_use = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_AlwaysUseSuperUser", TQCHECKBOX_OBJECT_NAME_STRING, true )) );
|
|
|
|
|
TQCheckBox *full_use = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_AlwaysUseSuperUser", "TQCheckBox", true )) );
|
|
|
|
|
|
|
|
|
|
#ifdef __linux__
|
|
|
|
|
if ( sudo && super && force && full_use )
|
|
|
|
@ -694,7 +694,7 @@ bool Smb4TDEConfigDialog::checkSettings()
|
|
|
|
|
|
|
|
|
|
// If the user chose "Query custom master browser" in the
|
|
|
|
|
// "Network" tab, there must be a master browser present:
|
|
|
|
|
TQRadioButton *query_custom_master = static_cast<TQRadioButton *>( TQT_TQWIDGET(child( "CustomMasterBrowserLabel", TQRADIOBUTTON_OBJECT_NAME_STRING, true )) );
|
|
|
|
|
TQRadioButton *query_custom_master = static_cast<TQRadioButton *>( TQT_TQWIDGET(child( "CustomMasterBrowserLabel", "TQRadioButton", true )) );
|
|
|
|
|
KLineEdit *custom_master_input = static_cast<KLineEdit *>( TQT_TQWIDGET(child( "kcfg_CustomMasterBrowser", "KLineEdit", true )) );
|
|
|
|
|
|
|
|
|
|
if ( query_custom_master && custom_master_input &&
|
|
|
|
@ -709,7 +709,7 @@ bool Smb4TDEConfigDialog::checkSettings()
|
|
|
|
|
|
|
|
|
|
// If the user chose "Scan broadcast areas" in the
|
|
|
|
|
// "Network" tab, there must broadcast areas present:
|
|
|
|
|
TQRadioButton *scan_bcast_areas = static_cast<TQRadioButton *>( TQT_TQWIDGET(child( "BroadcastAreasLabel", TQRADIOBUTTON_OBJECT_NAME_STRING, true )) );
|
|
|
|
|
TQRadioButton *scan_bcast_areas = static_cast<TQRadioButton *>( TQT_TQWIDGET(child( "BroadcastAreasLabel", "TQRadioButton", true )) );
|
|
|
|
|
KLineEdit *bcast_areas_input = static_cast<KLineEdit *>( TQT_TQWIDGET(child( "kcfg_BroadcastAreas", "KLineEdit", true )) );
|
|
|
|
|
|
|
|
|
|
if ( scan_bcast_areas && bcast_areas_input &&
|
|
|
|
@ -735,7 +735,7 @@ bool Smb4TDEConfigDialog::checkSettings()
|
|
|
|
|
|
|
|
|
|
// If the user wants to use a default login, the user
|
|
|
|
|
// name must not be empty.
|
|
|
|
|
TQCheckBox *use_default_login = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseDefaultLogin", TQCHECKBOX_OBJECT_NAME_STRING, true )) );
|
|
|
|
|
TQCheckBox *use_default_login = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseDefaultLogin", "TQCheckBox", true )) );
|
|
|
|
|
KLineEdit *default_user_name = static_cast<KLineEdit *>( TQT_TQWIDGET(child( "kcfg_DefaultUserName", "KLineEdit", true )) );
|
|
|
|
|
|
|
|
|
|
if ( use_default_login && default_user_name &&
|
|
|
|
@ -804,7 +804,7 @@ bool Smb4TDEConfigDialog::checkSettings()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// The path where to store partial files must not be empty.
|
|
|
|
|
TQCheckBox *use_partical_directory = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UsePartialDirectory", TQCHECKBOX_OBJECT_NAME_STRING, true )) );
|
|
|
|
|
TQCheckBox *use_partical_directory = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UsePartialDirectory", "TQCheckBox", true )) );
|
|
|
|
|
KURLRequester *partial_directory = static_cast<KURLRequester *>( TQT_TQWIDGET(child( "kcfg_PartialDirectory", "KURLRequester", true )) );
|
|
|
|
|
|
|
|
|
|
if ( use_partical_directory && use_partical_directory->isChecked() &&
|
|
|
|
@ -817,7 +817,7 @@ bool Smb4TDEConfigDialog::checkSettings()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// The the exclude patterns must not be empty.
|
|
|
|
|
TQCheckBox *use_exclude_pattern = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseExcludePattern", TQCHECKBOX_OBJECT_NAME_STRING, true )) );
|
|
|
|
|
TQCheckBox *use_exclude_pattern = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseExcludePattern", "TQCheckBox", true )) );
|
|
|
|
|
KLineEdit *exclude_pattern = static_cast<KLineEdit *>( TQT_TQWIDGET(child( "kcfg_ExcludePattern", "KLineEdit", true )) );
|
|
|
|
|
|
|
|
|
|
if ( use_exclude_pattern && use_exclude_pattern->isChecked() &&
|
|
|
|
@ -830,7 +830,7 @@ bool Smb4TDEConfigDialog::checkSettings()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// The the path of the exclude file must not be empty.
|
|
|
|
|
TQCheckBox *use_exclude_file = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseExcludeFrom", TQCHECKBOX_OBJECT_NAME_STRING, true )) );
|
|
|
|
|
TQCheckBox *use_exclude_file = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseExcludeFrom", "TQCheckBox", true )) );
|
|
|
|
|
KURLRequester *exclude_file = static_cast<KURLRequester *>( TQT_TQWIDGET(child( "kcfg_ExcludeFrom", "KURLRequester", true )) );
|
|
|
|
|
|
|
|
|
|
if ( use_exclude_file && use_exclude_file->isChecked() &&
|
|
|
|
@ -843,7 +843,7 @@ bool Smb4TDEConfigDialog::checkSettings()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// The the include patterns must not be empty.
|
|
|
|
|
TQCheckBox *use_include_pattern = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseIncludePattern", TQCHECKBOX_OBJECT_NAME_STRING, true )) );
|
|
|
|
|
TQCheckBox *use_include_pattern = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseIncludePattern", "TQCheckBox", true )) );
|
|
|
|
|
KLineEdit *include_pattern = static_cast<KLineEdit *>( TQT_TQWIDGET(child( "kcfg_IncludePattern", "KLineEdit", true )) );
|
|
|
|
|
|
|
|
|
|
if ( use_include_pattern && use_include_pattern->isChecked() &&
|
|
|
|
@ -856,7 +856,7 @@ bool Smb4TDEConfigDialog::checkSettings()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// The the path of the exclude file must not be empty.
|
|
|
|
|
TQCheckBox *use_include_file = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseIncludeFrom", TQCHECKBOX_OBJECT_NAME_STRING, true )) );
|
|
|
|
|
TQCheckBox *use_include_file = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseIncludeFrom", "TQCheckBox", true )) );
|
|
|
|
|
KURLRequester *include_file = static_cast<KURLRequester *>( TQT_TQWIDGET(child( "kcfg_IncludeFrom", "KURLRequester", true )) );
|
|
|
|
|
|
|
|
|
|
if ( use_include_file && use_include_file->isChecked() &&
|
|
|
|
@ -870,12 +870,12 @@ bool Smb4TDEConfigDialog::checkSettings()
|
|
|
|
|
|
|
|
|
|
// If you make backups, check that the suffix and that the
|
|
|
|
|
// backup directory is not empty.
|
|
|
|
|
TQCheckBox *make_backups = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_MakeBackups", TQCHECKBOX_OBJECT_NAME_STRING, true )) );
|
|
|
|
|
TQCheckBox *make_backups = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_MakeBackups", "TQCheckBox", true )) );
|
|
|
|
|
|
|
|
|
|
if ( make_backups && make_backups->isChecked() )
|
|
|
|
|
{
|
|
|
|
|
// The backup suffix must not be empty.
|
|
|
|
|
TQCheckBox *use_backup_suffix = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseBackupSuffix", TQCHECKBOX_OBJECT_NAME_STRING, true )) );
|
|
|
|
|
TQCheckBox *use_backup_suffix = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseBackupSuffix", "TQCheckBox", true )) );
|
|
|
|
|
KLineEdit *backup_suffix = static_cast<KLineEdit *>( TQT_TQWIDGET(child( "kcfg_BackupSuffix", "KLineEdit", true )) );
|
|
|
|
|
|
|
|
|
|
if ( use_backup_suffix && use_backup_suffix->isChecked() &&
|
|
|
|
@ -888,7 +888,7 @@ bool Smb4TDEConfigDialog::checkSettings()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// The the path for backups must not be empty.
|
|
|
|
|
TQCheckBox *use_backup_dir = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseBackupDirectory", TQCHECKBOX_OBJECT_NAME_STRING, true )) );
|
|
|
|
|
TQCheckBox *use_backup_dir = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseBackupDirectory", "TQCheckBox", true )) );
|
|
|
|
|
KURLRequester *backup_dir = static_cast<KURLRequester *>( TQT_TQWIDGET(child( "kcfg_BackupDirectory", "KURLRequester", true )) );
|
|
|
|
|
|
|
|
|
|
if ( use_backup_dir && use_backup_dir->isChecked() &&
|
|
|
|
@ -1136,9 +1136,9 @@ void Smb4TDEConfigDialog::slotRemoveSuperUserEntries()
|
|
|
|
|
void Smb4TDEConfigDialog::slotReceivedFileIOFailed()
|
|
|
|
|
{
|
|
|
|
|
#ifdef __linux__
|
|
|
|
|
TQCheckBox *force = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseForceUnmount", TQCHECKBOX_OBJECT_NAME_STRING, true )) );
|
|
|
|
|
TQCheckBox *force = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseForceUnmount", "TQCheckBox", true )) );
|
|
|
|
|
#endif
|
|
|
|
|
TQCheckBox *full_use = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_AlwaysUseSuperUser", TQCHECKBOX_OBJECT_NAME_STRING, true )) );
|
|
|
|
|
TQCheckBox *full_use = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_AlwaysUseSuperUser", "TQCheckBox", true )) );
|
|
|
|
|
|
|
|
|
|
#ifdef __linux__
|
|
|
|
|
if ( force && full_use )
|
|
|
|
|