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
@@ -86,8 +86,10 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
if ( QApplication::desktop()->height() == 480 )
hideButtons();
#endif
-
+ kdelibcfg = 0;
+ if ( !parent )
setupGlobalTab();
+ else {
setupMainTab();
// setupLocaleTab();
//setupTimeZoneTab();
@@ -101,7 +103,7 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
//setupPrinterTab();
//setupGroupSchedulingTab();
//setupGroupAutomationTab();
-
+ }
}
@@ -111,10 +113,10 @@ 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"));
}
@@ -240,7 +242,7 @@ void KOPrefsDialog::setupLocaleTab()
}
void KOPrefsDialog::showSyncPage()
{
- showPage ( 0 ) ;
+ // showPage ( 0 ) ;
kdelibcfg->showTimeZoneTab() ;
}
@@ -1458,7 +1460,9 @@ 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());
@@ -1502,13 +1506,15 @@ void KOPrefsDialog::usrReadConfig()
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();
@@ -1566,7 +1572,7 @@ void KOPrefsDialog::usrWriteConfig()
KOPrefs::instance()->mAlarmSuspendTime = mAlarmSuspendTime->value() ;
KOPrefs::instance()->mAlarmSuspendCount= mAlarmSuspendCount->value() ;
KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ;
-
+ }
}
void KOPrefsDialog::updateCategories()