summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-02-05 20:41:52 (UTC)
committer zautrix <zautrix>2005-02-05 20:41:52 (UTC)
commit659f07aa44f44aebb74c83e7319021cfeb87f275 (patch) (unidiff)
tree237ef880abb14fb73bf365abd35e046d4757568b
parentc3342620087b5cda19d7c8d0adaa2c7b5b85e2c9 (diff)
downloadkdepimpi-659f07aa44f44aebb74c83e7319021cfeb87f275.zip
kdepimpi-659f07aa44f44aebb74c83e7319021cfeb87f275.tar.gz
kdepimpi-659f07aa44f44aebb74c83e7319021cfeb87f275.tar.bz2
lang fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koprefs.cpp1
-rw-r--r--korganizer/mainwindow.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index ea5aaa1..9366c11 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -314,96 +314,97 @@ KOPrefs *KOPrefs::instance()
314{ 314{
315 if (!mInstance) { 315 if (!mInstance) {
316 mInstance = insd.setObject(new KOPrefs()); 316 mInstance = insd.setObject(new KOPrefs());
317 mInstance->readConfig(); 317 mInstance->readConfig();
318 } 318 }
319 319
320 return mInstance; 320 return mInstance;
321} 321}
322 322
323void KOPrefs::usrSetDefaults() 323void KOPrefs::usrSetDefaults()
324{ 324{
325 325
326} 326}
327 327
328void KOPrefs::fillMailDefaults() 328void KOPrefs::fillMailDefaults()
329{ 329{
330 if (mName.isEmpty()) mName = i18n("Anonymous"); 330 if (mName.isEmpty()) mName = i18n("Anonymous");
331 if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere"); 331 if (mEmail.isEmpty()) mEmail = i18n("nobody@nowhere");
332} 332}
333 333
334void KOPrefs::setTimeZoneIdDefault() 334void KOPrefs::setTimeZoneIdDefault()
335{ 335{
336 ; 336 ;
337} 337}
338 338
339void KOPrefs::setCategoryDefaults() 339void KOPrefs::setCategoryDefaults()
340{ 340{
341 mCustomCategories.clear(); 341 mCustomCategories.clear();
342 mCustomCategories = getDefaultList(); 342 mCustomCategories = getDefaultList();
343 343
344 QStringList::Iterator it; 344 QStringList::Iterator it;
345 for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { 345 for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) {
346 setCategoryColor(*it,mDefaultCategoryColor); 346 setCategoryColor(*it,mDefaultCategoryColor);
347 } 347 }
348} 348}
349 349
350QStringList KOPrefs::getDefaultList() 350QStringList KOPrefs::getDefaultList()
351{ 351{
352 QStringList retval ; 352 QStringList retval ;
353 retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Business Travel") << i18n("Cinema") << i18n("Customer") 353 retval << i18n("Anniversary") << i18n("Appointment") << i18n("Birthday") << i18n("Business") << i18n("Business Travel") << i18n("Cinema") << i18n("Customer")
354 << i18n("Break")<< i18n("Breakfast")<< i18n("Competition")<< i18n("Dinner") 354 << i18n("Break")<< i18n("Breakfast")<< i18n("Competition")<< i18n("Dinner")
355 << i18n("Education")<< i18n("Family") << i18n("Favorites") << i18n("Festival")<< i18n("Fishing")<< i18n("Flight") << i18n("Gifts") 355 << i18n("Education")<< i18n("Family") << i18n("Favorites") << i18n("Festival")<< i18n("Fishing")<< i18n("Flight") << i18n("Gifts")
356 << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") << i18n("Hiking") << i18n("Hunting") << i18n("Key Customer") << i18n("Kids") 356 << i18n("Holiday") << i18n("Holiday Cards")<< i18n("Hot Contacts") << i18n("Hiking") << i18n("Hunting") << i18n("Key Customer") << i18n("Kids")
357 << i18n("Lunch") << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner")<< i18n("Party") << i18n("Personal") << i18n("Personal Travel") 357 << i18n("Lunch") << i18n("Meeting") << i18n("Miscellaneous") << i18n("Partner")<< i18n("Party") << i18n("Personal") << i18n("Personal Travel")
358 << i18n("PHB") << i18n("Phone Calls") << i18n("Projects") << i18n("Recurring") << i18n("School") << i18n("Shopping") 358 << i18n("PHB") << i18n("Phone Calls") << i18n("Projects") << i18n("Recurring") << i18n("School") << i18n("Shopping")
359 << i18n("Speach") << i18n("Special Occasion") << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV")<< i18n("University") 359 << i18n("Speach") << i18n("Special Occasion") << i18n("Sports") << i18n("Talk") << i18n("Travel") << i18n("TV")<< i18n("University")
360 << i18n("Vacation") << i18n("VIP") << i18n("SyncEvent") ; 360 << i18n("Vacation") << i18n("VIP") << i18n("SyncEvent") ;
361 retval.sort(); 361 retval.sort();
362 //qDebug("cat %s ", retval.join("-").latin1());
362 return retval; 363 return retval;
363} 364}
364 365
365void KOPrefs::usrReadConfig() 366void KOPrefs::usrReadConfig()
366{ 367{
367 config()->setGroup("General"); 368 config()->setGroup("General");
368 369
369 mCustomCategories = config()->readListEntry("Custom Categories"); 370 mCustomCategories = config()->readListEntry("Custom Categories");
370 if ( KPimGlobalPrefs::instance()->mPreferredLanguage != mOldLanguage ) { 371 if ( KPimGlobalPrefs::instance()->mPreferredLanguage != mOldLanguage ) {
371 mLocationDefaults.clear(); 372 mLocationDefaults.clear();
372 mEventSummaryUser.clear(); 373 mEventSummaryUser.clear();
373 mTodoSummaryUser.clear(); 374 mTodoSummaryUser.clear();
374 } 375 }
375 mOldLoadedLanguage = mOldLanguage ; 376 mOldLoadedLanguage = mOldLanguage ;
376 mOldLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage; 377 mOldLanguage = KPimGlobalPrefs::instance()->mPreferredLanguage;
377 if (mLocationDefaults.isEmpty()) { 378 if (mLocationDefaults.isEmpty()) {
378 mLocationDefaults << i18n("Home") << i18n("Office") << i18n("Library") << i18n("School") << i18n("Doctor") << i18n("Beach") 379 mLocationDefaults << i18n("Home") << i18n("Office") << i18n("Library") << i18n("School") << i18n("Doctor") << i18n("Beach")
379 << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room") << i18n("Cinema") << i18n("Lake") << i18n("Kindergarten") 380 << i18n("University") << i18n("Restaurant") << i18n("Bar") << i18n("Conference room") << i18n("Cinema") << i18n("Lake") << i18n("Kindergarten")
380 << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ; 381 << i18n("Germany") << i18n("Sweden") << i18n("Forest") << i18n("Desert") << i18n("Kitchen") ;
381 // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") 382 // << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("") << i18n("")
382 mLocationDefaults.sort(); 383 mLocationDefaults.sort();
383 } 384 }
384 385
385 if (mEventSummaryUser.isEmpty()) { 386 if (mEventSummaryUser.isEmpty()) {
386 mEventSummaryUser = getDefaultList() ; 387 mEventSummaryUser = getDefaultList() ;
387 } 388 }
388 if (mTodoSummaryUser.isEmpty()) { 389 if (mTodoSummaryUser.isEmpty()) {
389 mTodoSummaryUser = getDefaultList() ; 390 mTodoSummaryUser = getDefaultList() ;
390 } 391 }
391 392
392 if (mCustomCategories.isEmpty()) setCategoryDefaults(); 393 if (mCustomCategories.isEmpty()) setCategoryDefaults();
393 394
394 config()->setGroup("Personal Settings"); 395 config()->setGroup("Personal Settings");
395 mName = config()->readEntry("user_name",""); 396 mName = config()->readEntry("user_name","");
396 mEmail = config()->readEntry("user_email",""); 397 mEmail = config()->readEntry("user_email","");
397 fillMailDefaults(); 398 fillMailDefaults();
398 399
399 config()->setGroup("Category Colors"); 400 config()->setGroup("Category Colors");
400 QStringList::Iterator it; 401 QStringList::Iterator it;
401 for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) { 402 for (it = mCustomCategories.begin();it != mCustomCategories.end();++it ) {
402 setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor)); 403 setCategoryColor(*it,config()->readColorEntry(*it,&mDefaultCategoryColor));
403 404
404 } 405 }
405 406
406 KPimPrefs::usrReadConfig(); 407 KPimPrefs::usrReadConfig();
407} 408}
408 409
409 410
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 5bc8c00..9e32c18 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -99,98 +99,98 @@ class KOex2phonePrefs : public QDialog
99 mPhoneModel = new QLineEdit( temphb); 99 mPhoneModel = new QLineEdit( temphb);
100 lay->addWidget( temphb ); 100 lay->addWidget( temphb );
101 mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this ); 101 mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this );
102 mWriteBackFuture->setChecked( true ); 102 mWriteBackFuture->setChecked( true );
103 lay->addWidget( mWriteBackFuture ); 103 lay->addWidget( mWriteBackFuture );
104 temphb = new QHBox( this ); 104 temphb = new QHBox( this );
105 new QLabel( i18n("Max. weeks in future: ") , temphb ); 105 new QLabel( i18n("Max. weeks in future: ") , temphb );
106 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb); 106 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb);
107 mWriteBackFutureWeeks->setValue( 8 ); 107 mWriteBackFutureWeeks->setValue( 8 );
108 lay->addWidget( temphb ); 108 lay->addWidget( temphb );
109 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) ); 109 lay->addWidget(lab = new QLabel( i18n("NOTE: This will remove all old\ntodo/calendar data on phone!"), this ) );
110 lab->setAlignment (AlignHCenter ); 110 lab->setAlignment (AlignHCenter );
111 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this ); 111 QPushButton * ok = new QPushButton( i18n("Export to mobile phone!"), this );
112 lay->addWidget( ok ); 112 lay->addWidget( ok );
113 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 113 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
114 lay->addWidget( cancel ); 114 lay->addWidget( cancel );
115 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 115 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
116 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 116 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
117 resize( 220, 240 ); 117 resize( 220, 240 );
118 qApp->processEvents(); 118 qApp->processEvents();
119 int dw = QApplication::desktop()->width(); 119 int dw = QApplication::desktop()->width();
120 int dh = QApplication::desktop()->height(); 120 int dh = QApplication::desktop()->height();
121 move( (dw-width())/2, (dh - height() )/2 ); 121 move( (dw-width())/2, (dh - height() )/2 );
122 } 122 }
123 123
124public: 124public:
125 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; 125 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel;
126 QCheckBox* mWriteBackFuture; 126 QCheckBox* mWriteBackFuture;
127 QSpinBox* mWriteBackFutureWeeks; 127 QSpinBox* mWriteBackFutureWeeks;
128}; 128};
129 129
130int globalFlagBlockStartup; 130int globalFlagBlockStartup;
131MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : 131MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
132 QMainWindow( parent, name ) 132 QMainWindow( parent, name )
133{ 133{
134 134
135#ifdef DESKTOP_VERSION 135#ifdef DESKTOP_VERSION
136 setFont( QFont("Arial"), 14 ); 136 setFont( QFont("Arial"), 14 );
137#endif 137#endif
138 mClosed = false; 138 mClosed = false;
139 //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; 139 //QString confFile = KStandardDirs::appDir() + "config/korganizerrc";
140 QString confFile = locateLocal("config","korganizerrc"); 140 QString confFile = locateLocal("config","korganizerrc");
141 QFileInfo finf ( confFile ); 141 QFileInfo finf ( confFile );
142 bool showWarning = !finf.exists(); 142 bool showWarning = !finf.exists();
143 setIcon(SmallIcon( "ko24" ) ); 143 setIcon(SmallIcon( "ko24" ) );
144 mBlockAtStartup = true; 144 mBlockAtStartup = true;
145 mFlagKeyPressed = false; 145 mFlagKeyPressed = false;
146 setCaption("KOrganizer/Pi"); 146 setCaption("KOrganizer/Pi");
147 KOPrefs *p = KOPrefs::instance();
148 KPimGlobalPrefs::instance()->setGlobalConfig(); 147 KPimGlobalPrefs::instance()->setGlobalConfig();
148 KOPrefs *p = KOPrefs::instance();
149 if ( p->mHourSize > 18 ) 149 if ( p->mHourSize > 18 )
150 p->mHourSize = 18; 150 p->mHourSize = 18;
151 QMainWindow::ToolBarDock tbd; 151 QMainWindow::ToolBarDock tbd;
152 if ( p->mToolBarHor ) { 152 if ( p->mToolBarHor ) {
153 if ( p->mToolBarUp ) 153 if ( p->mToolBarUp )
154 tbd = Bottom; 154 tbd = Bottom;
155 else 155 else
156 tbd = Top; 156 tbd = Top;
157 } 157 }
158 else { 158 else {
159 if ( p->mToolBarUp ) 159 if ( p->mToolBarUp )
160 tbd = Right; 160 tbd = Right;
161 else 161 else
162 tbd = Left; 162 tbd = Left;
163 } 163 }
164 if ( KOPrefs::instance()->mUseAppColors ) 164 if ( KOPrefs::instance()->mUseAppColors )
165 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); 165 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true );
166 globalFlagBlockStartup = 1; 166 globalFlagBlockStartup = 1;
167 iconToolBar = new QPEToolBar( this ); 167 iconToolBar = new QPEToolBar( this );
168 addToolBar (iconToolBar , tbd ); 168 addToolBar (iconToolBar , tbd );
169 mCalendarModifiedFlag = false; 169 mCalendarModifiedFlag = false;
170 170
171 QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this ); 171 QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this );
172 splash->setAlignment ( AlignCenter ); 172 splash->setAlignment ( AlignCenter );
173 setCentralWidget( splash ); 173 setCentralWidget( splash );
174#ifndef DESKTOP_VERSION 174#ifndef DESKTOP_VERSION
175 showMaximized(); 175 showMaximized();
176#endif 176#endif
177 //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ()); 177 //qDebug("Mainwidget x %d y %d w %d h %d", x(), y(), width(), height ());
178 setDefaultPreferences(); 178 setDefaultPreferences();
179 mCalendar = new CalendarLocal(); 179 mCalendar = new CalendarLocal();
180 mView = new CalendarView( mCalendar, this,"mCalendar " ); 180 mView = new CalendarView( mCalendar, this,"mCalendar " );
181 mView->hide(); 181 mView->hide();
182 //mView->resize(splash->size() ); 182 //mView->resize(splash->size() );
183 initActions(); 183 initActions();
184 mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu); 184 mSyncManager = new KSyncManager((QWidget*)this, (KSyncInterface*)mView, KSyncManager::KOPI, KOPrefs::instance(), syncMenu);
185 mSyncManager->setBlockSave(false); 185 mSyncManager->setBlockSave(false);
186 mView->setSyncManager(mSyncManager); 186 mView->setSyncManager(mSyncManager);
187#ifndef DESKTOP_VERSION 187#ifndef DESKTOP_VERSION
188 iconToolBar->show(); 188 iconToolBar->show();
189 qApp->processEvents(); 189 qApp->processEvents();
190#endif 190#endif
191 //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ()); 191 //qDebug("Splashwidget x %d y %d w %d h %d", splash-> x(), splash->y(), splash->width(),splash-> height ());
192 int vh = height() ; 192 int vh = height() ;
193 int vw = width(); 193 int vw = width();
194 //qDebug("Toolbar hei %d ",iconToolBar->height() ); 194 //qDebug("Toolbar hei %d ",iconToolBar->height() );
195 if ( iconToolBar->orientation () == Qt:: Horizontal ) { 195 if ( iconToolBar->orientation () == Qt:: Horizontal ) {
196 vh -= iconToolBar->height(); 196 vh -= iconToolBar->height();