summaryrefslogtreecommitdiffabout
path: root/korganizer/koprefsdialog.cpp
authorzautrix <zautrix>2005-06-09 16:17:14 (UTC)
committer zautrix <zautrix>2005-06-09 16:17:14 (UTC)
commit89c5159208fd982f527117e49d67ea1f90553dbe (patch) (side-by-side diff)
treeb6b72ca9e0668e871a6969b25654945747015d0f /korganizer/koprefsdialog.cpp
parentad88eadf0bdb34cb4a93639b50a5566a06470c22 (diff)
downloadkdepimpi-89c5159208fd982f527117e49d67ea1f90553dbe.zip
kdepimpi-89c5159208fd982f527117e49d67ea1f90553dbe.tar.gz
kdepimpi-89c5159208fd982f527117e49d67ea1f90553dbe.tar.bz2
dialog fixes
Diffstat (limited to 'korganizer/koprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koprefsdialog.cpp28
1 files changed, 17 insertions, 11 deletions
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index c9477e3..4b5b66a 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -83,14 +83,16 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
mSpacingHint = spacingHintSmall();
mMarginHint = marginHintSmall();
#ifndef DESKTOP_VERSION
if ( QApplication::desktop()->height() == 480 )
hideButtons();
#endif
-
+ kdelibcfg = 0;
+ if ( !parent )
setupGlobalTab();
+ else {
setupMainTab();
// setupLocaleTab();
//setupTimeZoneTab();
setupTimeTab();
//setupLocaleDateTab();
setupFontsTab();
@@ -98,26 +100,26 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
setupViewsTab();
//setupSyncTab();
//setupSyncAlgTab();
//setupPrinterTab();
//setupGroupSchedulingTab();
//setupGroupAutomationTab();
-
+ }
}
KOPrefsDialog::~KOPrefsDialog()
{
}
void KOPrefsDialog::setupGlobalTab()
{
- QFrame *topFrame = addPage(i18n("Global"),0,0);
- kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" );
- QVBoxLayout *topLayout = new QVBoxLayout(topFrame);
- topLayout->addWidget( kdelibcfg );
+ //QFrame *topFrame = addPage(i18n("Global"),0,0);
+ kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), this, "KCMKdeLibConfig" );
+ setMainWidget( kdelibcfg );
+ setCaption( i18n("KDE-Pim Global Settings"));
}
void KOPrefsDialog::setupLocaleDateTab()
{
#if 0
@@ -237,13 +239,13 @@ void KOPrefsDialog::setupLocaleTab()
topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
#endif
#endif
}
void KOPrefsDialog::showSyncPage()
{
- showPage ( 0 ) ;
+ // showPage ( 0 ) ;
kdelibcfg->showTimeZoneTab() ;
}
void KOPrefsDialog::setupSyncAlgTab()
{
#if 0
@@ -1455,13 +1457,15 @@ void KOPrefsDialog::setCombo(QComboBox *combo, const QString & text,
}
}
}
void KOPrefsDialog::usrReadConfig()
{
- kdelibcfg->readConfig();
+ if ( kdelibcfg )
+ kdelibcfg->readConfig();
+ else {
mNameEdit->setText(KOPrefs::instance()->fullName());
mEmailEdit->setText(KOPrefs::instance()->email());
mAutoSaveIntervalSpin->setValue(KOPrefs::instance()->mAutoSaveInterval);
// QDate current ( 2001, 1,1);
//mStartDateSavingEdit->setDate(current.addDays(KOPrefs::instance()->mDaylightsavingStart-1));
@@ -1499,19 +1503,21 @@ void KOPrefsDialog::usrReadConfig()
//mUserDateFormatShort->setText(dummy.replace( QRegExp("K"), QString(",") ));
updateCategories();
mAlarmPlayBeeps->setValue(KOPrefs::instance()->mAlarmPlayBeeps );
mAlarmSuspendTime->setValue(KOPrefs::instance()->mAlarmSuspendTime );
mAlarmSuspendCount->setValue(KOPrefs::instance()->mAlarmSuspendCount );
mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval );
+ }
}
void KOPrefsDialog::usrWriteConfig()
{
-
- kdelibcfg->writeConfig();
+ if ( kdelibcfg )
+ kdelibcfg->writeConfig();
+ else {
// KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text();
//KOPrefs::instance()->mRemoteUser = mRemoteUser->text();
//KOPrefs::instance()->mRemotePassWd = mRemotePassWd->text();
//KOPrefs::instance()->mRemoteFile= mRemoteFile->text();
//KOPrefs::instance()->mLocalTempFile =mLocalTempFile->text();
KOPrefs::instance()->mDefaultAlarmFile =mDefaultAlarmFile->text();
@@ -1563,13 +1569,13 @@ void KOPrefsDialog::usrWriteConfig()
// item = item->nextSibling();
// }
KOPrefs::instance()->mAlarmPlayBeeps = mAlarmPlayBeeps->value();
KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ;
KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ;
KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ;
-
+ }
}
void KOPrefsDialog::updateCategories()
{
mCategoryCombo->clear();
mCategoryDict.clear();