summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koprefs.cpp33
-rw-r--r--korganizer/koprefs.h2
-rw-r--r--korganizer/mainwindow.cpp8
3 files changed, 29 insertions, 14 deletions
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 9366c11..8f37793 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -338,2 +338,10 @@ void KOPrefs::setTimeZoneIdDefault()
+void KOPrefs::setAllDefaults()
+{
+ setCategoryDefaults();
+ mEventSummaryUser = getDefaultList() ;
+ mTodoSummaryUser = getDefaultList() ;
+ mLocationDefaults = getLocationDefaultList();
+}
+
void KOPrefs::setCategoryDefaults()
@@ -348,3 +356,14 @@ void KOPrefs::setCategoryDefaults()
}
+QStringList KOPrefs::getLocationDefaultList()
+{
+ QStringList retval ;
+ retval << 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("")
+ retval.sort();
+ return retval;
+}
QStringList KOPrefs::getDefaultList()
@@ -361,3 +380,3 @@ QStringList KOPrefs::getDefaultList()
retval.sort();
- //qDebug("cat %s ", retval.join("-").latin1());
+ qDebug("cat %s ", retval.join("-").latin1());
return retval;
@@ -369,8 +388,4 @@ void KOPrefs::usrReadConfig()
+ //qDebug("KOPrefs::usrReadConfig() ");
mCustomCategories = config()->readListEntry("Custom Categories");
- if ( KPimGlobalPrefs::instance()->mPreferredLanguage != mOldLanguage ) {
- mLocationDefaults.clear();
- mEventSummaryUser.clear();
- mTodoSummaryUser.clear();
- }
mOldLoadedLanguage = mOldLanguage ;
@@ -378,7 +393,3 @@ void KOPrefs::usrReadConfig()
if (mLocationDefaults.isEmpty()) {
- 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();
+ mLocationDefaults = getLocationDefaultList();
}
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index dddcdca..fa69d52 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -59,2 +59,3 @@ class KOPrefs : public KPimPrefs
void setCategoryDefaults();
+ void setAllDefaults();
@@ -73,2 +74,3 @@ class KOPrefs : public KPimPrefs
QStringList getDefaultList();
+ QStringList getLocationDefaultList();
public:
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 1c74307..348dd5e 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -134,2 +134,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
+
#ifdef DESKTOP_VERSION
@@ -145,5 +146,4 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
mFlagKeyPressed = false;
- setCaption("KOrganizer/Pi");
- KPimGlobalPrefs::instance()->setGlobalConfig();
KOPrefs *p = KOPrefs::instance();
+ KPimGlobalPrefs::instance()->setGlobalConfig();
if ( p->mHourSize > 18 )
@@ -170,2 +170,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
+ setCaption("KOrganizer/Pi");
QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this );
@@ -176,2 +177,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
#endif
+
//qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ());
@@ -233,3 +235,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) {
- KOPrefs::instance()->setCategoryDefaults();
+ KOPrefs::instance()->setAllDefaults();
int count = mView->addCategories();