summaryrefslogtreecommitdiffabout
path: root/korganizer/koprefsdialog.cpp
Side-by-side diff
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
@@ -88,4 +88,6 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
#endif
-
+ kdelibcfg = 0;
+ if ( !parent )
setupGlobalTab();
+ else {
setupMainTab();
@@ -103,3 +105,3 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
//setupGroupAutomationTab();
-
+ }
@@ -113,6 +115,6 @@ 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"));
@@ -242,3 +244,3 @@ void KOPrefsDialog::showSyncPage()
{
- showPage ( 0 ) ;
+ // showPage ( 0 ) ;
kdelibcfg->showTimeZoneTab() ;
@@ -1460,3 +1462,5 @@ void KOPrefsDialog::usrReadConfig()
{
- kdelibcfg->readConfig();
+ if ( kdelibcfg )
+ kdelibcfg->readConfig();
+ else {
mNameEdit->setText(KOPrefs::instance()->fullName());
@@ -1504,2 +1508,3 @@ void KOPrefsDialog::usrReadConfig()
mAlarmBeepInterval->setValue(KOPrefs::instance()->mAlarmBeepInterval );
+ }
}
@@ -1509,4 +1514,5 @@ void KOPrefsDialog::usrWriteConfig()
{
-
- kdelibcfg->writeConfig();
+ if ( kdelibcfg )
+ kdelibcfg->writeConfig();
+ else {
// KOPrefs::instance()->mRemoteIP = mRemoteIPEdit->text();
@@ -1568,3 +1574,3 @@ void KOPrefsDialog::usrWriteConfig()
KOPrefs::instance()->mAlarmBeepInterval= mAlarmBeepInterval->value() ;
-
+ }
}