Bug 261957 - [Regression] Article list column size isn't remembered
Summary: [Regression] Article list column size isn't remembered
Status: RESOLVED UNMAINTAINED
Alias: None
Product: akregator
Classification: Applications
Component: general (show other bugs)
Version: SVN
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Aurelien Gateau
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-03 14:48 UTC by Christophe Marin
Modified: 2017-01-07 22:45 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
date column issue (107.65 KB, image/png)
2011-01-03 14:48 UTC, Christophe Marin
Details
article list issue (48.66 KB, image/png)
2011-02-05 13:27 UTC, Christophe Marin
Details
another screenshot (36.15 KB, image/png)
2011-02-05 13:31 UTC, Christophe Marin
Details
Usability issue (40.20 KB, image/png)
2011-02-05 13:37 UTC, Christophe Marin
Details
Date column issue (4.50 KB, image/png)
2011-02-05 13:50 UTC, Christophe Marin
Details
Fix for bug, or workaround. (1.68 KB, patch)
2012-05-19 07:19 UTC, Anton Yashin
Details
fix with saved data upgrade support (1.94 KB, patch)
2012-05-23 17:58 UTC, Anton Yashin
Details

Note You need to log in before you can comment on or make changes to this bug.
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.