-rw-r--r-- | kaddressbook/kcmconfigs/kabconfigwidget.cpp | 15 | ||||
-rw-r--r-- | kaddressbook/kcmconfigs/kabconfigwidget.h | 2 |
2 files changed, 17 insertions, 0 deletions
diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.cpp b/kaddressbook/kcmconfigs/kabconfigwidget.cpp index 3ad2f74..986c9b8 100644 --- a/kaddressbook/kcmconfigs/kabconfigwidget.cpp +++ b/kaddressbook/kcmconfigs/kabconfigwidget.cpp @@ -118,16 +118,24 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * QVBoxLayout *boxLayout = new QVBoxLayout( vBox ); boxLayout->setAlignment( Qt::AlignTop ); boxLayout->setMargin(KDialog::marginHintSmall() ); boxLayout->setSpacing( KDialog::spacingHintSmall() ); mMenuBarBox = new QCheckBox( i18n( "Full Menu bar (restart)" ), vBox, "mremenuturn" ); boxLayout->addWidget( mMenuBarBox ); mSearchReturnBox = new QCheckBox( i18n( "Search only after <return> key pressed" ), vBox, "mreturn" ); boxLayout->addWidget( mSearchReturnBox ); + mAutoSearchWithWildcardBox = new QCheckBox( i18n( "Search with '*' prefix (wildcard)" ), vBox, "mwildcard" ); + boxLayout->addWidget( mAutoSearchWithWildcardBox); + mHideSearchOnSwitchBox = new QCheckBox( i18n( "Shrink searchfield in portrait view" ), vBox, "mswitch" ); + boxLayout->addWidget( mHideSearchOnSwitchBox ); + +#ifdef DESKTOP_VERSION + mHideSearchOnSwitchBox->hide(); +#endif mViewsSingleClickBox = new QCheckBox( i18n( "Honor KDE single click" ), vBox, "msingle" ); boxLayout->addWidget( mViewsSingleClickBox ); mNameParsing = new QCheckBox( i18n( "Automatic name parsing for new addressees" ), vBox, "mparse" ); boxLayout->addWidget( mNameParsing ); mMultipleViewsAtOnce = new QCheckBox( i18n( "Display List and Details at once (restart)" ), vBox, "mdisplay" ); boxLayout->addWidget( mMultipleViewsAtOnce ); @@ -166,16 +174,18 @@ KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char * boxLayout->addWidget( mConfigureButton ); extensionLayout->addWidget( groupBox ); connect( mMenuBarBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); connect( mNameParsing, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); connect( mViewsSingleClickBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); connect( mSearchReturnBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); + connect( mAutoSearchWithWildcardBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); + connect( mHideSearchOnSwitchBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); connect( mMultipleViewsAtOnce, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); connect( mAskForQuit, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); connect( mExtensionView, SIGNAL( selectionChanged( QListViewItem* ) ), SLOT( selectionChanged( QListViewItem* ) ) ); connect( mExtensionView, SIGNAL( clicked( QListViewItem* ) ), SLOT( itemClicked( QListViewItem* ) ) ); connect( mConfigureButton, SIGNAL( clicked() ), SLOT( configureExtension() ) ); @@ -194,16 +204,18 @@ void KABConfigWidget::usrReadConfig() KABPrefs* prefs = KABPrefs::instance(); bool blocked = signalsBlocked(); blockSignals( true ); mMenuBarBox->setChecked( prefs->mFullMenuBarVisible); mNameParsing->setChecked( prefs->mAutomaticNameParsing ); mViewsSingleClickBox->setChecked( prefs->mHonorSingleClick ); mSearchReturnBox->setChecked( prefs->mSearchWithReturn ); + mAutoSearchWithWildcardBox->setChecked( prefs->mAutoSearchWithWildcard ); + mHideSearchOnSwitchBox->setChecked( prefs->mHideSearchOnSwitch ); mMultipleViewsAtOnce->setChecked( prefs->mMultipleViewsAtOnce ); mAskForQuit->setChecked( prefs->mAskForQuit ); mAddresseeWidget->restoreSettings(); restoreExtensionSettings(); blockSignals( blocked ); @@ -212,16 +224,19 @@ void KABConfigWidget::usrReadConfig() void KABConfigWidget::usrWriteConfig() { KABPrefs* prefs = KABPrefs::instance(); prefs->mFullMenuBarVisible = mMenuBarBox->isChecked(); prefs->mAutomaticNameParsing = mNameParsing->isChecked(); prefs->mHonorSingleClick = mViewsSingleClickBox->isChecked(); prefs->mSearchWithReturn = mSearchReturnBox->isChecked(); + prefs->mAutoSearchWithWildcard = mAutoSearchWithWildcardBox->isChecked(); + prefs->mHideSearchOnSwitch = mHideSearchOnSwitchBox->isChecked(); + prefs->mMultipleViewsAtOnce = mMultipleViewsAtOnce->isChecked(); prefs->mAskForQuit = mAskForQuit->isChecked(); mAddresseeWidget->saveSettings(); saveExtensionSettings(); } diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.h b/kaddressbook/kcmconfigs/kabconfigwidget.h index 08d71b4..a172e97 100644 --- a/kaddressbook/kcmconfigs/kabconfigwidget.h +++ b/kaddressbook/kcmconfigs/kabconfigwidget.h @@ -59,16 +59,18 @@ class KABConfigWidget : public KPrefsWidget private: void restoreExtensionSettings(); void saveExtensionSettings(); KListView *mExtensionView; QCheckBox *mSearchReturnBox; QCheckBox *mNameParsing; QCheckBox *mViewsSingleClickBox; + QCheckBox *mAutoSearchWithWildcardBox; + QCheckBox *mHideSearchOnSwitchBox; QCheckBox *mMultipleViewsAtOnce; QCheckBox *mAskForQuit; QCheckBox *mMenuBarBox; QPushButton *mConfigureButton; AddresseeWidget *mAddresseeWidget; }; |