-rw-r--r-- | kaddressbook/kabprefs.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kaddressbook/kabprefs.cpp b/kaddressbook/kabprefs.cpp index 0c192dd..03c5e76 100644 --- a/kaddressbook/kabprefs.cpp +++ b/kaddressbook/kabprefs.cpp | |||
@@ -29,64 +29,66 @@ | |||
29 | #include <kconfig.h> | 29 | #include <kconfig.h> |
30 | #include <klocale.h> | 30 | #include <klocale.h> |
31 | #include <kstaticdeleter.h> | 31 | #include <kstaticdeleter.h> |
32 | //US#include <kdebug.h> // defines kdDebug() | 32 | //US#include <kdebug.h> // defines kdDebug() |
33 | 33 | ||
34 | #include "kabprefs.h" | 34 | #include "kabprefs.h" |
35 | 35 | ||
36 | KABPrefs *KABPrefs::sInstance = 0; | 36 | KABPrefs *KABPrefs::sInstance = 0; |
37 | static KStaticDeleter<KABPrefs> staticDeleter; | 37 | static KStaticDeleter<KABPrefs> staticDeleter; |
38 | 38 | ||
39 | KABPrefs::KABPrefs() | 39 | KABPrefs::KABPrefs() |
40 | : KPimPrefs("kaddressbookrc") | 40 | : KPimPrefs("kaddressbookrc") |
41 | { | 41 | { |
42 | KPrefs::setCurrentGroup( "Views" ); | 42 | KPrefs::setCurrentGroup( "Views" ); |
43 | addItemBool( "HonorSingleClick", &mHonorSingleClick, false ); | 43 | addItemBool( "HonorSingleClick", &mHonorSingleClick, false ); |
44 | 44 | ||
45 | KPrefs::setCurrentGroup( "General" ); | 45 | KPrefs::setCurrentGroup( "General" ); |
46 | addItemBool( "AutomaticNameParsing", &mAutomaticNameParsing, true ); | 46 | addItemBool( "AutomaticNameParsing", &mAutomaticNameParsing, true ); |
47 | addItemInt( "CurrentIncSearchField", &mCurrentIncSearchField, 0 ); | 47 | addItemInt( "CurrentIncSearchField", &mCurrentIncSearchField, 0 ); |
48 | 48 | ||
49 | #ifdef KAB_EMBEDDED | 49 | #ifdef KAB_EMBEDDED |
50 | addItemBool("AskForQuit",&mAskForQuit,false); | 50 | addItemBool("AskForQuit",&mAskForQuit,false); |
51 | addItemBool("ToolBarHor",&mToolBarHor, true ); | 51 | addItemBool("ToolBarHor",&mToolBarHor, true ); |
52 | addItemBool("ToolBarUp",&mToolBarUp, false ); | 52 | addItemBool("ToolBarUp",&mToolBarUp, false ); |
53 | 53 | ||
54 | #endif //KAB_EMBEDDED | 54 | #endif //KAB_EMBEDDED |
55 | 55 | ||
56 | KPrefs::setCurrentGroup( "MainWindow" ); | 56 | KPrefs::setCurrentGroup( "MainWindow" ); |
57 | addItemBool( "JumpButtonBarVisible", &mJumpButtonBarVisible, false ); | 57 | addItemBool( "JumpButtonBarVisible", &mJumpButtonBarVisible, false ); |
58 | addItemBool( "DetailsPageVisible", &mDetailsPageVisible, true ); | 58 | addItemBool( "DetailsPageVisible", &mDetailsPageVisible, true ); |
59 | addItemIntList( "ExtensionsSplitter", &mExtensionsSplitter ); | 59 | addItemIntList( "ExtensionsSplitter", &mExtensionsSplitter ); |
60 | addItemIntList( "DetailsSplitter", &mDetailsSplitter ); | 60 | addItemIntList( "DetailsSplitter", &mDetailsSplitter ); |
61 | addItemBool( "MultipleViewsAtOnce", &mMultipleViewsAtOnce, true ); | ||
62 | |||
61 | 63 | ||
62 | KPrefs::setCurrentGroup( "Extensions_General" ); | 64 | KPrefs::setCurrentGroup( "Extensions_General" ); |
63 | QStringList defaultExtensions; | 65 | QStringList defaultExtensions; |
64 | defaultExtensions << "merge"; | 66 | defaultExtensions << "merge"; |
65 | defaultExtensions << "distribution_list_editor"; | 67 | defaultExtensions << "distribution_list_editor"; |
66 | addItemInt( "CurrentExtension", &mCurrentExtension, 0 ); | 68 | addItemInt( "CurrentExtension", &mCurrentExtension, 0 ); |
67 | addItemStringList( "ActiveExtensions", &mActiveExtensions, defaultExtensions ); | 69 | addItemStringList( "ActiveExtensions", &mActiveExtensions, defaultExtensions ); |
68 | 70 | ||
69 | KPrefs::setCurrentGroup( "Views" ); | 71 | KPrefs::setCurrentGroup( "Views" ); |
70 | QString defaultView = i18n( "Default Table View" ); | 72 | QString defaultView = i18n( "Default Table View" ); |
71 | addItemString( "CurrentView", &mCurrentView, defaultView ); | 73 | addItemString( "CurrentView", &mCurrentView, defaultView ); |
72 | addItemStringList( "ViewNames", &mViewNames, defaultView ); | 74 | addItemStringList( "ViewNames", &mViewNames, defaultView ); |
73 | 75 | ||
74 | KPrefs::setCurrentGroup( "Filters" ); | 76 | KPrefs::setCurrentGroup( "Filters" ); |
75 | addItemInt( "CurrentFilter", &mCurrentFilter, 0 ); | 77 | addItemInt( "CurrentFilter", &mCurrentFilter, 0 ); |
76 | 78 | ||
77 | } | 79 | } |
78 | 80 | ||
79 | KABPrefs::~KABPrefs() | 81 | KABPrefs::~KABPrefs() |
80 | { | 82 | { |
81 | } | 83 | } |
82 | 84 | ||
83 | KABPrefs *KABPrefs::instance() | 85 | KABPrefs *KABPrefs::instance() |
84 | { | 86 | { |
85 | if ( !sInstance ) { | 87 | if ( !sInstance ) { |
86 | #ifdef KAB_EMBEDDED | 88 | #ifdef KAB_EMBEDDED |
87 | sInstance = staticDeleter.setObject( new KABPrefs() ); | 89 | sInstance = staticDeleter.setObject( new KABPrefs() ); |
88 | #else //KAB_EMBEDDED | 90 | #else //KAB_EMBEDDED |
89 | //US the following line has changed ???. Why | 91 | //US the following line has changed ???. Why |
90 | staticDeleter.setObject( sInstance, new KABPrefs() ); | 92 | staticDeleter.setObject( sInstance, new KABPrefs() ); |
91 | #endif //KAB_EMBEDDED | 93 | #endif //KAB_EMBEDDED |
92 | sInstance->readConfig(); | 94 | sInstance->readConfig(); |