-rw-r--r-- | kaddressbook/kabprefs.cpp | 2 | ||||
-rw-r--r-- | kaddressbook/kabprefs.h | 1 | ||||
-rw-r--r-- | kaddressbook/kcmconfigs/kabconfigwidget.cpp | 9 | ||||
-rw-r--r-- | kaddressbook/kcmconfigs/kabconfigwidget.h | 2 |
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 @@ -49,24 +49,26 @@ KABPrefs::KABPrefs() #ifdef KAB_EMBEDDED addItemBool("AskForQuit",&mAskForQuit,false); addItemBool("ToolBarHor",&mToolBarHor, true ); addItemBool("ToolBarUp",&mToolBarUp, false ); #endif //KAB_EMBEDDED KPrefs::setCurrentGroup( "MainWindow" ); addItemBool( "JumpButtonBarVisible", &mJumpButtonBarVisible, false ); addItemBool( "DetailsPageVisible", &mDetailsPageVisible, true ); addItemIntList( "ExtensionsSplitter", &mExtensionsSplitter ); addItemIntList( "DetailsSplitter", &mDetailsSplitter ); + addItemBool( "MultipleViewsAtOnce", &mMultipleViewsAtOnce, true ); + KPrefs::setCurrentGroup( "Extensions_General" ); QStringList defaultExtensions; defaultExtensions << "merge"; defaultExtensions << "distribution_list_editor"; addItemInt( "CurrentExtension", &mCurrentExtension, 0 ); addItemStringList( "ActiveExtensions", &mActiveExtensions, defaultExtensions ); KPrefs::setCurrentGroup( "Views" ); QString defaultView = i18n( "Default Table View" ); addItemString( "CurrentView", &mCurrentView, defaultView ); addItemStringList( "ViewNames", &mViewNames, defaultView ); diff --git a/kaddressbook/kabprefs.h b/kaddressbook/kabprefs.h index 8f149ac..03e529f 100644 --- a/kaddressbook/kabprefs.h +++ b/kaddressbook/kabprefs.h @@ -56,24 +56,25 @@ class KABPrefs : public KPimPrefs /** Read preferences from config file */ // void usrReadConfig(); /** Write preferences to config file */ // void usrWriteConfig(); #endif //KAB_EMBEDDED // GUI bool mJumpButtonBarVisible; bool mDetailsPageVisible; + bool mMultipleViewsAtOnce; QValueList<int> mExtensionsSplitter; QValueList<int> mDetailsSplitter; // Extensions stuff int mCurrentExtension; QStringList mActiveExtensions; // Views stuff QString mCurrentView; QStringList mViewNames; // Filter 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 @@ -102,52 +102,56 @@ KABConfigWidget::KABConfigWidget( QWidget *parent, const char *name ) QVBoxLayout *boxLayout = new QVBoxLayout( groupBox->layout() ); boxLayout->setAlignment( Qt::AlignTop ); boxLayout->setMargin(KDialog::marginHintSmall() ); groupBox->layout()->setMargin(KDialog::marginHintSmall()) ; groupBox->layout()->setSpacing(KDialog::spacingHintSmall()); boxLayout->setSpacing( KDialog::spacingHintSmall() ); mViewsSingleClickBox = new QCheckBox( i18n( "Honor KDE single click" ), groupBox, "msingle" ); boxLayout->addWidget( mViewsSingleClickBox ); mNameParsing = new QCheckBox( i18n( "Automatic name parsing for new addressees" ), groupBox, "mparse" ); boxLayout->addWidget( mNameParsing ); + mMultipleViewsAtOnce = new QCheckBox( i18n( "Display List and Details at once (restart)" ), groupBox, "mdisplay" ); + boxLayout->addWidget( mMultipleViewsAtOnce ); + layout->addWidget( groupBox ); //extensions groupbox - groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Extensions" ), generalPage ); + groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Extensions (restart)" ), generalPage ); boxLayout = new QVBoxLayout( groupBox->layout() ); boxLayout->setAlignment( Qt::AlignTop ); boxLayout->setMargin(KDialog::marginHintSmall()); boxLayout->setSpacing(KDialog::spacingHintSmall()); groupBox->layout()->setMargin(1) ; groupBox->layout()->setSpacing(0); mExtensionView = new KListView( groupBox ); mExtensionView->setAllColumnsShowFocus( true ); mExtensionView->addColumn( i18n( "Name" ) ); mExtensionView->addColumn( i18n( "Description" ) ); mExtensionView->setMaximumHeight(80); boxLayout->addWidget( mExtensionView ); mConfigureButton = new QPushButton( i18n( "Configure..." ), groupBox ); mConfigureButton->setEnabled( false ); boxLayout->addWidget( mConfigureButton ); layout->addWidget( groupBox ); connect( mNameParsing, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); connect( mViewsSingleClickBox, SIGNAL( toggled( bool ) ), this, SLOT( modified() ) ); + connect( mMultipleViewsAtOnce, 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() ) ); tabWidget->addTab( generalPage, i18n( "General" ) ); // Addressee page mAddresseeWidget = new AddresseeWidget( this ); tabWidget->addTab( mAddresseeWidget, i18n( "Contact" ) ); @@ -156,51 +160,54 @@ KABConfigWidget::KABConfigWidget( QWidget *parent, const char *name ) } void KABConfigWidget::restoreSettings(KABPrefs* prefs) { //US prefs was KABPrefs::instance() before bool blocked = signalsBlocked(); blockSignals( true ); mNameParsing->setChecked( prefs->mAutomaticNameParsing ); mViewsSingleClickBox->setChecked( prefs->mHonorSingleClick ); + mMultipleViewsAtOnce->setChecked( prefs->mMultipleViewsAtOnce ); mAddresseeWidget->restoreSettings(); restoreExtensionSettings(); blockSignals( blocked ); emit changed( false ); } void KABConfigWidget::saveSettings(KABPrefs* prefs) { prefs->mAutomaticNameParsing = mNameParsing->isChecked(); prefs->mHonorSingleClick = mViewsSingleClickBox->isChecked(); + prefs->mMultipleViewsAtOnce = mMultipleViewsAtOnce->isChecked(); mAddresseeWidget->saveSettings(); saveExtensionSettings(); KABPrefs::instance()->writeConfig(); emit changed( false ); } void KABConfigWidget::defaults(KABPrefs* prefs) { mNameParsing->setChecked( true ); mViewsSingleClickBox->setChecked( false ); + mMultipleViewsAtOnce->setChecked( true ); emit changed( true ); } void KABConfigWidget::modified() { emit changed( true ); } void KABConfigWidget::restoreExtensionSettings() { QStringList activeExtensions = KABPrefs::instance()->mActiveExtensions; 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 @@ -59,18 +59,20 @@ class KABConfigWidget : public QWidget void configureExtension(); void selectionChanged( QListViewItem* ); void itemClicked( QListViewItem* ); private: void restoreExtensionSettings(); void saveExtensionSettings(); KListView *mExtensionView; QCheckBox *mNameParsing; QCheckBox *mViewsSingleClickBox; + QCheckBox *mMultipleViewsAtOnce; + QPushButton *mConfigureButton; AddresseeWidget *mAddresseeWidget; }; #endif |