summaryrefslogtreecommitdiffabout
path: root/microkde/kresources/configpage.cpp
Unidiff
Diffstat (limited to 'microkde/kresources/configpage.cpp') (more/less context) (show whitespace changes)
-rw-r--r--microkde/kresources/configpage.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/microkde/kresources/configpage.cpp b/microkde/kresources/configpage.cpp
index 2fe021d..1a3a22c 100644
--- a/microkde/kresources/configpage.cpp
+++ b/microkde/kresources/configpage.cpp
@@ -204,8 +204,10 @@ void ConfigPage::load()
204 if ( family == "contact" && QFile::exists( configDir + "/kabcrc" ) ) { 204 if ( family == "contact" && QFile::exists( configDir + "/kabcrc" ) ) {
205 info.mConfig = new KConfig( locateLocal( "config", "kabcrc" ) ); 205 info.mConfig = new KConfig( locateLocal( "config", "kabcrc" ) );
206 } else if ( family == "calendar" && QFile::exists( configDir + "/kcalrc" ) ) { 206 } else if ( family == "calendar" && QFile::exists( configDir + "/kcalrc" ) ) {
207 info.mConfig = new KConfig( locateLocal( "config", "kcalrc" ) ); 207 info.mConfig = new KConfig( locateLocal( "config", "kcalrc" ) );
208 } else if ( family == syncfamily && QFile::exists( configDir + "/kabcsyncrc" ) ) {
209 info.mConfig = new KConfig( locateLocal( "config", "kabcsyncrc" ) );
208 } else { 210 } else {
209 QString configFile = locateLocal( "config", QString( "kresources/%1/stdrc" ).arg( family ) ); 211 QString configFile = locateLocal( "config", QString( "kresources/%1/stdrc" ).arg( family ) );
210 info.mConfig = new KConfig( configFile ); 212 info.mConfig = new KConfig( configFile );
211 } 213 }
@@ -310,15 +312,15 @@ void ConfigPage::slotAdd()
310 312
311 if (mFamily == syncfamily) 313 if (mFamily == syncfamily)
312 { 314 {
313 desc = QInputDialog::getItem( i18n( "Sync Configuration" ), 315 desc = QInputDialog::getItem( i18n( "Sync Configuration" ),
314 i18n( "Please select resource type for new sync profile:" ), descs, 0, 316 i18n( "Select resource type for the new sync profile:" ), descs, 0,
315 false, &ok, this ); 317 false, &ok, this );
316 } 318 }
317 else 319 else
318 { 320 {
319 desc = QInputDialog::getItem( i18n( "Resource Configuration" ), 321 desc = QInputDialog::getItem( i18n( "Resource Configuration" ),
320 i18n( "Please select type of the new resource:" ), descs, 0, 322 i18n( "Select type of the new resource:" ), descs, 0,
321 false, &ok, this ); 323 false, &ok, this );
322 } 324 }
323 325
324 if ( !ok ) 326 if ( !ok )
@@ -333,9 +335,16 @@ void ConfigPage::slotAdd()
333 .arg( type ) ); 335 .arg( type ) );
334 return; 336 return;
335 } 337 }
336 338
339 if (mFamily == syncfamily)
340 {
341 resource->setResourceName( type + "-syncprofile" );
342 }
343 else
344 {
337 resource->setResourceName( type + "-resource" ); 345 resource->setResourceName( type + "-resource" );
346 }
338 347
339 ConfigDialog dlg( this, mFamily, resource, "KRES::ConfigDialog" ); 348 ConfigDialog dlg( this, mFamily, resource, "KRES::ConfigDialog" );
340 349
341 if ( dlg.exec() ) { 350 if ( dlg.exec() ) {