-rw-r--r-- | kaddressbook/kcmconfigs/kabconfigwidget.cpp | 6 | ||||
-rw-r--r-- | kaddressbook/kcmconfigs/kabconfigwidget.h | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.cpp b/kaddressbook/kcmconfigs/kabconfigwidget.cpp index 3a2ccbb..0c3a199 100644 --- a/kaddressbook/kcmconfigs/kabconfigwidget.cpp +++ b/kaddressbook/kcmconfigs/kabconfigwidget.cpp | |||
@@ -103,12 +103,14 @@ KABConfigWidget::KABConfigWidget( QWidget *parent, const char *name ) | |||
103 | QVBoxLayout *boxLayout = new QVBoxLayout( vBox->layout(), -1, "qvboxlayout" ); | 103 | QVBoxLayout *boxLayout = new QVBoxLayout( vBox->layout(), -1, "qvboxlayout" ); |
104 | boxLayout->setAlignment( Qt::AlignTop ); | 104 | boxLayout->setAlignment( Qt::AlignTop ); |
105 | boxLayout->setMargin(KDialog::marginHintSmall() ); | 105 | boxLayout->setMargin(KDialog::marginHintSmall() ); |
106 | vBox->layout()->setMargin(KDialog::marginHintSmall()) ; | 106 | vBox->layout()->setMargin(KDialog::marginHintSmall()) ; |
107 | vBox->layout()->setSpacing(KDialog::spacingHintSmall()); | 107 | vBox->layout()->setSpacing(KDialog::spacingHintSmall()); |
108 | boxLayout->setSpacing( KDialog::spacingHintSmall() ); | 108 | boxLayout->setSpacing( KDialog::spacingHintSmall() ); |
109 | mSearchReturnBox = new QCheckBox( i18n( "Search only after <return> key pressed" ), vBox, "mreturn" ); | ||
110 | boxLayout->addWidget( mSearchReturnBox ); | ||
109 | mViewsSingleClickBox = new QCheckBox( i18n( "Honor KDE single click" ), vBox, "msingle" ); | 111 | mViewsSingleClickBox = new QCheckBox( i18n( "Honor KDE single click" ), vBox, "msingle" ); |
110 | boxLayout->addWidget( mViewsSingleClickBox ); | 112 | boxLayout->addWidget( mViewsSingleClickBox ); |
111 | 113 | ||
112 | mNameParsing = new QCheckBox( i18n( "Automatic name parsing for new addressees" ), vBox, "mparse" ); | 114 | mNameParsing = new QCheckBox( i18n( "Automatic name parsing for new addressees" ), vBox, "mparse" ); |
113 | boxLayout->addWidget( mNameParsing ); | 115 | boxLayout->addWidget( mNameParsing ); |
114 | 116 | ||
@@ -149,12 +151,13 @@ KABConfigWidget::KABConfigWidget( QWidget *parent, const char *name ) | |||
149 | boxLayout->addWidget( mConfigureButton ); | 151 | boxLayout->addWidget( mConfigureButton ); |
150 | 152 | ||
151 | extensionLayout->addWidget( groupBox ); | 153 | extensionLayout->addWidget( groupBox ); |
152 | 154 | ||
153 | connect( mNameParsing, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); | 155 | connect( mNameParsing, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); |
154 | connect( mViewsSingleClickBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); | 156 | connect( mViewsSingleClickBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); |
157 | connect( mSearchReturnBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); | ||
155 | connect( mMultipleViewsAtOnce, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); | 158 | connect( mMultipleViewsAtOnce, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); |
156 | connect( mAskForQuit, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); | 159 | connect( mAskForQuit, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); |
157 | connect( mExtensionView, SIGNAL( selectionChanged( QListViewItem* ) ), | 160 | connect( mExtensionView, SIGNAL( selectionChanged( QListViewItem* ) ), |
158 | SLOT( selectionChanged( QListViewItem* ) ) ); | 161 | SLOT( selectionChanged( QListViewItem* ) ) ); |
159 | connect( mExtensionView, SIGNAL( clicked( QListViewItem* ) ), | 162 | connect( mExtensionView, SIGNAL( clicked( QListViewItem* ) ), |
160 | SLOT( itemClicked( QListViewItem* ) ) ); | 163 | SLOT( itemClicked( QListViewItem* ) ) ); |
@@ -177,12 +180,13 @@ void KABConfigWidget::restoreSettings(KABPrefs* prefs) | |||
177 | 180 | ||
178 | bool blocked = signalsBlocked(); | 181 | bool blocked = signalsBlocked(); |
179 | blockSignals( true ); | 182 | blockSignals( true ); |
180 | 183 | ||
181 | mNameParsing->setChecked( prefs->mAutomaticNameParsing ); | 184 | mNameParsing->setChecked( prefs->mAutomaticNameParsing ); |
182 | mViewsSingleClickBox->setChecked( prefs->mHonorSingleClick ); | 185 | mViewsSingleClickBox->setChecked( prefs->mHonorSingleClick ); |
186 | mSearchReturnBox->setChecked( prefs->mSearchWithReturn ); | ||
183 | mMultipleViewsAtOnce->setChecked( prefs->mMultipleViewsAtOnce ); | 187 | mMultipleViewsAtOnce->setChecked( prefs->mMultipleViewsAtOnce ); |
184 | mAskForQuit->setChecked( prefs->mAskForQuit ); | 188 | mAskForQuit->setChecked( prefs->mAskForQuit ); |
185 | 189 | ||
186 | mAddresseeWidget->restoreSettings(); | 190 | mAddresseeWidget->restoreSettings(); |
187 | 191 | ||
188 | restoreExtensionSettings(); | 192 | restoreExtensionSettings(); |
@@ -193,12 +197,13 @@ void KABConfigWidget::restoreSettings(KABPrefs* prefs) | |||
193 | } | 197 | } |
194 | 198 | ||
195 | void KABConfigWidget::saveSettings(KABPrefs* prefs) | 199 | void KABConfigWidget::saveSettings(KABPrefs* prefs) |
196 | { | 200 | { |
197 | prefs->mAutomaticNameParsing = mNameParsing->isChecked(); | 201 | prefs->mAutomaticNameParsing = mNameParsing->isChecked(); |
198 | prefs->mHonorSingleClick = mViewsSingleClickBox->isChecked(); | 202 | prefs->mHonorSingleClick = mViewsSingleClickBox->isChecked(); |
203 | prefs->mSearchWithReturn = mSearchReturnBox->isChecked(); | ||
199 | prefs->mMultipleViewsAtOnce = mMultipleViewsAtOnce->isChecked(); | 204 | prefs->mMultipleViewsAtOnce = mMultipleViewsAtOnce->isChecked(); |
200 | prefs->mAskForQuit = mAskForQuit->isChecked(); | 205 | prefs->mAskForQuit = mAskForQuit->isChecked(); |
201 | 206 | ||
202 | mAddresseeWidget->saveSettings(); | 207 | mAddresseeWidget->saveSettings(); |
203 | 208 | ||
204 | saveExtensionSettings(); | 209 | saveExtensionSettings(); |
@@ -209,12 +214,13 @@ void KABConfigWidget::saveSettings(KABPrefs* prefs) | |||
209 | 214 | ||
210 | void KABConfigWidget::defaults(KABPrefs* prefs) | 215 | void KABConfigWidget::defaults(KABPrefs* prefs) |
211 | { | 216 | { |
212 | mNameParsing->setChecked( true ); | 217 | mNameParsing->setChecked( true ); |
213 | mViewsSingleClickBox->setChecked( false ); | 218 | mViewsSingleClickBox->setChecked( false ); |
214 | mMultipleViewsAtOnce->setChecked( true ); | 219 | mMultipleViewsAtOnce->setChecked( true ); |
220 | mSearchReturnBox->setChecked( true ); | ||
215 | mAskForQuit->setChecked (true); | 221 | mAskForQuit->setChecked (true); |
216 | 222 | ||
217 | emit changed( true ); | 223 | emit changed( true ); |
218 | } | 224 | } |
219 | 225 | ||
220 | void KABConfigWidget::modified() | 226 | void KABConfigWidget::modified() |
diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.h b/kaddressbook/kcmconfigs/kabconfigwidget.h index 831efc1..6cd4223 100644 --- a/kaddressbook/kcmconfigs/kabconfigwidget.h +++ b/kaddressbook/kcmconfigs/kabconfigwidget.h | |||
@@ -62,13 +62,13 @@ class KABConfigWidget : public QWidget | |||
62 | 62 | ||
63 | private: | 63 | private: |
64 | void restoreExtensionSettings(); | 64 | void restoreExtensionSettings(); |
65 | void saveExtensionSettings(); | 65 | void saveExtensionSettings(); |
66 | 66 | ||
67 | KListView *mExtensionView; | 67 | KListView *mExtensionView; |
68 | 68 | QCheckBox *mSearchReturnBox; | |
69 | QCheckBox *mNameParsing; | 69 | QCheckBox *mNameParsing; |
70 | QCheckBox *mViewsSingleClickBox; | 70 | QCheckBox *mViewsSingleClickBox; |
71 | QCheckBox *mMultipleViewsAtOnce; | 71 | QCheckBox *mMultipleViewsAtOnce; |
72 | QCheckBox *mAskForQuit; | 72 | QCheckBox *mAskForQuit; |
73 | 73 | ||
74 | QPushButton *mConfigureButton; | 74 | QPushButton *mConfigureButton; |