summaryrefslogtreecommitdiffabout
path: root/microkde/kresources/configdialog.cpp
Side-by-side diff
Diffstat (limited to 'microkde/kresources/configdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kresources/configdialog.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/microkde/kresources/configdialog.cpp b/microkde/kresources/configdialog.cpp
index 24e82bc..55253c0 100644
--- a/microkde/kresources/configdialog.cpp
+++ b/microkde/kresources/configdialog.cpp
@@ -94,86 +94,86 @@ ConfigDialog::ConfigDialog( QWidget *parent, const QString& resourceFamily,
if ( mConfigWidget ) {
connect( mConfigWidget, SIGNAL( setReadOnly( bool ) ),
SLOT( setReadOnly( bool ) ) );
connect( mConfigWidget, SIGNAL( setIncludeInSync( bool ) ),
SLOT( setIncludeInSync( bool ) ) );
connect( mConfigWidget, SIGNAL( setPersistentReadOnly( bool ) ),
SLOT( setPersistentReadOnly( bool ) ) );
mConfigWidget->setInEditMode( false );
mConfigWidget->loadSettings( mResource );
mConfigWidget->show();
}
connect( mName, SIGNAL( textChanged(const QString &)),
SLOT( slotNameChanged(const QString &)));
slotNameChanged( mName->text() );
//US setMinimumSize( 400, 250 );
setMinimumSize( KMIN(KGlobal::getDesktopWidth(), 400), KMIN(KGlobal::getDesktopHeight(), 250));
}
void ConfigDialog::setInEditMode( bool value )
{
if ( mConfigWidget )
mConfigWidget->setInEditMode( value );
}
void ConfigDialog::slotNameChanged( const QString &text)
{
enableButtonOK( !text.isEmpty() );
}
void ConfigDialog::setReadOnly( bool value )
{
if (mPersistentReadOnly == false)
mReadOnly->setChecked( value );
else
mReadOnly->setChecked( true );
}
void ConfigDialog::setIncludeInSync( bool value )
{
if (mPersistentReadOnly == false)
mIncludeInSync->setChecked( value );
else
- mIncludeInSync->setChecked( true );
+ mIncludeInSync->setChecked( false );
}
void ConfigDialog::setPersistentReadOnly( bool value )
{
mPersistentReadOnly = value;
if (value == true) {
setReadOnly( true );
- setIncludeInSync( true );
+ setIncludeInSync( false );
}
mReadOnly->setEnabled( !value );
mIncludeInSync->setEnabled (!value );
}
void ConfigDialog::accept()
{
if ( mName->text().isEmpty() ) {
KMessageBox::sorry( this, i18n( "Please enter a resource name" ) );
return;
}
mResource->setResourceName( mName->text() );
mResource->setReadOnly( mReadOnly->isChecked() );
mResource->setIncludeInSync( mIncludeInSync->isChecked() );
if ( mConfigWidget ) {
// First save generic information
// Also save setting of specific resource type
mConfigWidget->saveSettings( mResource );
}
KDialog::accept();
}
//US #include "configdialog.moc"