author | zautrix <zautrix> | 2004-08-20 23:53:07 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-08-20 23:53:07 (UTC) |
commit | ab07441b413dff6d478e2c3a39b823b4269931c5 (patch) (side-by-side diff) | |
tree | 5de6576a6c0e20e4af2db7baa5019aa983e2195a /korganizer | |
parent | bc33238f8038a03e04f25ea608c53e784616fee6 (diff) | |
download | kdepimpi-ab07441b413dff6d478e2c3a39b823b4269931c5.zip kdepimpi-ab07441b413dff6d478e2c3a39b823b4269931c5.tar.gz kdepimpi-ab07441b413dff6d478e2c3a39b823b4269931c5.tar.bz2 |
Sync fixes and fix of config loading bug
-rw-r--r-- | korganizer/koprefs.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 0db8e6d..dd978bf 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp @@ -393,6 +393,7 @@ void KOPrefs::usrReadConfig() mLocaleDict = 0; // pending LR fix translation // qDebug("KOPrefs::usrReadConfig() fix translation "); + if ( mPreferredLanguage > 0 && mPreferredLanguage < 4 ) { if ( mPreferredLanguage == 1 ) { mLocaleDict = new QDict<QString>; int i = 0; @@ -410,11 +411,11 @@ void KOPrefs::usrReadConfig() fileName = MainWindow::resourcePath()+"usertranslation.txt"; else if ( mPreferredLanguage == 2 ) fileName = MainWindow::resourcePath()+"frenchtranslation.txt"; - else return; QFile file( fileName ); if (file.open( IO_ReadOnly ) ) { QTextStream ts( &file ); - ts.setCodec( QTextCodec::codecForLocale() ); + ts.setEncoding( QTextStream::Latin1 ); + //ts.setCodec( QTextCodec::latin1 ); QString text = ts.read(); file.close(); text.replace( QRegExp("\\\\n"), "\n" ); @@ -451,6 +452,7 @@ void KOPrefs::usrReadConfig() } } + } config()->setGroup("General"); mCustomCategories = config()->readListEntry("Custom Categories"); @@ -460,8 +462,8 @@ void KOPrefs::usrReadConfig() mTodoSummaryUser.clear(); } if (mLocationDefaults.isEmpty()) { - mLocationDefaults << i18n("Home") << i18n("Office") << i18n("Libary") << i18n("School") << i18n("Doctor") << i18n("Beach") - << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room") << i18n("Cinema") << i18n("Lake") << i18n("Kindergarden") + mLocationDefaults << i18n("Home") << i18n("Office") << i18n("Library") << i18n("School") << i18n("Doctor") << i18n("Beach") + << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room") << i18n("Cinema") << i18n("Lake") << i18n("Kindergarten") << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ; // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") mLocationDefaults.sort(); |