-rw-r--r-- | microkde/kresources/configdialog.cpp | 4 |
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, | |||
94 | if ( mConfigWidget ) { | 94 | if ( mConfigWidget ) { |
95 | connect( mConfigWidget, SIGNAL( setReadOnly( bool ) ), | 95 | connect( mConfigWidget, SIGNAL( setReadOnly( bool ) ), |
96 | SLOT( setReadOnly( bool ) ) ); | 96 | SLOT( setReadOnly( bool ) ) ); |
97 | connect( mConfigWidget, SIGNAL( setIncludeInSync( bool ) ), | 97 | connect( mConfigWidget, SIGNAL( setIncludeInSync( bool ) ), |
98 | SLOT( setIncludeInSync( bool ) ) ); | 98 | SLOT( setIncludeInSync( bool ) ) ); |
99 | connect( mConfigWidget, SIGNAL( setPersistentReadOnly( bool ) ), | 99 | connect( mConfigWidget, SIGNAL( setPersistentReadOnly( bool ) ), |
100 | SLOT( setPersistentReadOnly( bool ) ) ); | 100 | SLOT( setPersistentReadOnly( bool ) ) ); |
101 | mConfigWidget->setInEditMode( false ); | 101 | mConfigWidget->setInEditMode( false ); |
102 | mConfigWidget->loadSettings( mResource ); | 102 | mConfigWidget->loadSettings( mResource ); |
103 | mConfigWidget->show(); | 103 | mConfigWidget->show(); |
104 | 104 | ||
105 | } | 105 | } |
106 | 106 | ||
107 | 107 | ||
108 | connect( mName, SIGNAL( textChanged(const QString &)), | 108 | connect( mName, SIGNAL( textChanged(const QString &)), |
109 | SLOT( slotNameChanged(const QString &))); | 109 | SLOT( slotNameChanged(const QString &))); |
110 | 110 | ||
111 | slotNameChanged( mName->text() ); | 111 | slotNameChanged( mName->text() ); |
112 | 112 | ||
113 | //US setMinimumSize( 400, 250 ); | 113 | //US setMinimumSize( 400, 250 ); |
114 | setMinimumSize( KMIN(KGlobal::getDesktopWidth(), 400), KMIN(KGlobal::getDesktopHeight(), 250)); | 114 | setMinimumSize( KMIN(KGlobal::getDesktopWidth(), 400), KMIN(KGlobal::getDesktopHeight(), 250)); |
115 | 115 | ||
116 | } | 116 | } |
117 | 117 | ||
118 | void ConfigDialog::setInEditMode( bool value ) | 118 | void ConfigDialog::setInEditMode( bool value ) |
119 | { | 119 | { |
120 | if ( mConfigWidget ) | 120 | if ( mConfigWidget ) |
121 | mConfigWidget->setInEditMode( value ); | 121 | mConfigWidget->setInEditMode( value ); |
122 | } | 122 | } |
123 | 123 | ||
124 | void ConfigDialog::slotNameChanged( const QString &text) | 124 | void ConfigDialog::slotNameChanged( const QString &text) |
125 | { | 125 | { |
126 | enableButtonOK( !text.isEmpty() ); | 126 | enableButtonOK( !text.isEmpty() ); |
127 | } | 127 | } |
128 | 128 | ||
129 | void ConfigDialog::setReadOnly( bool value ) | 129 | void ConfigDialog::setReadOnly( bool value ) |
130 | { | 130 | { |
131 | if (mPersistentReadOnly == false) | 131 | if (mPersistentReadOnly == false) |
132 | mReadOnly->setChecked( value ); | 132 | mReadOnly->setChecked( value ); |
133 | else | 133 | else |
134 | mReadOnly->setChecked( true ); | 134 | mReadOnly->setChecked( true ); |
135 | } | 135 | } |
136 | 136 | ||
137 | void ConfigDialog::setIncludeInSync( bool value ) | 137 | void ConfigDialog::setIncludeInSync( bool value ) |
138 | { | 138 | { |
139 | if (mPersistentReadOnly == false) | 139 | if (mPersistentReadOnly == false) |
140 | mIncludeInSync->setChecked( value ); | 140 | mIncludeInSync->setChecked( value ); |
141 | else | 141 | else |
142 | mIncludeInSync->setChecked( true ); | 142 | mIncludeInSync->setChecked( false ); |
143 | } | 143 | } |
144 | 144 | ||
145 | void ConfigDialog::setPersistentReadOnly( bool value ) | 145 | void ConfigDialog::setPersistentReadOnly( bool value ) |
146 | { | 146 | { |
147 | mPersistentReadOnly = value; | 147 | mPersistentReadOnly = value; |
148 | 148 | ||
149 | if (value == true) { | 149 | if (value == true) { |
150 | setReadOnly( true ); | 150 | setReadOnly( true ); |
151 | setIncludeInSync( true ); | 151 | setIncludeInSync( false ); |
152 | } | 152 | } |
153 | 153 | ||
154 | mReadOnly->setEnabled( !value ); | 154 | mReadOnly->setEnabled( !value ); |
155 | mIncludeInSync->setEnabled (!value ); | 155 | mIncludeInSync->setEnabled (!value ); |
156 | } | 156 | } |
157 | 157 | ||
158 | 158 | ||
159 | void ConfigDialog::accept() | 159 | void ConfigDialog::accept() |
160 | { | 160 | { |
161 | if ( mName->text().isEmpty() ) { | 161 | if ( mName->text().isEmpty() ) { |
162 | KMessageBox::sorry( this, i18n( "Please enter a resource name" ) ); | 162 | KMessageBox::sorry( this, i18n( "Please enter a resource name" ) ); |
163 | return; | 163 | return; |
164 | } | 164 | } |
165 | 165 | ||
166 | mResource->setResourceName( mName->text() ); | 166 | mResource->setResourceName( mName->text() ); |
167 | mResource->setReadOnly( mReadOnly->isChecked() ); | 167 | mResource->setReadOnly( mReadOnly->isChecked() ); |
168 | mResource->setIncludeInSync( mIncludeInSync->isChecked() ); | 168 | mResource->setIncludeInSync( mIncludeInSync->isChecked() ); |
169 | 169 | ||
170 | if ( mConfigWidget ) { | 170 | if ( mConfigWidget ) { |
171 | // First save generic information | 171 | // First save generic information |
172 | // Also save setting of specific resource type | 172 | // Also save setting of specific resource type |
173 | mConfigWidget->saveSettings( mResource ); | 173 | mConfigWidget->saveSettings( mResource ); |
174 | } | 174 | } |
175 | 175 | ||
176 | KDialog::accept(); | 176 | KDialog::accept(); |
177 | } | 177 | } |
178 | 178 | ||
179 | //US #include "configdialog.moc" | 179 | //US #include "configdialog.moc" |