summaryrefslogtreecommitdiffabout
path: root/kaddressbook
Unidiff
Diffstat (limited to 'kaddressbook') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/viewmanager.cpp7
-rw-r--r--kaddressbook/views/configuretableviewdialog.cpp2
2 files changed, 8 insertions, 1 deletions
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp
index c738ad8..b5d9419 100644
--- a/kaddressbook/viewmanager.cpp
+++ b/kaddressbook/viewmanager.cpp
@@ -238,12 +238,15 @@ void ViewManager::setActiveView( const QString &name )
238 238
239 ViewFactory *factory = mViewFactoryDict.find( type ); 239 ViewFactory *factory = mViewFactoryDict.find( type );
240 if ( factory ) 240 if ( factory )
241 view = factory->view( mCore->addressBook(), mViewWidgetStack ); 241 view = factory->view( mCore->addressBook(), mViewWidgetStack );
242 242
243 if ( view ) { 243 if ( view ) {
244 if ( !mViewNameList.contains( name ) ) {
245 mViewNameList.append( name );
246 }
244 view->setCaption( name ); 247 view->setCaption( name );
245 mViewDict.insert( name, view ); 248 mViewDict.insert( name, view );
246//US my version needs an int as second parameter to addWidget 249//US my version needs an int as second parameter to addWidget
247 mViewWidgetStack->addWidget( view, -1 ); 250 mViewWidgetStack->addWidget( view, -1 );
248 view->readConfig( config ); 251 view->readConfig( config );
249 252
@@ -287,12 +290,16 @@ void ViewManager::setActiveView( const QString &name )
287 // Update the inc search widget to show the fields in the new active 290 // Update the inc search widget to show the fields in the new active
288 // view. 291 // view.
289 mCore->setSearchFields( mActiveView->fields() ); 292 mCore->setSearchFields( mActiveView->fields() );
290 293
291//US performance optimization. setActiveFilter calls also mActiveView->refresh() 294//US performance optimization. setActiveFilter calls also mActiveView->refresh()
292//US mActiveView->refresh(); 295//US mActiveView->refresh();
296
297 mActionSelectView->setItems( mViewNameList );
298 mActionSelectView->setCurrentItem( mViewNameList.findIndex( mActiveView->caption() ) );
299
293 } 300 }
294 else 301 else
295 { 302 {
296 qDebug("ViewManager::setActiveView: unable to find view" ); 303 qDebug("ViewManager::setActiveView: unable to find view" );
297 } 304 }
298} 305}
diff --git a/kaddressbook/views/configuretableviewdialog.cpp b/kaddressbook/views/configuretableviewdialog.cpp
index 0e36abd..c329cd9 100644
--- a/kaddressbook/views/configuretableviewdialog.cpp
+++ b/kaddressbook/views/configuretableviewdialog.cpp
@@ -104,13 +104,13 @@ void LookAndFeelPage::restoreSettings( KConfig *config )
104 mBackgroundBox->setChecked(config->readBoolEntry("Background", false)); 104 mBackgroundBox->setChecked(config->readBoolEntry("Background", false));
105 mBackgroundName->lineEdit()->setText(config->readEntry("BackgroundName")); 105 mBackgroundName->lineEdit()->setText(config->readEntry("BackgroundName"));
106 106
107 // colors 107 // colors
108 cbEnableCustomColors->setChecked( config->readBoolEntry( "EnableCustomColors", false ) ); 108 cbEnableCustomColors->setChecked( config->readBoolEntry( "EnableCustomColors", false ) );
109 QColor c; 109 QColor c;
110qDebug("LookAndFeelPage::restoreSettings make base color configurable"); 110 //qDebug("LookAndFeelPage::restoreSettings make base color configurable");
111 111
112#ifndef KAB_EMBEDDED 112#ifndef KAB_EMBEDDED
113 c = KGlobalSettings::baseColor(); 113 c = KGlobalSettings::baseColor();
114#else //KAB_EMBEDDED 114#else //KAB_EMBEDDED
115 c = QColor(0,0,0); 115 c = QColor(0,0,0);
116#endif //KAB_EMBEDDED 116#endif //KAB_EMBEDDED