summaryrefslogtreecommitdiffabout
path: root/kaddressbook
Unidiff
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabprefs.cpp2
-rw-r--r--kaddressbook/kabprefs.h1
-rw-r--r--kaddressbook/kcmconfigs/kabconfigwidget.cpp9
-rw-r--r--kaddressbook/kcmconfigs/kabconfigwidget.h2
4 files changed, 13 insertions, 1 deletions
diff --git a/kaddressbook/kabprefs.cpp b/kaddressbook/kabprefs.cpp
index 0c192dd..03c5e76 100644
--- a/kaddressbook/kabprefs.cpp
+++ b/kaddressbook/kabprefs.cpp
@@ -55,12 +55,14 @@ KABPrefs::KABPrefs()
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 );
diff --git a/kaddressbook/kabprefs.h b/kaddressbook/kabprefs.h
index 8f149ac..03e529f 100644
--- a/kaddressbook/kabprefs.h
+++ b/kaddressbook/kabprefs.h
@@ -62,12 +62,13 @@ class KABPrefs : public KPimPrefs
62#endif //KAB_EMBEDDED 62#endif //KAB_EMBEDDED
63 63
64 64
65 // GUI 65 // GUI
66 bool mJumpButtonBarVisible; 66 bool mJumpButtonBarVisible;
67 bool mDetailsPageVisible; 67 bool mDetailsPageVisible;
68 bool mMultipleViewsAtOnce;
68 QValueList<int> mExtensionsSplitter; 69 QValueList<int> mExtensionsSplitter;
69 QValueList<int> mDetailsSplitter; 70 QValueList<int> mDetailsSplitter;
70 71
71 // Extensions stuff 72 // Extensions stuff
72 int mCurrentExtension; 73 int mCurrentExtension;
73 QStringList mActiveExtensions; 74 QStringList mActiveExtensions;
diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.cpp b/kaddressbook/kcmconfigs/kabconfigwidget.cpp
index b5309c0..31ab7b5 100644
--- a/kaddressbook/kcmconfigs/kabconfigwidget.cpp
+++ b/kaddressbook/kcmconfigs/kabconfigwidget.cpp
@@ -108,18 +108,21 @@ KABConfigWidget::KABConfigWidget( QWidget *parent, const char *name )
108 mViewsSingleClickBox = new QCheckBox( i18n( "Honor KDE single click" ), groupBox, "msingle" ); 108 mViewsSingleClickBox = new QCheckBox( i18n( "Honor KDE single click" ), groupBox, "msingle" );
109 boxLayout->addWidget( mViewsSingleClickBox ); 109 boxLayout->addWidget( mViewsSingleClickBox );
110 110
111 mNameParsing = new QCheckBox( i18n( "Automatic name parsing for new addressees" ), groupBox, "mparse" ); 111 mNameParsing = new QCheckBox( i18n( "Automatic name parsing for new addressees" ), groupBox, "mparse" );
112 boxLayout->addWidget( mNameParsing ); 112 boxLayout->addWidget( mNameParsing );
113 113
114 mMultipleViewsAtOnce = new QCheckBox( i18n( "Display List and Details at once (restart)" ), groupBox, "mdisplay" );
115 boxLayout->addWidget( mMultipleViewsAtOnce );
116
114 layout->addWidget( groupBox ); 117 layout->addWidget( groupBox );
115 118
116 119
117 //extensions groupbox 120 //extensions groupbox
118 121
119 groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Extensions" ), generalPage ); 122 groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Extensions (restart)" ), generalPage );
120 boxLayout = new QVBoxLayout( groupBox->layout() ); 123 boxLayout = new QVBoxLayout( groupBox->layout() );
121 boxLayout->setAlignment( Qt::AlignTop ); 124 boxLayout->setAlignment( Qt::AlignTop );
122 boxLayout->setMargin(KDialog::marginHintSmall()); 125 boxLayout->setMargin(KDialog::marginHintSmall());
123 boxLayout->setSpacing(KDialog::spacingHintSmall()); 126 boxLayout->setSpacing(KDialog::spacingHintSmall());
124 groupBox->layout()->setMargin(1) ; 127 groupBox->layout()->setMargin(1) ;
125 groupBox->layout()->setSpacing(0); 128 groupBox->layout()->setSpacing(0);
@@ -136,12 +139,13 @@ KABConfigWidget::KABConfigWidget( QWidget *parent, const char *name )
136 boxLayout->addWidget( mConfigureButton ); 139 boxLayout->addWidget( mConfigureButton );
137 140
138 layout->addWidget( groupBox ); 141 layout->addWidget( groupBox );
139 142
140 connect( mNameParsing, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); 143 connect( mNameParsing, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
141 connect( mViewsSingleClickBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); 144 connect( mViewsSingleClickBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
145 connect( mMultipleViewsAtOnce, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) );
142 connect( mExtensionView, SIGNAL( selectionChanged( QListViewItem* ) ), 146 connect( mExtensionView, SIGNAL( selectionChanged( QListViewItem* ) ),
143 SLOT( selectionChanged( QListViewItem* ) ) ); 147 SLOT( selectionChanged( QListViewItem* ) ) );
144 connect( mExtensionView, SIGNAL( clicked( QListViewItem* ) ), 148 connect( mExtensionView, SIGNAL( clicked( QListViewItem* ) ),
145 SLOT( itemClicked( QListViewItem* ) ) ); 149 SLOT( itemClicked( QListViewItem* ) ) );
146 connect( mConfigureButton, SIGNAL( clicked() ), 150 connect( mConfigureButton, SIGNAL( clicked() ),
147 SLOT( configureExtension() ) ); 151 SLOT( configureExtension() ) );
@@ -162,12 +166,13 @@ void KABConfigWidget::restoreSettings(KABPrefs* prefs)
162 166
163 bool blocked = signalsBlocked(); 167 bool blocked = signalsBlocked();
164 blockSignals( true ); 168 blockSignals( true );
165 169
166 mNameParsing->setChecked( prefs->mAutomaticNameParsing ); 170 mNameParsing->setChecked( prefs->mAutomaticNameParsing );
167 mViewsSingleClickBox->setChecked( prefs->mHonorSingleClick ); 171 mViewsSingleClickBox->setChecked( prefs->mHonorSingleClick );
172 mMultipleViewsAtOnce->setChecked( prefs->mMultipleViewsAtOnce );
168 173
169 mAddresseeWidget->restoreSettings(); 174 mAddresseeWidget->restoreSettings();
170 175
171 restoreExtensionSettings(); 176 restoreExtensionSettings();
172 177
173 blockSignals( blocked ); 178 blockSignals( blocked );
@@ -176,12 +181,13 @@ void KABConfigWidget::restoreSettings(KABPrefs* prefs)
176} 181}
177 182
178void KABConfigWidget::saveSettings(KABPrefs* prefs) 183void KABConfigWidget::saveSettings(KABPrefs* prefs)
179{ 184{
180 prefs->mAutomaticNameParsing = mNameParsing->isChecked(); 185 prefs->mAutomaticNameParsing = mNameParsing->isChecked();
181 prefs->mHonorSingleClick = mViewsSingleClickBox->isChecked(); 186 prefs->mHonorSingleClick = mViewsSingleClickBox->isChecked();
187 prefs->mMultipleViewsAtOnce = mMultipleViewsAtOnce->isChecked();
182 188
183 mAddresseeWidget->saveSettings(); 189 mAddresseeWidget->saveSettings();
184 190
185 saveExtensionSettings(); 191 saveExtensionSettings();
186 KABPrefs::instance()->writeConfig(); 192 KABPrefs::instance()->writeConfig();
187 193
@@ -189,12 +195,13 @@ void KABConfigWidget::saveSettings(KABPrefs* prefs)
189} 195}
190 196
191void KABConfigWidget::defaults(KABPrefs* prefs) 197void KABConfigWidget::defaults(KABPrefs* prefs)
192{ 198{
193 mNameParsing->setChecked( true ); 199 mNameParsing->setChecked( true );
194 mViewsSingleClickBox->setChecked( false ); 200 mViewsSingleClickBox->setChecked( false );
201 mMultipleViewsAtOnce->setChecked( true );
195 202
196 emit changed( true ); 203 emit changed( true );
197} 204}
198 205
199void KABConfigWidget::modified() 206void KABConfigWidget::modified()
200{ 207{
diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.h b/kaddressbook/kcmconfigs/kabconfigwidget.h
index 8c0c436..2928495 100644
--- a/kaddressbook/kcmconfigs/kabconfigwidget.h
+++ b/kaddressbook/kcmconfigs/kabconfigwidget.h
@@ -65,12 +65,14 @@ class KABConfigWidget : public QWidget
65 void saveExtensionSettings(); 65 void saveExtensionSettings();
66 66
67 KListView *mExtensionView; 67 KListView *mExtensionView;
68 68
69 QCheckBox *mNameParsing; 69 QCheckBox *mNameParsing;
70 QCheckBox *mViewsSingleClickBox; 70 QCheckBox *mViewsSingleClickBox;
71 QCheckBox *mMultipleViewsAtOnce;
72
71 QPushButton *mConfigureButton; 73 QPushButton *mConfigureButton;
72 74
73 AddresseeWidget *mAddresseeWidget; 75 AddresseeWidget *mAddresseeWidget;
74}; 76};
75 77
76#endif 78#endif