From 2c334473f3fba71e370b2f7490ec45fc538b3567 Mon Sep 17 00:00:00 2001 From: Thomas McGuire Date: Sun, 8 Jun 2008 16:10:26 +0000 Subject: [PATCH] Slightly better place to update the actions, now also works after running the anti spam wizard. Also, update all actions, not just those in the toolbar. svn path=/trunk/KDE/kdepim/; revision=818459 --- kmmainwidget.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/kmmainwidget.cpp b/kmmainwidget.cpp index a6afa3438..586efe086 100644 --- a/kmmainwidget.cpp +++ b/kmmainwidget.cpp @@ -3527,8 +3527,8 @@ void KMMainWidget::updateMessageActions() editAction()->setEnabled( !msg->transferInProgress() ); } - // Enable / Disable the filters in the toolbar - foreach ( QAction *filterAction, mFilterTBarActions ) { + // Enable / disable all filters. + foreach ( QAction *filterAction, mFilterMenuActions ) { filterAction->setEnabled( count > 0 ); } @@ -3648,12 +3648,6 @@ void KMMainWidget::slotShowStartupFolder() if ( mFolderTree ) { mFolderTree->showFolder( startup ); } - - // Update the message actions. This needs to be done here, since above, we - // add the filter actions to the toolbar, and updateMessageActions() takes - // care of disabling them in no message is selected (i.e. the startup folder - // is empty). - updateMessageActions(); } void KMMainWidget::slotShowTip() @@ -3958,6 +3952,9 @@ void KMMainWidget::initializeFilterActions() mFilterTBarActions.prepend( mToolbarActionSeparator ); mGUIClient->plugActionList( "toolbar_filter_actions", mFilterTBarActions ); } + + // Our filters have changed, now enable/disable them + updateMessageActions(); } void KMMainWidget::slotFolderRemoved( KMFolder *folder )