summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2005-08-17 17:09:57 (UTC)
committer zautrix <zautrix>2005-08-17 17:09:57 (UTC)
commitb3de38d3c4c3935a3fa428eeb4ad97fa8c60c43a (patch) (side-by-side diff)
treeed4d04abe2996cde745757632d8616b23a15670b /kaddressbook
parentc21edc19916722f5dd4e939f1522d311a86411fd (diff)
downloadkdepimpi-b3de38d3c4c3935a3fa428eeb4ad97fa8c60c43a.zip
kdepimpi-b3de38d3c4c3935a3fa428eeb4ad97fa8c60c43a.tar.gz
kdepimpi-b3de38d3c4c3935a3fa428eeb4ad97fa8c60c43a.tar.bz2
view select fix
Diffstat (limited to 'kaddressbook') (more/less context) (ignore 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
@@ -232,24 +232,27 @@ void ViewManager::setActiveView( const QString &name )
KConfigGroupSaver saver( config, name );
QString type = config->readEntry( "Type", "Table" );
kdDebug(5720) << "ViewManager::setActiveView: creating view - " << name << endl;
ViewFactory *factory = mViewFactoryDict.find( type );
if ( factory )
view = factory->view( mCore->addressBook(), mViewWidgetStack );
if ( view ) {
+ if ( !mViewNameList.contains( name ) ) {
+ mViewNameList.append( name );
+ }
view->setCaption( name );
mViewDict.insert( name, view );
//US my version needs an int as second parameter to addWidget
mViewWidgetStack->addWidget( view, -1 );
view->readConfig( config );
// The manager just relays the signals
connect( view, SIGNAL( selected( const QString& ) ),
SIGNAL( selected( const QString & ) ) );
connect( view, SIGNAL( executed( const QString& ) ),
SIGNAL( executed( const QString& ) ) );
@@ -281,24 +284,28 @@ void ViewManager::setActiveView( const QString &name )
uint pos = filterPosition( view->defaultFilterName() );
mActionSelectFilter->setCurrentItem( pos );
setActiveFilter( pos );
}
//US qDebug("ViewManager::setActiveView 6" );
// Update the inc search widget to show the fields in the new active
// view.
mCore->setSearchFields( mActiveView->fields() );
//US performance optimization. setActiveFilter calls also mActiveView->refresh()
//US mActiveView->refresh();
+
+ mActionSelectView->setItems( mViewNameList );
+ mActionSelectView->setCurrentItem( mViewNameList.findIndex( mActiveView->caption() ) );
+
}
else
{
qDebug("ViewManager::setActiveView: unable to find view" );
}
}
//US added another method with no parameter, since my moc compiler does not support default parameters.
void ViewManager::refreshView()
{
refreshView( QString::null );
}
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
@@ -98,25 +98,25 @@ void LookAndFeelPage::restoreSettings( KConfig *config )
mLineButton->setChecked(config->readBoolEntry("SingleLine", false));
mToolTipBox->setChecked(config->readBoolEntry("ToolTips", true));
if (!mAlternateButton->isChecked() & !mLineButton->isChecked())
mNoneButton->setChecked(true);
mBackgroundBox->setChecked(config->readBoolEntry("Background", false));
mBackgroundName->lineEdit()->setText(config->readEntry("BackgroundName"));
// colors
cbEnableCustomColors->setChecked( config->readBoolEntry( "EnableCustomColors", false ) );
QColor c;
-qDebug("LookAndFeelPage::restoreSettings make base color configurable");
+ //qDebug("LookAndFeelPage::restoreSettings make base color configurable");
#ifndef KAB_EMBEDDED
c = KGlobalSettings::baseColor();
#else //KAB_EMBEDDED
c = QColor(0,0,0);
#endif //KAB_EMBEDDED
c = colorGroup().background();
lbColors->insertItem( new ColorListItem( i18n("Background Color"),
config->readColorEntry( "BackgroundColor", &c ) ) );
c = colorGroup().foreground();
lbColors->insertItem( new ColorListItem( i18n("Text Color"),