Diffstat (limited to 'kaddressbook/viewmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/viewmanager.cpp | 9 |
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 @@ -199,16 +199,21 @@ 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 ) ) return; @@ -278,17 +283,16 @@ void ViewManager::setActiveView( const QString &name ) //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(); - mCore->saveSettings(); } else { qDebug("ViewManager::setActiveView: unable to find view" ); } } //US added another method with no parameter, since my moc compiler does not support default parameters. @@ -484,17 +488,16 @@ void ViewManager::createViewFactories() // qDebug("ViewManager::createViewFactories() Loading factory: %s", viewFactory->type().latin1()); #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; if ( KURLDrag::decode( e, urls) ) { KURL::List::Iterator it = urls.begin(); @@ -650,17 +653,17 @@ void ViewManager::initActions() QPopupMenu *filtermenu = (QPopupMenu*)mCore->getFilterMenu(); #endif //KAB_EMBEDDED 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 KAction *action; |