summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabprefs.cpp
Unidiff
Diffstat (limited to 'kaddressbook/kabprefs.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabprefs.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/kaddressbook/kabprefs.cpp b/kaddressbook/kabprefs.cpp
index 552c933..dded2bf 100644
--- a/kaddressbook/kabprefs.cpp
+++ b/kaddressbook/kabprefs.cpp
@@ -61,50 +61,51 @@ KABPrefs::KABPrefs()
61 addItemIntList( "ExtensionsSplitter", &mExtensionsSplitter ); 61 addItemIntList( "ExtensionsSplitter", &mExtensionsSplitter );
62 addItemIntList( "DetailsSplitter", &mDetailsSplitter ); 62 addItemIntList( "DetailsSplitter", &mDetailsSplitter );
63 addItemBool( "MultipleViewsAtOnce", &mMultipleViewsAtOnce, true ); 63 addItemBool( "MultipleViewsAtOnce", &mMultipleViewsAtOnce, true );
64 64
65 65
66 KPrefs::setCurrentGroup( "Extensions_General" ); 66 KPrefs::setCurrentGroup( "Extensions_General" );
67 QStringList defaultExtensions; 67 QStringList defaultExtensions;
68 defaultExtensions << "merge"; 68 defaultExtensions << "merge";
69 defaultExtensions << "distribution_list_editor"; 69 defaultExtensions << "distribution_list_editor";
70 addItemInt( "CurrentExtension", &mCurrentExtension, 0 ); 70 addItemInt( "CurrentExtension", &mCurrentExtension, 0 );
71 addItemStringList( "ActiveExtensions", &mActiveExtensions, defaultExtensions ); 71 addItemStringList( "ActiveExtensions", &mActiveExtensions, defaultExtensions );
72 72
73 KPrefs::setCurrentGroup( "Views" ); 73 KPrefs::setCurrentGroup( "Views" );
74 QString defaultView = i18n( "Default Table View" ); 74 QString defaultView = i18n( "Default Table View" );
75 addItemString( "CurrentView", &mCurrentView, defaultView ); 75 addItemString( "CurrentView", &mCurrentView, defaultView );
76 addItemStringList( "ViewNames", &mViewNames, defaultView ); 76 addItemStringList( "ViewNames", &mViewNames, defaultView );
77 77
78 KPrefs::setCurrentGroup( "Filters" ); 78 KPrefs::setCurrentGroup( "Filters" );
79 addItemInt( "CurrentFilter", &mCurrentFilter, 0 ); 79 addItemInt( "CurrentFilter", &mCurrentFilter, 0 );
80 80
81} 81}
82 82
83KABPrefs::~KABPrefs() 83KABPrefs::~KABPrefs()
84{ 84{
85 //qDebug("KABPrefs::~KABPrefs() ");
85} 86}
86 87
87KABPrefs *KABPrefs::instance() 88KABPrefs *KABPrefs::instance()
88{ 89{
89 if ( !sInstance ) { 90 if ( !sInstance ) {
90#ifdef KAB_EMBEDDED 91#ifdef KAB_EMBEDDED
91 sInstance = staticDeleter.setObject( new KABPrefs() ); 92 sInstance = staticDeleter.setObject( new KABPrefs() );
92#else //KAB_EMBEDDED 93#else //KAB_EMBEDDED
93 //US the following line has changed ???. Why 94 //US the following line has changed ???. Why
94 staticDeleter.setObject( sInstance, new KABPrefs() ); 95 staticDeleter.setObject( sInstance, new KABPrefs() );
95#endif //KAB_EMBEDDED 96#endif //KAB_EMBEDDED
96 sInstance->readConfig(); 97 sInstance->readConfig();
97 } 98 }
98 99
99 return sInstance; 100 return sInstance;
100} 101}
101 102
102void KABPrefs::setCategoryDefaults() 103void KABPrefs::setCategoryDefaults()
103{ 104{
104 mCustomCategories.clear(); 105 mCustomCategories.clear();
105 106
106 mCustomCategories << i18n( "Business" ) << i18n( "Family" ) << i18n( "School" ) 107 mCustomCategories << i18n( "Business" ) << i18n( "Family" ) << i18n( "School" )
107 << i18n( "Customer" ) << i18n( "Friend" ); 108 << i18n( "Customer" ) << i18n( "Friend" );
108} 109}
109 110
110 // US introduce a nonconst way to return the config object. 111 // US introduce a nonconst way to return the config object.