author | zautrix <zautrix> | 2005-06-10 10:31:22 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-10 10:31:22 (UTC) |
commit | e5ca8e0d8d6d08b597253f43de401aa1a99a6abe (patch) (unidiff) | |
tree | c319ba89abbe5cd90647bc38deb0ab1ce46f48e5 /kaddressbook | |
parent | 89c5159208fd982f527117e49d67ea1f90553dbe (diff) | |
download | kdepimpi-e5ca8e0d8d6d08b597253f43de401aa1a99a6abe.zip kdepimpi-e5ca8e0d8d6d08b597253f43de401aa1a99a6abe.tar.gz kdepimpi-e5ca8e0d8d6d08b597253f43de401aa1a99a6abe.tar.bz2 |
config dialog fixes
-rw-r--r-- | kaddressbook/kabcore.cpp | 40 | ||||
-rw-r--r-- | kaddressbook/kabcore.h | 2 | ||||
-rw-r--r-- | kaddressbook/kcmconfigs/kcmkabconfig.h | 2 |
3 files changed, 30 insertions, 14 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 | 1615 | void KABCore::openConfigGlobalDialog() | |
1616 | { | ||
1617 | KPimPrefsGlobalDialog gc ( this ); | ||
1618 | gc.exec(); | ||
1619 | } | ||
1615 | void KABCore::openConfigDialog() | 1620 | void 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(); |