| Summary: | column widths and sorting should be remembered | ||
|---|---|---|---|
| Product: | [Applications] akregator | Reporter: | George Staikos <staikos> |
| Component: | general | Assignee: | kdepim bugs <pim-bugs-null> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | wishlist | CC: | christophe, mark.ziegler |
| Priority: | NOR | ||
| Version First Reported In: | cvs | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
George Staikos
2004-12-02 18:01:32 UTC
CVS commit by staikos:
Save sorting and column widths
FEATURE: 94286
M +17 -0 akregator.kcfg 1.27
M +29 -2 articlelist.cpp 1.30
--- kdenonbeta/akregator/src/akregator.kcfg #1.26:1.27
@@ -146,3 +146,20 @@
</entry>
</group>
+ <group name="Viewer Columns" >
+ <entry key="Title Width" type="Int" >
+ <default>-1</default>
+ </entry>
+ <entry key="Feed Width" type="Int" >
+ <default>-1</default>
+ </entry>
+ <entry key="Date Width" type="Int" >
+ <default>-1</default>
+ </entry>
+ <entry key="Sort Column" type="Int" >
+ <default>2</default>
+ </entry>
+ <entry key="Sort Ascending" type="Bool" >
+ <default>false</default>
+ </entry>
+ </group>
</kcfg>
--- kdenonbeta/akregator/src/articlelist.cpp #1.29:1.30
@@ -6,4 +6,5 @@
***************************************************************************/
+#include "akregatorconfig.h"
#include "articlelist.h"
#include "feed.h"
@@ -96,8 +97,27 @@ ArticleList::ArticleList(QWidget *parent
setAcceptDrops(false); // FIXME before we implement dragging between archived feeds??
setFullWidth(false);
- setSorting(2, false);
setShowSortIndicator(true);
setDragAutoScroll(true);
setDropHighlighter(false);
+
+ int c = Settings::sortColumn();
+ setSorting((c >= 0 && c <= 2) ? c : 2, Settings::sortAscending());
+
+ int w;
+ w = Settings::titleWidth();
+ if (w > 0) {
+ setColumnWidth(0, w);
+ }
+
+ w = Settings::feedWidth();
+ if (w > 0) {
+ setColumnWidth(1, w);
+ }
+
+ w = Settings::dateWidth();
+ if (w > 0) {
+ setColumnWidth(2, w);
+ }
+
m_feedWidth = columnWidth(1);
hideColumn(1);
@@ -318,5 +338,12 @@ void ArticleList::slotSelectionChanged(Q
ArticleList::~ArticleList()
-{}
+{
+ Settings::setTitleWidth(columnWidth(0));
+ Settings::setFeedWidth(columnWidth(1) > 0 ? columnWidth(1) : m_feedWidth);
+ Settings::setSortColumn(sortColumn());
+ Settings::setSortAscending(sortOrder() == Ascending);
+ Settings::writeConfig();
+}
#include "articlelist.moc"
+// vim: ts=4 sw=4 et
I use akregator as module in kontact. Whenever I start kontact it does not remember my sorting and width of columns. I prefer sorting by date. openSUSE 11.0 KDE Version 4.1.87 (KDE 4.1.87 (KDE 4.2 >= 20090101)) "release 78.2" Akregator: 1.3.50 Closing as dup to prevent this bug from being reopened. *** This bug has been marked as a duplicate of bug 152702 *** |