summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp40
-rw-r--r--kaddressbook/kabcore.h2
-rw-r--r--kaddressbook/kcmconfigs/kcmkabconfig.h2
-rw-r--r--korganizer/calendarview.cpp1
-rw-r--r--korganizer/kodialogmanager.cpp23
-rw-r--r--korganizer/koprefsdialog.cpp286
-rw-r--r--korganizer/koprefsdialog.h12
-rw-r--r--libkdepim/kprefsdialog.cpp30
-rw-r--r--libkdepim/kprefsdialog.h26
9 files changed, 106 insertions, 316 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index cba5850..cd833cf 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -98,2 +98,3 @@ $Id$
98#include <ktoolbar.h> 98#include <ktoolbar.h>
99#include <kprefsdialog.h>
99 100
@@ -1613,17 +1614,28 @@ QString KABCore::getNameByPhone( const QString &phone )
1613} 1614}
1614 1615void KABCore::openConfigGlobalDialog()
1616{
1617 KPimPrefsGlobalDialog gc ( this );
1618 gc.exec();
1619}
1615void KABCore::openConfigDialog() 1620void KABCore::openConfigDialog()
1616{ 1621{
1617 KCMultiDialog* ConfigureDialog = new KCMultiDialog( "PIM", this ,"kabconfigdialog", true ); 1622 KDialogBase * ConfigureDialog = new KDialogBase ( KDialogBase::Plain , i18n("Configure KA/Pi"), KDialogBase::Default |KDialogBase::Cancel | KDialogBase::Apply | KDialogBase::Ok, KDialogBase::Ok,0, "name", true, true);
1618 KCMKabConfig* kabcfg = new KCMKabConfig( ConfigureDialog->getNewVBoxPage(i18n( "Addressbook")) , "KCMKabConfig" );
1619 ConfigureDialog->addModule(kabcfg );
1620 KCMKdePimConfig* kdelibcfg = new KCMKdePimConfig( ConfigureDialog->getNewVBoxPage(i18n( "Global")) , "KCMKdeLibConfig" );
1621 ConfigureDialog->addModule(kdelibcfg );
1622 1623
1624 KCMKabConfig* kabcfg = new KCMKabConfig( ConfigureDialog , "KCMKabConfig" );
1625 ConfigureDialog->setMainWidget( kabcfg );
1623 connect( ConfigureDialog, SIGNAL( applyClicked() ), 1626 connect( ConfigureDialog, SIGNAL( applyClicked() ),
1624 this, SLOT( configurationChanged() ) ); 1627 this, SLOT( configurationChanged() ) );
1628 connect( ConfigureDialog, SIGNAL( applyClicked() ),
1629 kabcfg, SLOT( save() ) );
1625 connect( ConfigureDialog, SIGNAL( okClicked() ), 1630 connect( ConfigureDialog, SIGNAL( okClicked() ),
1626 this, SLOT( configurationChanged() ) ); 1631 this, SLOT( configurationChanged() ) );
1632 connect( ConfigureDialog, SIGNAL( okClicked() ),
1633 kabcfg, SLOT( save() ) );
1634 connect( ConfigureDialog, SIGNAL( defaultClicked() ),
1635 kabcfg, SLOT( defaults() ) );
1627 saveSettings(); 1636 saveSettings();
1637 kabcfg->load();
1628#ifndef DESKTOP_VERSION 1638#ifndef DESKTOP_VERSION
1639 if ( QApplication::desktop()->height() <= 480 )
1640 ConfigureDialog->hideButtons();
1629 ConfigureDialog->showMaximized(); 1641 ConfigureDialog->showMaximized();
@@ -2027,8 +2039,9 @@ void KABCore::initActions()
2027 } else { 2039 } else {
2028 mActionConfigKAddressbook = KStdAction::preferences( this, SLOT( openConfigDialog() ), actionCollection() ); 2040 mActionConfigKAddressbook = new KAction( i18n( "&Configure KA/Pi..." ), "configure", 0, this,
2029 2041 SLOT( openConfigDialog() ), actionCollection(),
2030 //US not implemented yet 2042 "kaddressbook_configure" );
2031 //mActionKeyBindings = KStdAction::keyBindings( this, SLOT( configureKeyBindings() ), actionCollection() ); 2043 mActionConfigGlobal = new KAction( i18n( "Global Settings..." ), "configure", 0, this,
2044 SLOT( openConfigGlobalDialog() ), actionCollection(),
2045 "kaddressbook_configure" );
2032 } 2046 }
2033
2034 mActionJumpBar = new KToggleAction( i18n( "Show Jump Bar" ), 0, 0, 2047 mActionJumpBar = new KToggleAction( i18n( "Show Jump Bar" ), 0, 0,
@@ -2245,4 +2258,5 @@ void KABCore::addActionsManually()
2245 mActionConfigKAddressbook->plug( settingsMenu, 0 ); 2258 mActionConfigKAddressbook->plug( settingsMenu, 0 );
2246 mActionConfigResources->plug( settingsMenu,1 ); 2259 mActionConfigGlobal->plug( settingsMenu, 1 );
2247 settingsMenu->insertSeparator(2); 2260 mActionConfigResources->plug( settingsMenu,2 );
2261 settingsMenu->insertSeparator(3);
2248 2262
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index 80dbf08..6479a58 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -329,2 +329,3 @@ class KABCore : public QWidget, public KSyncInterface
329 void openConfigDialog(); 329 void openConfigDialog();
330 void openConfigGlobalDialog();
330 331
@@ -460,2 +461,3 @@ class KABCore : public QWidget, public KSyncInterface
460 KAction *mActionConfigResources; 461 KAction *mActionConfigResources;
462 KAction *mActionConfigGlobal;
461 KAction *mActionConfigKAddressbook; 463 KAction *mActionConfigKAddressbook;
diff --git a/kaddressbook/kcmconfigs/kcmkabconfig.h b/kaddressbook/kcmconfigs/kcmkabconfig.h
index 2ecbfef..2af10d7 100644
--- a/kaddressbook/kcmconfigs/kcmkabconfig.h
+++ b/kaddressbook/kcmconfigs/kcmkabconfig.h
@@ -37,3 +37,3 @@ class KCMKabConfig : public KCModule
37 KCMKabConfig( QWidget *parent = 0, const char *name = 0 ); 37 KCMKabConfig( QWidget *parent = 0, const char *name = 0 );
38 38 public slots:
39 virtual void load(); 39 virtual void load();
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 4794414..2a55127 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2533,2 +2533,3 @@ void CalendarView::edit_global_options()
2533 qDebug("KO: TZ reload cancelled "); 2533 qDebug("KO: TZ reload cancelled ");
2534 mCalendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
2534 return; 2535 return;
diff --git a/korganizer/kodialogmanager.cpp b/korganizer/kodialogmanager.cpp
index aa30c52..3dfa344 100644
--- a/korganizer/kodialogmanager.cpp
+++ b/korganizer/kodialogmanager.cpp
@@ -92,18 +92,6 @@ void KODialogManager::showGlobalOptionsDialog( bool showSync )
92{ 92{
93 if (!mOptionsDialog) { 93 KPimPrefsGlobalDialog gc ( mMainView );
94 mOptionsDialog = new KOPrefsDialog(0); 94 if ( showSync )
95 connect(mOptionsDialog,SIGNAL(configChanged()), 95 gc.showTZconfig();
96 mMainView,SLOT(updateConfig())); 96 gc.exec();
97 }
98 mOptionsDialog->readConfig();
99#ifndef DESKTOP_VERSION
100 mOptionsDialog->showMaximized();
101#else
102 mOptionsDialog->show();
103#endif
104 if ( showSync )
105 mOptionsDialog->showSyncPage();
106 mOptionsDialog->exec();
107 delete mOptionsDialog;
108 mOptionsDialog = 0;
109} 97}
@@ -123,4 +111,3 @@ void KODialogManager::showOptionsDialog( bool showSync )
123#endif 111#endif
124 if ( showSync ) 112
125 mOptionsDialog->showSyncPage();
126 mOptionsDialog->exec(); 113 mOptionsDialog->exec();
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index 4b5b66a..b782bb1 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -88,6 +88,3 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
88#endif 88#endif
89 kdelibcfg = 0; 89
90 if ( !parent )
91 setupGlobalTab();
92 else {
93 setupMainTab(); 90 setupMainTab();
@@ -105,3 +102,3 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
105 //setupGroupAutomationTab(); 102 //setupGroupAutomationTab();
106 } 103
107 104
@@ -115,7 +112,3 @@ void KOPrefsDialog::setupGlobalTab()
115{ 112{
116 //QFrame *topFrame = addPage(i18n("Global"),0,0); 113
117 kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), this, "KCMKdeLibConfig" );
118 setMainWidget( kdelibcfg );
119 setCaption( i18n("KDE-Pim Global Settings"));
120
121 114
@@ -242,99 +235,2 @@ void KOPrefsDialog::setupLocaleTab()
242} 235}
243void KOPrefsDialog::showSyncPage()
244{
245 // showPage ( 0 ) ;
246 kdelibcfg->showTimeZoneTab() ;
247
248}
249void KOPrefsDialog::setupSyncAlgTab()
250{
251#if 0
252 QLabel * lab;
253 QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0);
254 mSetupSyncAlgTab = topFrame;
255 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
256 topLayout->setSpacing(mSpacingHint);
257 topLayout->setMargin(mMarginHint);
258 int iii = 0;
259
260 KPrefsDialogWidBool *sb =
261 addWidBool(i18n("Ask for preferences before syncing"),
262 &(KOPrefs::instance()->mAskForPreferences),topFrame);
263 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
264
265 ++iii;
266
267 KPrefsDialogWidRadios *syncPrefsGroup =
268 addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs),
269 topFrame);
270 syncPrefsGroup->addRadio(i18n("Take local entry on conflict"));
271 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict"));
272 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict"));
273 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict"));
274 syncPrefsGroup->addRadio(i18n("Force take local entry always"));
275 syncPrefsGroup->addRadio(i18n("Force take remote entry always"));
276 topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
277 ++iii;
278 sb =
279 addWidBool(i18n("Show summary after syncing"),
280 &(KOPrefs::instance()->mShowSyncSummary),topFrame);
281 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
282
283 ++iii;
284#endif
285
286
287
288}
289
290
291void KOPrefsDialog::setupSyncTab()
292{
293#if 0
294 QLabel * lab;
295 QFrame *topFrame = addPage(i18n("Sync Network"),0,0);
296 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
297 topLayout->setSpacing(mSpacingHint);
298 topLayout->setMargin(mMarginHint);
299 lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame);
300 int iii = 0;
301 topLayout->addMultiCellWidget(lab , iii,iii,0,1);
302 ++iii;
303
304 mRemoteIPEdit = new QLineEdit(topFrame);
305 lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame);
306 topLayout->addWidget(lab ,iii,0);
307 topLayout->addWidget(mRemoteIPEdit,iii,1);
308 ++iii;
309 mRemoteUser = new QLineEdit(topFrame);
310 lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame);
311 topLayout->addWidget(lab ,iii,0);
312 topLayout->addWidget(mRemoteUser, iii,1);
313 ++iii;
314
315 mRemoteFile = new QLineEdit(topFrame);
316 lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame);
317 topLayout->addWidget(lab ,iii,0);
318 topLayout->addWidget(mRemoteFile,iii,1);
319 ++iii;
320
321 mLocalTempFile = new QLineEdit(topFrame);
322 lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame);
323 topLayout->addWidget(lab ,iii,0);
324 topLayout->addWidget(mLocalTempFile,iii,1);
325 ++iii;
326
327 KPrefsDialogWidBool *wb =
328 addWidBool(i18n("Write back synced file"),
329 &(KOPrefs::instance()->mWriteBackFile),topFrame);
330 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1);
331 ++iii;
332 wb =
333 addWidBool(i18n("Write back existing entries only"),
334 &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame);
335 topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1);
336 ++iii;
337
338#endif
339}
340 236
@@ -1462,5 +1358,3 @@ void KOPrefsDialog::usrReadConfig()
1462{ 1358{
1463 if ( kdelibcfg ) 1359
1464 kdelibcfg->readConfig();
1465 else {
1466 mNameEdit->setText(KOPrefs::instance()->fullName()); 1360 mNameEdit->setText(KOPrefs::instance()->fullName());
@@ -1469,7 +1363,3 @@ void KOPrefsDialog::usrReadConfig()
1469 mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval); 1363 mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval);
1470 // QDate current ( 2001, 1,1); 1364
1471 //mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1));
1472 //mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1));
1473 //setCombo(mTimeZoneCombo,i18n(KOPrefs::instance()->mTimeZoneId));
1474 //mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset);
1475 mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime); 1365 mStartTimeSpin->setValue(KOPrefs::instance()->mStartTime);
@@ -1477,5 +1367,2 @@ void KOPrefsDialog::usrReadConfig()
1477 mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime); 1367 mAlarmTimeCombo->setCurrentItem(KOPrefs::instance()->mAlarmTime);
1478 // if (KOPrefs::instance()->mAllDaySize > 47 )
1479 // KOPrefs::instance()->mAllDaySize = KOPrefs::instance()->mAllDaySize/2;
1480 //mHourSizeSlider->setValue(KOPrefs::instance()->mAllDaySize);
1481 1368
@@ -1492,13 +1379,4 @@ void KOPrefsDialog::usrReadConfig()
1492 1379
1493 // mRemoteIPEdit->setText(KOPrefs::instance()->mRemoteIP);
1494 //mRemoteUser->setText(KOPrefs::instance()->mRemoteUser);
1495 //mRemotePassWd->setText(KOPrefs::instance()->mRemotePassWd);
1496 //mRemoteFile->setText(KOPrefs::instance()->mRemoteFile);
1497
1498 //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile); 1380 //that soundmLocalTempFile->setText(KOPrefs::instance()->mLocalTempFile);
1499 mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile); 1381 mDefaultAlarmFile->setText(KOPrefs::instance()->mDefaultAlarmFile);
1500 //QString dummy = KOPrefs::instance()->mUserDateFormatLong;
1501 //mUserDateFormatLong->setText(dummy.replace( QRegExp("K"), QString(",") ));
1502 //dummy = KOPrefs::instance()->mUserDateFormatShort;
1503 //mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") ));
1504 updateCategories(); 1382 updateCategories();
@@ -1508,3 +1386,3 @@ void KOPrefsDialog::usrReadConfig()
1508 mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval ); 1386 mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval );
1509 } 1387
1510} 1388}
@@ -1514,14 +1392,5 @@ void KOPrefsDialog::usrWriteConfig()
1514{ 1392{
1515 if ( kdelibcfg ) 1393
1516 kdelibcfg->writeConfig(); 1394
1517 else {
1518 // KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text();
1519 //KOPrefs::instance()->mRemoteUser = mRemoteUser->text();
1520 //KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text();
1521 //KOPrefs::instance()->mRemoteFile= mRemoteFile->text();
1522 //KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text();
1523 KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text(); 1395 KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text();
1524
1525 //KOPrefs::instance()->mUserDateFormatShort = mUserDateFormatShort->text().replace( QRegExp(","), QString("K") );
1526 //KOPrefs::instance()->mUserDateFormatLong = mUserDateFormatLong->text().replace( QRegExp(","), QString("K") );
1527 KOPrefs::instance()->setFullName(mNameEdit->text()); 1396 KOPrefs::instance()->setFullName(mNameEdit->text());
@@ -1530,18 +1399,2 @@ void KOPrefsDialog::usrWriteConfig()
1530 KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value(); 1399 KOPrefs::instance()->mAutoSaveInterval = mAutoSaveIntervalSpin->value();
1531
1532 // KOPrefs::instance()->mTimeZoneId = mTimeZoneCombo->currentText();
1533 //QDate date;
1534 //date = mStartDateSavingEdit->date();
1535 //int sub = 0;
1536 //if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 )
1537 // sub = 1;
1538// KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub;
1539// date = mEndDateSavingEdit->date();
1540// if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 )
1541// sub = 1;
1542// else
1543// sub = 0;
1544// KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub;
1545// // KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value();
1546
1547 KOPrefs::instance()->mStartTime = mStartTimeSpin->value(); 1400 KOPrefs::instance()->mStartTime = mStartTimeSpin->value();
@@ -1549,5 +1402,3 @@ void KOPrefsDialog::usrWriteConfig()
1549 KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem(); 1402 KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem();
1550 1403
1551 //KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value();
1552
1553 QDictIterator<QColor> it(mCategoryDict); 1404 QDictIterator<QColor> it(mCategoryDict);
@@ -1570,7 +1421,7 @@ void KOPrefsDialog::usrWriteConfig()
1570 // } 1421 // }
1571 KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value(); 1422 KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value();
1572 KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ; 1423 KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ;
1573 KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ; 1424 KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ;
1574 KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ; 1425 KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ;
1575 } 1426
1576} 1427}
@@ -1585,25 +1436,2 @@ void KOPrefsDialog::updateCategories()
1585 1436
1586void KOPrefsDialog::warningGroupScheduling()
1587{
1588 warningExperimental(mEnableGroupScheduling->checkBox()->isChecked());
1589}
1590
1591void KOPrefsDialog::warningProjectView()
1592{
1593 warningExperimental(mEnableProjectView->checkBox()->isChecked());
1594}
1595
1596void KOPrefsDialog::warningExperimental(bool on)
1597{
1598 if (on) {
1599 KMessageBox::information(this,i18n("This is an experimental feature. "
1600 "It may not work, it may do nothing useful and it may cause data loss. "
1601 "Use with care.\n"
1602 "You have to restart KOrganizer for this setting to take effect."));
1603 } else {
1604 KMessageBox::information(this,
1605 i18n("You have to restart KOrganizer for this setting to take effect."));
1606 }
1607}
1608
1609void KOPrefsDialog::toggleEmailSettings(bool on) 1437void KOPrefsDialog::toggleEmailSettings(bool on)
@@ -1668,88 +1496,2 @@ void KOPrefsDialog::updateInput()
1668} 1496}
1669void KOPrefsDialog::updateTimezoneOffset( int index )
1670{
1671 /*
1672 qDebug("updateTimezoneOffset %d ", index);
1673 if ( index < 24 ) {
1674 mTimezoneOffsetSpin->setEnabled ( false );
1675 mTimezoneOffsetSpin->setValue( ( index-11 ) * 60 );
1676
1677
1678 } else {
1679 if ( index == 24 ) {
1680 mTimezoneOffsetSpin->setEnabled ( true );
1681 mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset);
1682
1683 } else {
1684 mTimezoneOffsetSpin->setEnabled ( false );
1685 mTimezoneOffsetSpin->setValue( 0 );
1686 }
1687 }
1688 */
1689}
1690
1691void KOPrefsDialog::setupTimeZoneTab()
1692{
1693#if 0
1694 QFrame *topFrame = addPage(i18n("Time Zone"),0,0);
1695 // DesktopIcon("clock",KIcon::SizeMedium));
1696
1697 QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
1698 topLayout->setSpacing(mSpacingHint);
1699 topLayout->setMargin(mMarginHint);
1700
1701 QHBox *timeZoneBox = new QHBox( topFrame );
1702 topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 );
1703
1704 new QLabel( i18n("Timezone:"), timeZoneBox );
1705 mTimeZoneCombo = new QComboBox( timeZoneBox );
1706 if ( QApplication::desktop()->width() < 300 ) {
1707 mTimeZoneCombo->setMaximumWidth(150);
1708 }
1709
1710 QStringList list;
1711 list = KGlobal::locale()->timeZoneList();
1712 mTimeZoneCombo->insertStringList(list);
1713
1714 // find the currently set time zone and select it
1715 QString sCurrentlySet = KOPrefs::instance()->mTimeZoneId;
1716 int nCurrentlySet = 11;
1717 for (int i = 0; i < mTimeZoneCombo->count(); i++)
1718 {
1719 if (mTimeZoneCombo->text(i) == sCurrentlySet)
1720 {
1721 nCurrentlySet = i;
1722 break;
1723 }
1724 }
1725 mTimeZoneCombo->setCurrentItem(nCurrentlySet);
1726 int iii = 1;
1727 KPrefsDialogWidBool *sb =
1728 addWidBool(i18n("Timezone has daylight saving"),
1729 &(KOPrefs::instance()->mUseDaylightsaving),topFrame);
1730 topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
1731 ++iii;
1732 QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame );
1733 topLayout->addMultiCellWidget(lab, iii,iii,0,1);
1734 ++iii;
1735 lab = new QLabel( i18n("The year in the date is ignored."), topFrame );
1736 topLayout->addMultiCellWidget(lab, iii,iii,0,1);
1737 ++iii;
1738 lab = new QLabel( i18n("Daylight start:"), topFrame );
1739 topLayout->addWidget(lab, iii,0);
1740 mStartDateSavingEdit = new KDateEdit(topFrame);
1741 topLayout->addWidget(mStartDateSavingEdit, iii,1);
1742 ++iii;
1743
1744 lab = new QLabel( i18n("Daylight end:"), topFrame );
1745 topLayout->addWidget(lab, iii,0);
1746 mEndDateSavingEdit = new KDateEdit(topFrame);
1747 topLayout->addWidget(mEndDateSavingEdit, iii,1);
1748 ++iii;
1749 QDate current ( 2001, 1,1);
1750 mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1));
1751 mEndDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingEnd-1));
1752#endif
1753
1754}
1755 1497
diff --git a/korganizer/koprefsdialog.h b/korganizer/koprefsdialog.h
index 6892028..80d6545 100644
--- a/korganizer/koprefsdialog.h
+++ b/korganizer/koprefsdialog.h
@@ -59,3 +59,2 @@ class KOPrefsDialog : public KPrefsDialog
59 void updateCategories(); 59 void updateCategories();
60 void showSyncPage();
61 protected slots: 60 protected slots:
@@ -64,9 +63,2 @@ class KOPrefsDialog : public KPrefsDialog
64 void updateCategoryColor(); 63 void updateCategoryColor();
65 void updateTimezoneOffset( int );
66
67
68 void warningExperimental(bool on);
69 void warningGroupScheduling();
70 void warningProjectView();
71
72 void toggleEmailSettings(bool); 64 void toggleEmailSettings(bool);
@@ -86,3 +78,2 @@ class KOPrefsDialog : public KPrefsDialog
86 void setupTimeTab(); 78 void setupTimeTab();
87 void setupTimeZoneTab();
88 void setupLocaleTab(); 79 void setupLocaleTab();
@@ -96,4 +87,2 @@ class KOPrefsDialog : public KPrefsDialog
96 void setupGroupAutomationTab(); 87 void setupGroupAutomationTab();
97 void setupSyncTab();
98 void setupSyncAlgTab();
99 88
@@ -103,3 +92,2 @@ class KOPrefsDialog : public KPrefsDialog
103 private: 92 private:
104 KDEPIMConfigWidget* kdelibcfg;
105 KPrefsDialogWidBool *mEnableGroupScheduling; 93 KPrefsDialogWidBool *mEnableGroupScheduling;
diff --git a/libkdepim/kprefsdialog.cpp b/libkdepim/kprefsdialog.cpp
index b6ae775..6dc741d 100644
--- a/libkdepim/kprefsdialog.cpp
+++ b/libkdepim/kprefsdialog.cpp
@@ -49,2 +49,3 @@
49#include <kglobal.h> 49#include <kglobal.h>
50#include <kglobalsettings.h>
50#include <kfontdialog.h> 51#include <kfontdialog.h>
@@ -55,2 +56,3 @@
55#include "kprefs.h" 56#include "kprefs.h"
57#include "kpimglobalprefs.h"
56 58
@@ -410 +412,29 @@ void KPrefsDialog::slotDefault()
410} 412}
413
414KPimPrefsGlobalDialog::KPimPrefsGlobalDialog(QWidget *parent,char *name,bool modal): KPrefsDialog( KPimGlobalPrefs::instance() ,parent, name, modal )
415{
416 setFont( KGlobalSettings::generalMaxFont() );
417 kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), this, "KPrefsGlobalDialog" );
418 setMainWidget( kdelibcfg );
419 setCaption( i18n("KDE-Pim Global Settings"));
420 kdelibcfg->readConfig();
421#ifndef DESKTOP_VERSION
422 if ( QApplication::desktop()->height() <= 480 )
423 hideButtons();
424 showMaximized();
425#endif
426}
427void KPimPrefsGlobalDialog::showTZconfig()
428{
429 kdelibcfg->showTimeZoneTab() ;
430}
431void KPimPrefsGlobalDialog::usrReadConfig()
432{
433 kdelibcfg->readConfig();
434}
435
436void KPimPrefsGlobalDialog::usrWriteConfig()
437{
438 kdelibcfg->writeConfig();
439}
440
diff --git a/libkdepim/kprefsdialog.h b/libkdepim/kprefsdialog.h
index efcb86a..52ec809 100644
--- a/libkdepim/kprefsdialog.h
+++ b/libkdepim/kprefsdialog.h
@@ -444,2 +444,28 @@ class KPrefsDialog : public KDialogBase
444 444
445
446#include "kcmconfigs/kdepimconfigwidget.h"
447class KPimPrefsGlobalDialog : public KPrefsDialog
448{
449 Q_OBJECT
450 public:
451 KPimPrefsGlobalDialog(QWidget *parent=0,char *name=0,bool modal=true);
452 /**
453 Destructor.
454 */
455 void showTZconfig();
456
457 public slots:
458
459 signals:
460 protected slots:
461
462 protected:
463 void usrReadConfig();
464 virtual void usrWriteConfig() ;
465
466 private:
467 KDEPIMConfigWidget* kdelibcfg;
468
469};
470
445#endif 471#endif