summaryrefslogtreecommitdiffabout
path: root/kaddressbook/viewmanager.cpp
Side-by-side diff
Diffstat (limited to 'kaddressbook/viewmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/viewmanager.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp
index 4be860e..04759a7 100644
--- a/kaddressbook/viewmanager.cpp
+++ b/kaddressbook/viewmanager.cpp
@@ -201,12 +201,17 @@ void ViewManager::setListSelected(QStringList list)
void ViewManager::unloadViews()
{
mViewDict.clear();
mActiveView = 0;
}
+void ViewManager::selectView( const QString &name )
+{
+ setActiveView( name );
+ mCore->saveSettings();
+}
void ViewManager::setActiveView( const QString &name )
{
KAddressBookView *view = 0;
// Check that this isn't the same as the current active view
if ( mActiveView && ( mActiveView->caption() == name ) )
@@ -280,13 +285,12 @@ void ViewManager::setActiveView( const QString &name )
// 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();
- mCore->saveSettings();
}
else
{
qDebug("ViewManager::setActiveView: unable to find view" );
}
}
@@ -486,13 +490,12 @@ void ViewManager::createViewFactories()
#endif //KAB_EMBEDDED
}
void ViewManager::dropped( QDropEvent *e )
{
- kdDebug(5720) << "ViewManager::dropped: got a drop event" << endl;
#ifndef KAB_EMBEDDED
QString clipText, vcards;
KURL::List urls;
@@ -652,13 +655,13 @@ void ViewManager::initActions()
mActionSelectView = new KSelectAction( i18n( "Select View" ), 0, mCore->actionCollection(), "select_view" );
#if KDE_VERSION >= 309
mActionSelectView->setMenuAccelsEnabled( false );
#endif
connect( mActionSelectView, SIGNAL( activated( const QString& ) ),
- SLOT( setActiveView( const QString& ) ) );
+ SLOT( selectView( const QString& ) ) );
#ifdef KAB_EMBEDDED
mActionSelectView->plug(viewmenu);
viewmenu->insertSeparator();
#endif //KAB_EMBEDDED