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
wilder-work
Thomas McGuire 18 years ago
parent 608e8cfaf4
commit 2c334473f3
  1. 13
      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 )

Loading…
Cancel
Save