diff --git a/foldertreeview.cpp b/foldertreeview.cpp index 33f646a7b..83e03f34e 100644 --- a/foldertreeview.cpp +++ b/foldertreeview.cpp @@ -78,6 +78,11 @@ void FolderTreeView::init( bool showUnreadCount ) mCollectionStatisticsDelegate->setUnreadCountShown( showUnreadCount && !header()->isSectionHidden( 1 ) ); } +void FolderTreeView::showStatisticAnimation( bool anim ) +{ + mCollectionStatisticsDelegate->setProgressAnimationEnabled( anim ); +} + void FolderTreeView::writeConfig() { KConfigGroup myGroup( KMKernel::config(), "MainFolderView"); diff --git a/foldertreeview.h b/foldertreeview.h index 151bbc5ff..a9848fa59 100644 --- a/foldertreeview.h +++ b/foldertreeview.h @@ -45,6 +45,7 @@ public: void selectNextUnreadFolder( bool confirm = false); void selectPrevUnreadFolder( bool confirm = false); + void showStatisticAnimation( bool anim ); void disableContextMenuAndExtraColumn(); diff --git a/foldertreewidget.cpp b/foldertreewidget.cpp index 513887455..55754d23f 100644 --- a/foldertreewidget.cpp +++ b/foldertreewidget.cpp @@ -72,6 +72,8 @@ FolderTreeWidget::FolderTreeWidget( QWidget *parent, KXMLGUIClient *xmlGuiClient Akonadi::AttributeFactory::registerAttribute(); d->folderTreeView = new FolderTreeView( xmlGuiClient, this, options & ShowUnreadCount ); + d->folderTreeView->showStatisticAnimation( options & ShowCollectionStatisticAnimation ); + connect( d->folderTreeView, SIGNAL( manualSortingChanged( bool ) ), this, SLOT( slotManualSortingChanged( bool ) ) ); QVBoxLayout *lay = new QVBoxLayout( this ); diff --git a/foldertreewidget.h b/foldertreewidget.h index 088f04b33..18a6bbbba 100644 --- a/foldertreewidget.h +++ b/foldertreewidget.h @@ -51,12 +51,13 @@ public: None = 0, ShowUnreadCount = 1, UseLineEditForFiltering = 2, - UseDistinctSelectionModel = 4 + UseDistinctSelectionModel = 4, + ShowCollectionStatisticAnimation = 8 }; Q_DECLARE_FLAGS( TreeViewOptions, TreeViewOption ) FolderTreeWidget( QWidget *parent = 0, KXMLGUIClient *xmlGuiClient = 0, - TreeViewOptions option = ShowUnreadCount, + TreeViewOptions option = (TreeViewOptions) (ShowUnreadCount|ShowCollectionStatisticAnimation), ReadableCollectionProxyModel::ReadableCollectionOptions optReadableProxy = ReadableCollectionProxyModel::None ); ~FolderTreeWidget(); diff --git a/kmmainwidget.cpp b/kmmainwidget.cpp index e066894f0..2529a0bde 100644 --- a/kmmainwidget.cpp +++ b/kmmainwidget.cpp @@ -947,6 +947,7 @@ void KMMainWidget::createWidgets() // FolderTreeWidget::TreeViewOptions opt = FolderTreeWidget::ShowUnreadCount; opt |= FolderTreeWidget::UseLineEditForFiltering; + opt |= FolderTreeWidget::ShowCollectionStatisticAnimation; mFolderTreeWidget = new FolderTreeWidget( this, mGUIClient, opt ); connect( mFolderTreeWidget->folderTreeView(), SIGNAL( currentChanged( const Akonadi::Collection & ) ), diff --git a/searchwindow.cpp b/searchwindow.cpp index 14185c711..4376a00f4 100644 --- a/searchwindow.cpp +++ b/searchwindow.cpp @@ -726,7 +726,7 @@ Akonadi::Item SearchWindow::message() //----------------------------------------------------------------------------- void SearchWindow::updateContextMenuActions() { - int count = selectedMessages().count(); + const int count = selectedMessages().count(); bool single_actions = count == 1; mReplyAction->setEnabled( single_actions ); mReplyAllAction->setEnabled( single_actions );