Bug 261957

Summary: [Regression] Article list column size isn't remembered
Product: [Applications] akregator Reporter: Christophe Marin <christophe>
Component: generalAssignee: Aurelien Gateau <agateau>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: akregator-devel, fynjy-007, kdepim-bugs, winter
Priority: NOR    
Version: SVN   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: date column issue
article list issue
another screenshot
Usability issue
Date column issue
Fix for bug, or workaround.
fix with saved data upgrade support

Description Christophe Marin 2011-01-03 14:48:37 UTC
Created attachment 55519 [details]
date column issue

The regression appeared with r1207041.

The date column cuts the text. See the attached screenshot

Any changes to the column width is reverted when changing the active feed.


This change reintroduces one of the issues reported in bug 152702
Comment 1 Aurelien Gateau 2011-02-05 10:22:23 UTC
I put together a simpler version of the code:

http://git.reviewboard.kde.org/r/100574/

It does not remember the column widths, but instead tries to ensure all columns get usable default widths: all columns but title are resized to fit their content, the title column gets the remaining width. The title column can still be resized if need be.
Comment 2 Christophe Marin 2011-02-05 13:27:24 UTC
Created attachment 56889 [details]
article list issue

With this patch applied, I get a few more issues.

See the screenshot attached. With the default window size this is what I get for feeds with unusually long names.
Comment 3 Christophe Marin 2011-02-05 13:31:35 UTC
Created attachment 56890 [details]
another screenshot

Another screenshot with a slightly shorter feed name.
Comment 4 Christophe Marin 2011-02-05 13:37:20 UTC
Created attachment 56891 [details]
Usability issue

The auto adjusting also introduces a usability issue, Note author column size. Resizing the column is possible but akregator will auto-adjust it again the next time this feed is selected.
Comment 5 Christophe Marin 2011-02-05 13:50:55 UTC
Created attachment 56894 [details]
Date column issue

Last issue noticed: When there is no vertical scrollbar, there's an empty area.
Comment 6 Thomas Zell 2011-11-05 20:58:03 UTC
This issue still exists in 4.7.3
Comment 7 Anton Yashin 2012-05-19 07:19:40 UTC
Created attachment 71211 [details]
Fix for bug, or workaround.

I wrote this patch. It's seems to fix this strange behavior. 

This behaviour caused:
header()->setStretchLastSection( false );
But the line is needed for correct positioning of the columns.

Following lines were removed because it set date column size in this path to one pixel:
header()->resizeSection( header()->logicalIndex( header()->count() - 1 ), 1 );

Tested on Kubuntu 12.04 with kde 4.8.3 and kdepim 4.8.3
Comment 8 Allen Winter 2012-05-20 22:01:35 UTC
Yashin,

I applied your patch.  but now I don't see the Date column at all, except on the feed group lists.

what did I miss?
Comment 9 Anton Yashin 2012-05-23 14:13:05 UTC
(In reply to comment #8)
> Yashin,
> 
> I applied your patch.  but now I don't see the Date column at all, except on
> the feed group lists.
> 
> what did I miss?

Hi, Allen

I get similar behavior during debugging, when present in the functions ArticleListView::setFeedMode() ArticleListView::setGroupMode() of the next line.
header()->resizeSection( header()->logicalIndex( header()->count() - 1 ), 1 );
In fact, there is a column with a date, but its width is equal to one pixel.

Patched functions must be like this:

void ArticleListView::setGroupMode()
{
    if ( m_columnMode == GroupMode )
        return;

    if ( model() )
        m_feedHeaderState = header()->saveState();
    m_columnMode = GroupMode;
    restoreHeaderState();
}

void ArticleListView::setFeedMode()
{
    if ( m_columnMode == FeedMode )
        return;

    if ( model() )
        m_groupHeaderState = header()->saveState();
    m_columnMode = FeedMode;
    restoreHeaderState();
}
Comment 10 Anton Yashin 2012-05-23 17:29:25 UTC
I also removed ArticleListFeedHeaders and ArticleListGroupHeaders from ~/.kde/share/config/akregatorrc
Comment 11 Anton Yashin 2012-05-23 17:58:07 UTC
Created attachment 71326 [details]
fix with saved data upgrade support

I think the disappearance of a date column influenced the data stored in the unpatched version. I added an additional check on the width of the column with the date.
Comment 12 Anton Yashin 2012-05-23 18:16:16 UTC
Or you can change the name for the stored data headers (ArticleListFeedHeaders and ArticleListGroupHeaders) in akregatorrc. This will not worry about the compatibility of software with this bug.
Comment 13 Allen Winter 2012-05-25 16:35:52 UTC
Git commit 9345245335b5341bff9de06778652338006fc405 by Allen Winter.
Committed on 25/05/2012 at 18:32.
Pushed by winterz into branch 'master'.

Fix the last column width problems.
Yashin, thanks for your work on this.

Not resolving the bug yet since we may still want to save/restore
column widths. But this patch does improve things.
MERGE: 4.8

M  +3    -10   akregator/src/articlelistview.cpp

http://commits.kde.org/kdepim/9345245335b5341bff9de06778652338006fc405
Comment 14 Allen Winter 2012-05-25 16:36:31 UTC
Git commit 167f33cf7642b798b72f743c633b06f5fc343aba by Allen Winter.
Committed on 25/05/2012 at 18:32.
Pushed by winterz into branch 'KDE/4.8'.

Fix the last column width problems.
Yashin, thanks for your work on this.

Not resolving the bug yet since we may still want to save/restore
column widths. But this patch does improve things.
MERGE: 4.8
(cherry picked from commit 9345245335b5341bff9de06778652338006fc405)

M  +3    -10   akregator/src/articlelistview.cpp

http://commits.kde.org/kdepim/167f33cf7642b798b72f743c633b06f5fc343aba
Comment 15 Denis Kurz 2016-09-24 19:44:39 UTC
This bug has only been reported for versions before 4.14, which have been unsupported for at least two years now. Can anyone tell if this bug still present?

If noone confirms this bug for a Framework-based version of akregator (version 5.0 or later, as part of KDE Applications 15.08 or later), it gets closed in about three months.
Comment 16 Denis Kurz 2017-01-07 22:45:03 UTC
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.0 aka 15.08), please open a new one unless it already exists. Thank you for all your input.