Don't show collectionstatisticanimation when not necessary ( for example when we want to "jump to folder" etc.)

svn path=/trunk/KDE/kdepim/kmail/; revision=1141696
wilder-work
Laurent Montel 16 years ago
parent 1bd96d0083
commit 1ddb612491
  1. 5
      foldertreeview.cpp
  2. 1
      foldertreeview.h
  3. 2
      foldertreewidget.cpp
  4. 5
      foldertreewidget.h
  5. 1
      kmmainwidget.cpp
  6. 2
      searchwindow.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");

@ -45,6 +45,7 @@ public:
void selectNextUnreadFolder( bool confirm = false);
void selectPrevUnreadFolder( bool confirm = false);
void showStatisticAnimation( bool anim );
void disableContextMenuAndExtraColumn();

@ -72,6 +72,8 @@ FolderTreeWidget::FolderTreeWidget( QWidget *parent, KXMLGUIClient *xmlGuiClient
Akonadi::AttributeFactory::registerAttribute<Akonadi::ImapAclAttribute>();
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 );

@ -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();

@ -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 & ) ),

@ -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 );

Loading…
Cancel
Save