From 1525820e30e14de83a15533a3c67aa2756a544f4 Mon Sep 17 00:00:00 2001 From: zautrix Date: Mon, 17 Jan 2005 15:26:56 +0000 Subject: AB fixes --- (limited to 'kaddressbook') diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index a480baf..9526f23 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -405,7 +405,7 @@ void KABCore::updateToolBar() static int iii = 0; ++iii; mMainWindow->toolBar()->repaintMe(); - if ( iii < 5 ) + if ( iii < 3 ) QTimer::singleShot( 10, this , SLOT ( updateToolBar())); } KABCore::~KABCore() @@ -566,7 +566,7 @@ void KABCore::saveSettings() KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem(); KABPrefs::instance()->writeConfig(); - qDebug("KABPrefs::instance()->writeConfig() "); + qDebug("KABCore::saveSettings() "); } KABC::AddressBook *KABCore::addressBook() const diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp index 4be860e..04759a7 100644 --- a/kaddressbook/viewmanager.cpp +++ b/kaddressbook/viewmanager.cpp @@ -204,6 +204,11 @@ void ViewManager::unloadViews() mActiveView = 0; } +void ViewManager::selectView( const QString &name ) +{ + setActiveView( name ); + mCore->saveSettings(); +} void ViewManager::setActiveView( const QString &name ) { KAddressBookView *view = 0; @@ -283,7 +288,6 @@ void ViewManager::setActiveView( const QString &name ) //US performance optimization. setActiveFilter calls also mActiveView->refresh() //US mActiveView->refresh(); - mCore->saveSettings(); } else { @@ -489,7 +493,6 @@ void ViewManager::createViewFactories() void ViewManager::dropped( QDropEvent *e ) { - kdDebug(5720) << "ViewManager::dropped: got a drop event" << endl; #ifndef KAB_EMBEDDED @@ -655,7 +658,7 @@ void ViewManager::initActions() mActionSelectView->setMenuAccelsEnabled( false ); #endif connect( mActionSelectView, SIGNAL( activated( const QString& ) ), - SLOT( setActiveView( const QString& ) ) ); + SLOT( selectView( const QString& ) ) ); #ifdef KAB_EMBEDDED diff --git a/kaddressbook/viewmanager.h b/kaddressbook/viewmanager.h index dff9998..ab5d372 100644 --- a/kaddressbook/viewmanager.h +++ b/kaddressbook/viewmanager.h @@ -126,6 +126,7 @@ class ViewManager : public QWidget void urlDropped( const KURL& ); private slots: + void selectView( const QString &name ); void setActiveView( const QString &name ); void setActiveFilter( int index ); void configureFilters(); -- cgit v0.9.0.2