|
|
@ -108,7 +108,7 @@ Smb4TDEConfigDialog::Smb4TDEConfigDialog( Smb4KSettings *settings, TQWidget *par
|
|
|
|
// done by the core. We only need to disable widgets here.
|
|
|
|
// done by the core. We only need to disable widgets here.
|
|
|
|
if ( Smb4KSettings::sudo().isEmpty() )
|
|
|
|
if ( Smb4KSettings::sudo().isEmpty() )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQRadioButton *sudo = static_cast<TQRadioButton *>( TQT_TQWIDGET(super_user_options->child( "SudoButton", "TQRadioButton", true )) );
|
|
|
|
TQRadioButton *sudo = static_cast<TQRadioButton *>( super_user_options->child( "SudoButton", "TQRadioButton", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( sudo )
|
|
|
|
if ( sudo )
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -117,7 +117,7 @@ Smb4TDEConfigDialog::Smb4TDEConfigDialog( Smb4KSettings *settings, TQWidget *par
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ( Smb4KSettings::super().isEmpty() )
|
|
|
|
else if ( Smb4KSettings::super().isEmpty() )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQRadioButton *super = static_cast<TQRadioButton *>( TQT_TQWIDGET(super_user_options->child( "SuperButton", "TQRadioButton", true )) );
|
|
|
|
TQRadioButton *super = static_cast<TQRadioButton *>( super_user_options->child( "SuperButton", "TQRadioButton", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( super )
|
|
|
|
if ( super )
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -196,7 +196,7 @@ Smb4TDEConfigDialog::~Smb4TDEConfigDialog()
|
|
|
|
void Smb4TDEConfigDialog::loadCustomSambaOptions()
|
|
|
|
void Smb4TDEConfigDialog::loadCustomSambaOptions()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Get the list view:
|
|
|
|
// Get the list view:
|
|
|
|
TDEListView *custom_list = static_cast<TDEListView *>( TQT_TQWIDGET(child( "CustomOptionsList", "TDEListView", true )) );
|
|
|
|
TDEListView *custom_list = static_cast<TDEListView *>( child( "CustomOptionsList", "TDEListView", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( !custom_list )
|
|
|
|
if ( !custom_list )
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -380,7 +380,7 @@ void Smb4TDEConfigDialog::loadCustomSambaOptions()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Smb4KSambaOptions *samba_options = static_cast<Smb4KSambaOptions *>( TQT_TQWIDGET(child( "SambaOptions", "Smb4KSambaOptions", true )) );
|
|
|
|
Smb4KSambaOptions *samba_options = static_cast<Smb4KSambaOptions *>( child( "SambaOptions", "Smb4KSambaOptions", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( samba_options )
|
|
|
|
if ( samba_options )
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -392,7 +392,7 @@ void Smb4TDEConfigDialog::loadCustomSambaOptions()
|
|
|
|
void Smb4TDEConfigDialog::saveCustomSambaOptions()
|
|
|
|
void Smb4TDEConfigDialog::saveCustomSambaOptions()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Get the list view:
|
|
|
|
// Get the list view:
|
|
|
|
TDEListView *custom_list = static_cast<TDEListView *>( TQT_TQWIDGET(child( "CustomOptionsList", "TDEListView", true )) );
|
|
|
|
TDEListView *custom_list = static_cast<TDEListView *>( child( "CustomOptionsList", "TDEListView", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( !custom_list )
|
|
|
|
if ( !custom_list )
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -517,14 +517,14 @@ void Smb4TDEConfigDialog::loadAuthenticationData()
|
|
|
|
|
|
|
|
|
|
|
|
(void) passwordHandler()->readDefaultAuth( &auth );
|
|
|
|
(void) passwordHandler()->readDefaultAuth( &auth );
|
|
|
|
|
|
|
|
|
|
|
|
KLineEdit *default_user = static_cast<KLineEdit *>( TQT_TQWIDGET(child( "DefaultUserName", "KLineEdit", true )) );
|
|
|
|
KLineEdit *default_user = static_cast<KLineEdit *>( child( "DefaultUserName", "KLineEdit", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( default_user )
|
|
|
|
if ( default_user )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
default_user->setText( auth.user() );
|
|
|
|
default_user->setText( auth.user() );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
KLineEdit *default_pass = static_cast<KLineEdit *>( TQT_TQWIDGET(child( "DefaultPassword", "KLineEdit", true )) );
|
|
|
|
KLineEdit *default_pass = static_cast<KLineEdit *>( child( "DefaultPassword", "KLineEdit", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( default_pass )
|
|
|
|
if ( default_pass )
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -543,14 +543,14 @@ void Smb4TDEConfigDialog::saveAuthenticationData()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Smb4KAuthInfo auth( TQString::null, TQString::null, TQString::null );
|
|
|
|
Smb4KAuthInfo auth( TQString::null, TQString::null, TQString::null );
|
|
|
|
|
|
|
|
|
|
|
|
KLineEdit *default_user = static_cast<KLineEdit *>( TQT_TQWIDGET(child( "DefaultUserName", "KLineEdit", true )) );
|
|
|
|
KLineEdit *default_user = static_cast<KLineEdit *>( child( "DefaultUserName", "KLineEdit", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( default_user )
|
|
|
|
if ( default_user )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
auth.setUser( default_user->text() );
|
|
|
|
auth.setUser( default_user->text() );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
KLineEdit *default_pass = static_cast<KLineEdit *>( TQT_TQWIDGET(child( "DefaultPassword", "KLineEdit", true )) );
|
|
|
|
KLineEdit *default_pass = static_cast<KLineEdit *>( child( "DefaultPassword", "KLineEdit", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( default_pass )
|
|
|
|
if ( default_pass )
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -568,12 +568,12 @@ void Smb4TDEConfigDialog::saveAuthenticationData()
|
|
|
|
|
|
|
|
|
|
|
|
bool Smb4TDEConfigDialog::writeSuperUserEntries()
|
|
|
|
bool Smb4TDEConfigDialog::writeSuperUserEntries()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQRadioButton *sudo = static_cast<TQRadioButton *>( TQT_TQWIDGET(child( "SudoButton", "TQRadioButton", true )) );
|
|
|
|
TQRadioButton *sudo = static_cast<TQRadioButton *>( child( "SudoButton", "TQRadioButton", true ) );
|
|
|
|
TQRadioButton *super = static_cast<TQRadioButton *>( TQT_TQWIDGET(child( "SuperButton", "TQRadioButton", true )) );
|
|
|
|
TQRadioButton *super = static_cast<TQRadioButton *>( child( "SuperButton", "TQRadioButton", true ) );
|
|
|
|
#ifdef __linux__
|
|
|
|
#ifdef __linux__
|
|
|
|
TQCheckBox *force = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseForceUnmount", "TQCheckBox", true )) );
|
|
|
|
TQCheckBox *force = static_cast<TQCheckBox *>( child( "kcfg_UseForceUnmount", "TQCheckBox", true ) );
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
TQCheckBox *full_use = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_AlwaysUseSuperUser", "TQCheckBox", true )) );
|
|
|
|
TQCheckBox *full_use = static_cast<TQCheckBox *>( child( "kcfg_AlwaysUseSuperUser", "TQCheckBox", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
// Check if we need to write anything at all:
|
|
|
|
// Check if we need to write anything at all:
|
|
|
|
Smb4KFileIO::Operation op = Smb4KFileIO::NoOperation;
|
|
|
|
Smb4KFileIO::Operation op = Smb4KFileIO::NoOperation;
|
|
|
@ -640,12 +640,12 @@ bool Smb4TDEConfigDialog::writeSuperUserEntries()
|
|
|
|
|
|
|
|
|
|
|
|
void Smb4TDEConfigDialog::removeSuperUserEntries()
|
|
|
|
void Smb4TDEConfigDialog::removeSuperUserEntries()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
TQRadioButton *sudo = static_cast<TQRadioButton *>( TQT_TQWIDGET(child( "SudoButton", "TQRadioButton", true )) );
|
|
|
|
TQRadioButton *sudo = static_cast<TQRadioButton *>( child( "SudoButton", "TQRadioButton", true ) );
|
|
|
|
TQRadioButton *super = static_cast<TQRadioButton *>( TQT_TQWIDGET(child( "SuperButton", "TQRadioButton", true )) );
|
|
|
|
TQRadioButton *super = static_cast<TQRadioButton *>( child( "SuperButton", "TQRadioButton", true ) );
|
|
|
|
#ifdef __linux__
|
|
|
|
#ifdef __linux__
|
|
|
|
TQCheckBox *force = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseForceUnmount", "TQCheckBox", true )) );
|
|
|
|
TQCheckBox *force = static_cast<TQCheckBox *>( child( "kcfg_UseForceUnmount", "TQCheckBox", true ) );
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
TQCheckBox *full_use = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_AlwaysUseSuperUser", "TQCheckBox", true )) );
|
|
|
|
TQCheckBox *full_use = static_cast<TQCheckBox *>( child( "kcfg_AlwaysUseSuperUser", "TQCheckBox", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __linux__
|
|
|
|
#ifdef __linux__
|
|
|
|
if ( sudo && super && force && full_use )
|
|
|
|
if ( sudo && super && force && full_use )
|
|
|
@ -694,8 +694,8 @@ bool Smb4TDEConfigDialog::checkSettings()
|
|
|
|
|
|
|
|
|
|
|
|
// If the user chose "Query custom master browser" in the
|
|
|
|
// If the user chose "Query custom master browser" in the
|
|
|
|
// "Network" tab, there must be a master browser present:
|
|
|
|
// "Network" tab, there must be a master browser present:
|
|
|
|
TQRadioButton *query_custom_master = static_cast<TQRadioButton *>( TQT_TQWIDGET(child( "CustomMasterBrowserLabel", "TQRadioButton", true )) );
|
|
|
|
TQRadioButton *query_custom_master = static_cast<TQRadioButton *>( child( "CustomMasterBrowserLabel", "TQRadioButton", true ) );
|
|
|
|
KLineEdit *custom_master_input = static_cast<KLineEdit *>( TQT_TQWIDGET(child( "kcfg_CustomMasterBrowser", "KLineEdit", true )) );
|
|
|
|
KLineEdit *custom_master_input = static_cast<KLineEdit *>( child( "kcfg_CustomMasterBrowser", "KLineEdit", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( query_custom_master && custom_master_input &&
|
|
|
|
if ( query_custom_master && custom_master_input &&
|
|
|
|
query_custom_master->isChecked() &&
|
|
|
|
query_custom_master->isChecked() &&
|
|
|
@ -709,8 +709,8 @@ bool Smb4TDEConfigDialog::checkSettings()
|
|
|
|
|
|
|
|
|
|
|
|
// If the user chose "Scan broadcast areas" in the
|
|
|
|
// If the user chose "Scan broadcast areas" in the
|
|
|
|
// "Network" tab, there must broadcast areas present:
|
|
|
|
// "Network" tab, there must broadcast areas present:
|
|
|
|
TQRadioButton *scan_bcast_areas = static_cast<TQRadioButton *>( TQT_TQWIDGET(child( "BroadcastAreasLabel", "TQRadioButton", true )) );
|
|
|
|
TQRadioButton *scan_bcast_areas = static_cast<TQRadioButton *>( child( "BroadcastAreasLabel", "TQRadioButton", true ) );
|
|
|
|
KLineEdit *bcast_areas_input = static_cast<KLineEdit *>( TQT_TQWIDGET(child( "kcfg_BroadcastAreas", "KLineEdit", true )) );
|
|
|
|
KLineEdit *bcast_areas_input = static_cast<KLineEdit *>( child( "kcfg_BroadcastAreas", "KLineEdit", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( scan_bcast_areas && bcast_areas_input &&
|
|
|
|
if ( scan_bcast_areas && bcast_areas_input &&
|
|
|
|
scan_bcast_areas->isChecked() &&
|
|
|
|
scan_bcast_areas->isChecked() &&
|
|
|
@ -723,7 +723,7 @@ bool Smb4TDEConfigDialog::checkSettings()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// The mount prefix must not be empty:
|
|
|
|
// The mount prefix must not be empty:
|
|
|
|
KURLRequester *mount_prefix = static_cast<KURLRequester *>( TQT_TQWIDGET(child( "kcfg_MountPrefix", "KURLRequester", true )) );
|
|
|
|
KURLRequester *mount_prefix = static_cast<KURLRequester *>( child( "kcfg_MountPrefix", "KURLRequester", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( mount_prefix && mount_prefix->url().stripWhiteSpace().isEmpty() )
|
|
|
|
if ( mount_prefix && mount_prefix->url().stripWhiteSpace().isEmpty() )
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -735,8 +735,8 @@ bool Smb4TDEConfigDialog::checkSettings()
|
|
|
|
|
|
|
|
|
|
|
|
// If the user wants to use a default login, the user
|
|
|
|
// If the user wants to use a default login, the user
|
|
|
|
// name must not be empty.
|
|
|
|
// name must not be empty.
|
|
|
|
TQCheckBox *use_default_login = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseDefaultLogin", "TQCheckBox", true )) );
|
|
|
|
TQCheckBox *use_default_login = static_cast<TQCheckBox *>( child( "kcfg_UseDefaultLogin", "TQCheckBox", true ) );
|
|
|
|
KLineEdit *default_user_name = static_cast<KLineEdit *>( TQT_TQWIDGET(child( "kcfg_DefaultUserName", "KLineEdit", true )) );
|
|
|
|
KLineEdit *default_user_name = static_cast<KLineEdit *>( child( "kcfg_DefaultUserName", "KLineEdit", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( use_default_login && default_user_name &&
|
|
|
|
if ( use_default_login && default_user_name &&
|
|
|
|
use_default_login->isChecked() &&
|
|
|
|
use_default_login->isChecked() &&
|
|
|
@ -749,7 +749,7 @@ bool Smb4TDEConfigDialog::checkSettings()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// The file mask must not be empty.
|
|
|
|
// The file mask must not be empty.
|
|
|
|
KLineEdit *file_mask = static_cast<KLineEdit *>( TQT_TQWIDGET(child( "kcfg_FileMask", "KLineEdit", true )) );
|
|
|
|
KLineEdit *file_mask = static_cast<KLineEdit *>( child( "kcfg_FileMask", "KLineEdit", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( file_mask && file_mask->text().stripWhiteSpace().isEmpty() )
|
|
|
|
if ( file_mask && file_mask->text().stripWhiteSpace().isEmpty() )
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -760,7 +760,7 @@ bool Smb4TDEConfigDialog::checkSettings()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// The directory mask must not be empty.
|
|
|
|
// The directory mask must not be empty.
|
|
|
|
KLineEdit *directory_mask = static_cast<KLineEdit *>( TQT_TQWIDGET(child( "kcfg_DirectoryMask", "KLineEdit", true )) );
|
|
|
|
KLineEdit *directory_mask = static_cast<KLineEdit *>( child( "kcfg_DirectoryMask", "KLineEdit", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( directory_mask && directory_mask->text().stripWhiteSpace().isEmpty() )
|
|
|
|
if ( directory_mask && directory_mask->text().stripWhiteSpace().isEmpty() )
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -771,7 +771,7 @@ bool Smb4TDEConfigDialog::checkSettings()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// The UID must not be empty.
|
|
|
|
// The UID must not be empty.
|
|
|
|
KLineEdit *user_id = static_cast<KLineEdit *>( TQT_TQWIDGET(child( "kcfg_UserID", "KLineEdit", true )) );
|
|
|
|
KLineEdit *user_id = static_cast<KLineEdit *>( child( "kcfg_UserID", "KLineEdit", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( user_id && user_id->text().stripWhiteSpace().isEmpty() )
|
|
|
|
if ( user_id && user_id->text().stripWhiteSpace().isEmpty() )
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -782,7 +782,7 @@ bool Smb4TDEConfigDialog::checkSettings()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// The GID must not be empty.
|
|
|
|
// The GID must not be empty.
|
|
|
|
KLineEdit *group_id = static_cast<KLineEdit *>( TQT_TQWIDGET(child( "kcfg_GroupID", "KLineEdit", true )) );
|
|
|
|
KLineEdit *group_id = static_cast<KLineEdit *>( child( "kcfg_GroupID", "KLineEdit", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( group_id && group_id->text().stripWhiteSpace().isEmpty() )
|
|
|
|
if ( group_id && group_id->text().stripWhiteSpace().isEmpty() )
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -793,7 +793,7 @@ bool Smb4TDEConfigDialog::checkSettings()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// The rsync prefix must not be empty.
|
|
|
|
// The rsync prefix must not be empty.
|
|
|
|
KURLRequester *rsync_prefix = static_cast<KURLRequester *>( TQT_TQWIDGET(child( "kcfg_RsyncPrefix", "KURLRequester", true )) );
|
|
|
|
KURLRequester *rsync_prefix = static_cast<KURLRequester *>( child( "kcfg_RsyncPrefix", "KURLRequester", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( rsync_prefix && rsync_prefix->url().stripWhiteSpace().isEmpty() )
|
|
|
|
if ( rsync_prefix && rsync_prefix->url().stripWhiteSpace().isEmpty() )
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -804,8 +804,8 @@ bool Smb4TDEConfigDialog::checkSettings()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// The path where to store partial files must not be empty.
|
|
|
|
// The path where to store partial files must not be empty.
|
|
|
|
TQCheckBox *use_partical_directory = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UsePartialDirectory", "TQCheckBox", true )) );
|
|
|
|
TQCheckBox *use_partical_directory = static_cast<TQCheckBox *>( child( "kcfg_UsePartialDirectory", "TQCheckBox", true ) );
|
|
|
|
KURLRequester *partial_directory = static_cast<KURLRequester *>( TQT_TQWIDGET(child( "kcfg_PartialDirectory", "KURLRequester", true )) );
|
|
|
|
KURLRequester *partial_directory = static_cast<KURLRequester *>( child( "kcfg_PartialDirectory", "KURLRequester", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( use_partical_directory && use_partical_directory->isChecked() &&
|
|
|
|
if ( use_partical_directory && use_partical_directory->isChecked() &&
|
|
|
|
partial_directory && partial_directory->url().stripWhiteSpace().isEmpty() )
|
|
|
|
partial_directory && partial_directory->url().stripWhiteSpace().isEmpty() )
|
|
|
@ -817,8 +817,8 @@ bool Smb4TDEConfigDialog::checkSettings()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// The the exclude patterns must not be empty.
|
|
|
|
// The the exclude patterns must not be empty.
|
|
|
|
TQCheckBox *use_exclude_pattern = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseExcludePattern", "TQCheckBox", true )) );
|
|
|
|
TQCheckBox *use_exclude_pattern = static_cast<TQCheckBox *>( child( "kcfg_UseExcludePattern", "TQCheckBox", true ) );
|
|
|
|
KLineEdit *exclude_pattern = static_cast<KLineEdit *>( TQT_TQWIDGET(child( "kcfg_ExcludePattern", "KLineEdit", true )) );
|
|
|
|
KLineEdit *exclude_pattern = static_cast<KLineEdit *>( child( "kcfg_ExcludePattern", "KLineEdit", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( use_exclude_pattern && use_exclude_pattern->isChecked() &&
|
|
|
|
if ( use_exclude_pattern && use_exclude_pattern->isChecked() &&
|
|
|
|
exclude_pattern && exclude_pattern->text().stripWhiteSpace().isEmpty() )
|
|
|
|
exclude_pattern && exclude_pattern->text().stripWhiteSpace().isEmpty() )
|
|
|
@ -830,8 +830,8 @@ bool Smb4TDEConfigDialog::checkSettings()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// The the path of the exclude file must not be empty.
|
|
|
|
// The the path of the exclude file must not be empty.
|
|
|
|
TQCheckBox *use_exclude_file = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseExcludeFrom", "TQCheckBox", true )) );
|
|
|
|
TQCheckBox *use_exclude_file = static_cast<TQCheckBox *>( child( "kcfg_UseExcludeFrom", "TQCheckBox", true ) );
|
|
|
|
KURLRequester *exclude_file = static_cast<KURLRequester *>( TQT_TQWIDGET(child( "kcfg_ExcludeFrom", "KURLRequester", true )) );
|
|
|
|
KURLRequester *exclude_file = static_cast<KURLRequester *>( child( "kcfg_ExcludeFrom", "KURLRequester", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( use_exclude_file && use_exclude_file->isChecked() &&
|
|
|
|
if ( use_exclude_file && use_exclude_file->isChecked() &&
|
|
|
|
exclude_file && exclude_file->url().stripWhiteSpace().isEmpty() )
|
|
|
|
exclude_file && exclude_file->url().stripWhiteSpace().isEmpty() )
|
|
|
@ -843,8 +843,8 @@ bool Smb4TDEConfigDialog::checkSettings()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// The the include patterns must not be empty.
|
|
|
|
// The the include patterns must not be empty.
|
|
|
|
TQCheckBox *use_include_pattern = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseIncludePattern", "TQCheckBox", true )) );
|
|
|
|
TQCheckBox *use_include_pattern = static_cast<TQCheckBox *>( child( "kcfg_UseIncludePattern", "TQCheckBox", true ) );
|
|
|
|
KLineEdit *include_pattern = static_cast<KLineEdit *>( TQT_TQWIDGET(child( "kcfg_IncludePattern", "KLineEdit", true )) );
|
|
|
|
KLineEdit *include_pattern = static_cast<KLineEdit *>( child( "kcfg_IncludePattern", "KLineEdit", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( use_include_pattern && use_include_pattern->isChecked() &&
|
|
|
|
if ( use_include_pattern && use_include_pattern->isChecked() &&
|
|
|
|
include_pattern && include_pattern->text().stripWhiteSpace().isEmpty() )
|
|
|
|
include_pattern && include_pattern->text().stripWhiteSpace().isEmpty() )
|
|
|
@ -856,8 +856,8 @@ bool Smb4TDEConfigDialog::checkSettings()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// The the path of the exclude file must not be empty.
|
|
|
|
// The the path of the exclude file must not be empty.
|
|
|
|
TQCheckBox *use_include_file = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseIncludeFrom", "TQCheckBox", true )) );
|
|
|
|
TQCheckBox *use_include_file = static_cast<TQCheckBox *>( child( "kcfg_UseIncludeFrom", "TQCheckBox", true ) );
|
|
|
|
KURLRequester *include_file = static_cast<KURLRequester *>( TQT_TQWIDGET(child( "kcfg_IncludeFrom", "KURLRequester", true )) );
|
|
|
|
KURLRequester *include_file = static_cast<KURLRequester *>( child( "kcfg_IncludeFrom", "KURLRequester", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( use_include_file && use_include_file->isChecked() &&
|
|
|
|
if ( use_include_file && use_include_file->isChecked() &&
|
|
|
|
include_file && include_file->url().stripWhiteSpace().isEmpty() )
|
|
|
|
include_file && include_file->url().stripWhiteSpace().isEmpty() )
|
|
|
@ -870,13 +870,13 @@ bool Smb4TDEConfigDialog::checkSettings()
|
|
|
|
|
|
|
|
|
|
|
|
// If you make backups, check that the suffix and that the
|
|
|
|
// If you make backups, check that the suffix and that the
|
|
|
|
// backup directory is not empty.
|
|
|
|
// backup directory is not empty.
|
|
|
|
TQCheckBox *make_backups = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_MakeBackups", "TQCheckBox", true )) );
|
|
|
|
TQCheckBox *make_backups = static_cast<TQCheckBox *>( child( "kcfg_MakeBackups", "TQCheckBox", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( make_backups && make_backups->isChecked() )
|
|
|
|
if ( make_backups && make_backups->isChecked() )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// The backup suffix must not be empty.
|
|
|
|
// The backup suffix must not be empty.
|
|
|
|
TQCheckBox *use_backup_suffix = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseBackupSuffix", "TQCheckBox", true )) );
|
|
|
|
TQCheckBox *use_backup_suffix = static_cast<TQCheckBox *>( child( "kcfg_UseBackupSuffix", "TQCheckBox", true ) );
|
|
|
|
KLineEdit *backup_suffix = static_cast<KLineEdit *>( TQT_TQWIDGET(child( "kcfg_BackupSuffix", "KLineEdit", true )) );
|
|
|
|
KLineEdit *backup_suffix = static_cast<KLineEdit *>( child( "kcfg_BackupSuffix", "KLineEdit", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( use_backup_suffix && use_backup_suffix->isChecked() &&
|
|
|
|
if ( use_backup_suffix && use_backup_suffix->isChecked() &&
|
|
|
|
backup_suffix && backup_suffix->text().stripWhiteSpace().isEmpty() )
|
|
|
|
backup_suffix && backup_suffix->text().stripWhiteSpace().isEmpty() )
|
|
|
@ -888,8 +888,8 @@ bool Smb4TDEConfigDialog::checkSettings()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// The the path for backups must not be empty.
|
|
|
|
// The the path for backups must not be empty.
|
|
|
|
TQCheckBox *use_backup_dir = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseBackupDirectory", "TQCheckBox", true )) );
|
|
|
|
TQCheckBox *use_backup_dir = static_cast<TQCheckBox *>( child( "kcfg_UseBackupDirectory", "TQCheckBox", true ) );
|
|
|
|
KURLRequester *backup_dir = static_cast<KURLRequester *>( TQT_TQWIDGET(child( "kcfg_BackupDirectory", "KURLRequester", true )) );
|
|
|
|
KURLRequester *backup_dir = static_cast<KURLRequester *>( child( "kcfg_BackupDirectory", "KURLRequester", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( use_backup_dir && use_backup_dir->isChecked() &&
|
|
|
|
if ( use_backup_dir && use_backup_dir->isChecked() &&
|
|
|
|
backup_dir && backup_dir->url().stripWhiteSpace().isEmpty() )
|
|
|
|
backup_dir && backup_dir->url().stripWhiteSpace().isEmpty() )
|
|
|
@ -996,7 +996,7 @@ void Smb4TDEConfigDialog::slotOk()
|
|
|
|
void Smb4TDEConfigDialog::slotCancel()
|
|
|
|
void Smb4TDEConfigDialog::slotCancel()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Reset the custom Samba options tab:
|
|
|
|
// Reset the custom Samba options tab:
|
|
|
|
Smb4KSambaOptions *samba_options = static_cast<Smb4KSambaOptions *>( TQT_TQWIDGET(child( "SambaOptions", "Smb4KSambaOptions", true )) );
|
|
|
|
Smb4KSambaOptions *samba_options = static_cast<Smb4KSambaOptions *>( child( "SambaOptions", "Smb4KSambaOptions", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( samba_options )
|
|
|
|
if ( samba_options )
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1010,7 +1010,7 @@ void Smb4TDEConfigDialog::slotCancel()
|
|
|
|
void Smb4TDEConfigDialog::slotCustomSambaSettingsChanged()
|
|
|
|
void Smb4TDEConfigDialog::slotCustomSambaSettingsChanged()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Get the list view and all other input widgets:
|
|
|
|
// Get the list view and all other input widgets:
|
|
|
|
TDEListView *view = static_cast<TDEListView *>( TQT_TQWIDGET(child( "CustomOptionsList", "TDEListView", true )) );
|
|
|
|
TDEListView *view = static_cast<TDEListView *>( child( "CustomOptionsList", "TDEListView", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
if ( !view )
|
|
|
|
if ( !view )
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1136,9 +1136,9 @@ void Smb4TDEConfigDialog::slotRemoveSuperUserEntries()
|
|
|
|
void Smb4TDEConfigDialog::slotReceivedFileIOFailed()
|
|
|
|
void Smb4TDEConfigDialog::slotReceivedFileIOFailed()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
#ifdef __linux__
|
|
|
|
#ifdef __linux__
|
|
|
|
TQCheckBox *force = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_UseForceUnmount", "TQCheckBox", true )) );
|
|
|
|
TQCheckBox *force = static_cast<TQCheckBox *>( child( "kcfg_UseForceUnmount", "TQCheckBox", true ) );
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
TQCheckBox *full_use = static_cast<TQCheckBox *>( TQT_TQWIDGET(child( "kcfg_AlwaysUseSuperUser", "TQCheckBox", true )) );
|
|
|
|
TQCheckBox *full_use = static_cast<TQCheckBox *>( child( "kcfg_AlwaysUseSuperUser", "TQCheckBox", true ) );
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __linux__
|
|
|
|
#ifdef __linux__
|
|
|
|
if ( force && full_use )
|
|
|
|
if ( force && full_use )
|
|
|
@ -1201,7 +1201,7 @@ TDEInstance *Smb4TDEConfigDialogFactory::instance()
|
|
|
|
TQObject *Smb4TDEConfigDialogFactory::createObject( TQObject *parent, const char *name, const char *,
|
|
|
|
TQObject *Smb4TDEConfigDialogFactory::createObject( TQObject *parent, const char *name, const char *,
|
|
|
|
const TQStringList & )
|
|
|
|
const TQStringList & )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return TQT_TQOBJECT( new Smb4TDEConfigDialog( Smb4KSettings::self(), TQT_TQWIDGET( parent ), name ) );
|
|
|
|
return new Smb4TDEConfigDialog( Smb4KSettings::self(), static_cast<TQWidget*>( parent ), name ) ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|