-rw-r--r-- | korganizer/koprefs.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 8f37793..576c265 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -333,97 +333,97 @@ void KOPrefs::fillMailDefaults() | |||
333 | 333 | ||
334 | void KOPrefs::setTimeZoneIdDefault() | 334 | void KOPrefs::setTimeZoneIdDefault() |
335 | { | 335 | { |
336 | ; | 336 | ; |
337 | } | 337 | } |
338 | 338 | ||
339 | void KOPrefs::setAllDefaults() | 339 | void KOPrefs::setAllDefaults() |
340 | { | 340 | { |
341 | setCategoryDefaults(); | 341 | setCategoryDefaults(); |
342 | mEventSummaryUser = getDefaultList() ; | 342 | mEventSummaryUser = getDefaultList() ; |
343 | mTodoSummaryUser = getDefaultList() ; | 343 | mTodoSummaryUser = getDefaultList() ; |
344 | mLocationDefaults = getLocationDefaultList(); | 344 | mLocationDefaults = getLocationDefaultList(); |
345 | } | 345 | } |
346 | 346 | ||
347 | void KOPrefs::setCategoryDefaults() | 347 | void KOPrefs::setCategoryDefaults() |
348 | { | 348 | { |
349 | mCustomCategories.clear(); | 349 | mCustomCategories.clear(); |
350 | mCustomCategories = getDefaultList(); | 350 | mCustomCategories = getDefaultList(); |
351 | 351 | ||
352 | QStringList::Iterator it; | 352 | QStringList::Iterator it; |
353 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { | 353 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { |
354 | setCategoryColor(*it,mDefaultCategoryColor); | 354 | setCategoryColor(*it,mDefaultCategoryColor); |
355 | } | 355 | } |
356 | } | 356 | } |
357 | QStringList KOPrefs::getLocationDefaultList() | 357 | QStringList KOPrefs::getLocationDefaultList() |
358 | { | 358 | { |
359 | QStringList retval ; | 359 | QStringList retval ; |
360 | retval << i18n("Home") << i18n("Office") << i18n("Library") << i18n("School") << i18n("Doctor") << i18n("Beach") | 360 | retval << i18n("Home") << i18n("Office") << i18n("Library") << i18n("School") << i18n("Doctor") << i18n("Beach") |
361 | << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room") | 361 | << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room") |
362 | << i18n("Cinema") << i18n("Lake") << i18n("Kindergarten") | 362 | << i18n("Cinema") << i18n("Lake") << i18n("Kindergarten") |
363 | << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ; | 363 | << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ; |
364 | // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") | 364 | // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") |
365 | 365 | ||
366 | retval.sort(); | 366 | retval.sort(); |
367 | return retval; | 367 | return retval; |
368 | } | 368 | } |
369 | QStringList KOPrefs::getDefaultList() | 369 | QStringList KOPrefs::getDefaultList() |
370 | { | 370 | { |
371 | QStringList retval ; | 371 | QStringList retval ; |
372 | retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Business Travel") << i18n("Cinema") << i18n("Customer") | 372 | retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Business Travel") << i18n("Cinema") << i18n("Customer") |
373 | << i18n("Break")<< i18n("Breakfast")<< i18n("Competition")<< i18n("Dinner") | 373 | << i18n("Break")<< i18n("Breakfast")<< i18n("Competition")<< i18n("Dinner") |
374 | << i18n("Education")<< i18n("Family") << i18n("Favorites") << i18n("Festival")<< i18n("Fishing")<< i18n("Flight") << i18n("Gifts") | 374 | << i18n("Education")<< i18n("Family") << i18n("Favorites") << i18n("Festival")<< i18n("Fishing")<< i18n("Flight") << i18n("Gifts") |
375 | << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") << i18n("Hiking") << i18n("Hunting") << i18n("Key Customer") << i18n("Kids") | 375 | << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") << i18n("Hiking") << i18n("Hunting") << i18n("Key Customer") << i18n("Kids") |
376 | << i18n("Lunch") << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner")<< i18n("Party") << i18n("Personal") << i18n("Personal Travel") | 376 | << i18n("Lunch") << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner")<< i18n("Party") << i18n("Personal") << i18n("Personal Travel") |
377 | << i18n("PHB") << i18n("Phone Calls") << i18n("Projects") << i18n("Recurring") << i18n("School") << i18n("Shopping") | 377 | << i18n("PHB") << i18n("Phone Calls") << i18n("Projects") << i18n("Recurring") << i18n("School") << i18n("Shopping") |
378 | << i18n("Speach") << i18n("Special Occasion") << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV")<< i18n("University") | 378 | << i18n("Speach") << i18n("Special Occasion") << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV")<< i18n("University") |
379 | << i18n("Vacation") << i18n("VIP") << i18n("SyncEvent") ; | 379 | << i18n("Vacation") << i18n("VIP") << i18n("SyncEvent") ; |
380 | retval.sort(); | 380 | retval.sort(); |
381 | qDebug("cat %s ", retval.join("-").latin1()); | 381 | //qDebug("cat %s ", retval.join("-").latin1()); |
382 | return retval; | 382 | return retval; |
383 | } | 383 | } |
384 | 384 | ||
385 | void KOPrefs::usrReadConfig() | 385 | void KOPrefs::usrReadConfig() |
386 | { | 386 | { |
387 | config()->setGroup("General"); | 387 | config()->setGroup("General"); |
388 | 388 | ||
389 | //qDebug("KOPrefs::usrReadConfig() "); | 389 | //qDebug("KOPrefs::usrReadConfig() "); |
390 | mCustomCategories = config()->readListEntry("Custom Categories"); | 390 | mCustomCategories = config()->readListEntry("Custom Categories"); |
391 | mOldLoadedLanguage = mOldLanguage ; | 391 | mOldLoadedLanguage = mOldLanguage ; |
392 | mOldLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage; | 392 | mOldLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage; |
393 | if (mLocationDefaults.isEmpty()) { | 393 | if (mLocationDefaults.isEmpty()) { |
394 | mLocationDefaults = getLocationDefaultList(); | 394 | mLocationDefaults = getLocationDefaultList(); |
395 | } | 395 | } |
396 | 396 | ||
397 | if (mEventSummaryUser.isEmpty()) { | 397 | if (mEventSummaryUser.isEmpty()) { |
398 | mEventSummaryUser = getDefaultList() ; | 398 | mEventSummaryUser = getDefaultList() ; |
399 | } | 399 | } |
400 | if (mTodoSummaryUser.isEmpty()) { | 400 | if (mTodoSummaryUser.isEmpty()) { |
401 | mTodoSummaryUser = getDefaultList() ; | 401 | mTodoSummaryUser = getDefaultList() ; |
402 | } | 402 | } |
403 | 403 | ||
404 | if (mCustomCategories.isEmpty()) setCategoryDefaults(); | 404 | if (mCustomCategories.isEmpty()) setCategoryDefaults(); |
405 | 405 | ||
406 | config()->setGroup("Personal Settings"); | 406 | config()->setGroup("Personal Settings"); |
407 | mName = config()->readEntry("user_name",""); | 407 | mName = config()->readEntry("user_name",""); |
408 | mEmail = config()->readEntry("user_email",""); | 408 | mEmail = config()->readEntry("user_email",""); |
409 | fillMailDefaults(); | 409 | fillMailDefaults(); |
410 | 410 | ||
411 | config()->setGroup("Category Colors"); | 411 | config()->setGroup("Category Colors"); |
412 | QStringList::Iterator it; | 412 | QStringList::Iterator it; |
413 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { | 413 | for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { |
414 | setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor)); | 414 | setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor)); |
415 | 415 | ||
416 | } | 416 | } |
417 | 417 | ||
418 | KPimPrefs::usrReadConfig(); | 418 | KPimPrefs::usrReadConfig(); |
419 | } | 419 | } |
420 | 420 | ||
421 | 421 | ||
422 | void KOPrefs::usrWriteConfig() | 422 | void KOPrefs::usrWriteConfig() |
423 | { | 423 | { |
424 | config()->setGroup("General"); | 424 | config()->setGroup("General"); |
425 | config()->writeEntry("Custom Categories",mCustomCategories); | 425 | config()->writeEntry("Custom Categories",mCustomCategories); |
426 | 426 | ||
427 | config()->setGroup("Personal Settings"); | 427 | config()->setGroup("Personal Settings"); |
428 | config()->writeEntry("user_name",mName); | 428 | config()->writeEntry("user_name",mName); |
429 | config()->writeEntry("user_email",mEmail); | 429 | config()->writeEntry("user_email",mEmail); |