Version: (using KDE KDE 3.4.0) Installed from: Compiled From Sources Compiler: gcc (GCC) 3.3.5 (Debian 1:3.3.5-12) OS: Linux On each start, the sorting of the news article list changes. I start KNode and the sorting is "Date". I quit and start again and it is "Date (Thread changed)". I quit and start again and it is back to "Date". And so on, and so on... I disabled the SortByThreadChange in headerview.cpp with the patch that you'll find below and now it works for me. But people who want to sort by thread change may want a "real" fix. --- headerview.cpp 2005-02-04 00:12:08.000000000 +0100 +++ /usr/local/src/kde/kdepim-3.4.0/knode/headerview.cpp 2005-03-27 01:08:11.000000000 +0100 @@ -209,7 +209,7 @@ if ( column == mSortCol ) { mSortAsc = ascending; if ( column == mPaintInfo.dateCol && ascending ) - mSortByThreadChangeDate = !mSortByThreadChangeDate; + mSortByThreadChangeDate = false; //!mSortByThreadChangeDate; } else { mSortCol = column; emit sortingChanged( column );
CVS commit by vkrause: Don't accidently toggle 'sort by thread change date' when restoring header view layout. CCBUG: 102574 M +6 -6 headerview.cpp 1.8 M +2 -1 headerview.h 1.6 --- kdepim/knode/headerview.cpp #1.7:1.8 @@ -1,5 +1,5 @@ /* KNode, the KDE newsreader - Copyright (c) 1999-2004 the KNode authors. + Copyright (c) 1999-2005 the KNode authors. See file AUTHORS for details @@ -40,5 +40,6 @@ KNHeaderView::KNHeaderView(QWidget *pare mDelayedCenter( -1 ), mActiveItem( 0 ), - mShowingFolder( false ) + mShowingFolder( false ), + mInitDone( false ) { mPaintInfo.subCol = addColumn( i18n("Subject"), 310 ); @@ -99,11 +100,10 @@ KNHeaderView::~KNHeaderView() void KNHeaderView::readConfig() { - static bool initDone = false; - if ( !initDone ) { - initDone = true; + if ( !mInitDone ) { KConfig *conf = knGlobals.config(); conf->setGroup( "HeaderView" ); mSortByThreadChangeDate = conf->readBoolEntry( "sortByThreadChangeDate", false ); restoreLayout( conf, "HeaderView" ); + mInitDone = true; } @@ -209,5 +209,5 @@ void KNHeaderView::setSorting( int colum if ( column == mSortCol ) { mSortAsc = ascending; - if ( column == mPaintInfo.dateCol && ascending ) + if ( mInitDone && column == mPaintInfo.dateCol && ascending ) mSortByThreadChangeDate = !mSortByThreadChangeDate; } else { --- kdepim/knode/headerview.h #1.5:1.6 @@ -1,5 +1,5 @@ /* KNode, the KDE newsreader - Copyright (c) 1999-2004 the KNode authors. + Copyright (c) 1999-2005 the KNode authors. See file AUTHORS for details @@ -95,4 +95,5 @@ class KNHeaderView : public KListView { KPopupMenu *mPopup; bool mShowingFolder; + bool mInitDone; private slots:
CVS commit by vkrause: Backport fix for #102574 (don't accidently toggle 'sort by thread change date' when restoring header view layout). BUG: 102574 M +6 -6 headerview.cpp 1.7.2.1 M +3 -1 headerview.h 1.4.2.1 --- kdepim/knode/headerview.cpp #1.7:1.7.2.1 @@ -1,5 +1,5 @@ /* KNode, the KDE newsreader - Copyright (c) 1999-2004 the KNode authors. + Copyright (c) 1999-2005 the KNode authors. See file AUTHORS for details @@ -40,5 +40,6 @@ KNHeaderView::KNHeaderView(QWidget *pare mDelayedCenter( -1 ), mActiveItem( 0 ), - mShowingFolder( false ) + mShowingFolder( false ), + mInitDone( false ) { mPaintInfo.subCol = addColumn( i18n("Subject"), 310 ); @@ -99,11 +100,10 @@ KNHeaderView::~KNHeaderView() void KNHeaderView::readConfig() { - static bool initDone = false; - if ( !initDone ) { - initDone = true; + if ( !mInitDone ) { KConfig *conf = knGlobals.config(); conf->setGroup( "HeaderView" ); mSortByThreadChangeDate = conf->readBoolEntry( "sortByThreadChangeDate", false ); restoreLayout( conf, "HeaderView" ); + mInitDone = true; } @@ -209,5 +209,5 @@ void KNHeaderView::setSorting( int colum if ( column == mSortCol ) { mSortAsc = ascending; - if ( column == mPaintInfo.dateCol && ascending ) + if ( mInitDone && column == mPaintInfo.dateCol && ascending ) mSortByThreadChangeDate = !mSortByThreadChangeDate; } else { --- kdepim/knode/headerview.h #1.4:1.4.2.1 @@ -1,5 +1,5 @@ /* KNode, the KDE newsreader - Copyright (c) 1999-2004 the KNode authors. + Copyright (c) 1999-2005 the KNode authors. See file AUTHORS for details @@ -23,4 +23,5 @@ class KPopupMenu; +class KNHdrViewItem; class KNHeaderView : public KListView { @@ -94,4 +95,5 @@ class KNHeaderView : public KListView { KPopupMenu *mPopup; bool mShowingFolder; + bool mInitDone; private slots:
You need to log in before you can comment on or make changes to this bug.