summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-01-17 15:26:56 (UTC)
committer zautrix <zautrix>2005-01-17 15:26:56 (UTC)
commit1525820e30e14de83a15533a3c67aa2756a544f4 (patch) (side-by-side diff)
treecb8083c4675c874b5cac9355acc4d746077b6692
parent214b82c86bd5365d7a5fc786c8c9c7231ec6dc77 (diff)
downloadkdepimpi-1525820e30e14de83a15533a3c67aa2756a544f4.zip
kdepimpi-1525820e30e14de83a15533a3c67aa2756a544f4.tar.gz
kdepimpi-1525820e30e14de83a15533a3c67aa2756a544f4.tar.bz2
AB fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp4
-rw-r--r--kaddressbook/viewmanager.cpp9
-rw-r--r--kaddressbook/viewmanager.h1
-rw-r--r--microkde/kdeui/ktoolbar.cpp2
4 files changed, 10 insertions, 6 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index a480baf..9526f23 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -402,13 +402,13 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
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()
{
// save();
//saveSettings();
@@ -563,13 +563,13 @@ void KABCore::saveSettings()
#endif //KAB_EMBEDDED
mExtensionManager->saveSettings();
mViewManager->saveSettings();
KABPrefs::instance()->mCurrentIncSearchField = mIncSearchWidget->currentItem();
KABPrefs::instance()->writeConfig();
- qDebug("KABPrefs::instance()->writeConfig() ");
+ qDebug("KABCore::saveSettings() ");
}
KABC::AddressBook *KABCore::addressBook() const
{
return mAddressBook;
}
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
diff --git a/kaddressbook/viewmanager.h b/kaddressbook/viewmanager.h
index dff9998..ab5d372 100644
--- a/kaddressbook/viewmanager.h
+++ b/kaddressbook/viewmanager.h
@@ -123,12 +123,13 @@ class ViewManager : public QWidget
/**
Emitted whenever a url is dragged on a view.
*/
void urlDropped( const KURL& );
private slots:
+ void selectView( const QString &name );
void setActiveView( const QString &name );
void setActiveFilter( int index );
void configureFilters();
private:
void createViewFactories();
diff --git a/microkde/kdeui/ktoolbar.cpp b/microkde/kdeui/ktoolbar.cpp
index e9226c0..1ad1728 100644
--- a/microkde/kdeui/ktoolbar.cpp
+++ b/microkde/kdeui/ktoolbar.cpp
@@ -1411,13 +1411,13 @@ void KToolBar::insertWidgetInternal( QWidget *w, int &index, int id )
widget2id.insert( w, id );
}
void KToolBar::repaintMe()
{
setUpdatesEnabled( true );
QToolBar::repaint( true );
- qDebug(" KToolBar::repaintMe() ");
+ //qDebug(" KToolBar::repaintMe() ");
}
void KToolBar::showEvent( QShowEvent *e )
{
QToolBar::showEvent( e );
rebuildLayout();