[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdeaddons/noatun-plugins/hayes
From: Neil Stevens <neil () qualityassistant ! com>
Date: 2003-06-19 16:35:26
[Download RAW message or body]
CVS commit by neil:
I give, too. Make sortDirectoriesFirst work the way Konqueror's setting works.
M +8 -5 branch.cpp 1.53
M +1 -0 branch.h 1.25
--- kdeaddons/noatun-plugins/hayes/branch.cpp #1.52:1.53
@@ -525,5 +525,5 @@ int Hayes::FileTreeViewItem::volume(void
}
-QString Hayes::FileTreeViewItem::key(int col, bool) const
+QString Hayes::FileTreeViewItem::key(int col, bool ascending) const
{
FileTreeView *tree = static_cast<FileTreeView *>(listView());
@@ -535,5 +535,6 @@ QString Hayes::FileTreeViewItem::key(int
col == lastKeyColumn &&
directoriesFirst == lastKeyDirectoriesFirst &&
- custom == lastKeyCustom)
+ custom == lastKeyCustom &&
+ ascending == lastKeyAscending)
return lastKey;
@@ -542,4 +543,5 @@ QString Hayes::FileTreeViewItem::key(int
lastKeyDirectoriesFirst = directoriesFirst;
lastKeyCustom = custom;
+ lastKeyAscending = ascending;
static const QString &xSorting = KGlobal::staticQString("X-Sorting");
@@ -577,14 +579,15 @@ QString Hayes::FileTreeViewItem::key(int
// honor directoriesFirst
- if(directoriesFirst)
+ if(!custom && directoriesFirst)
{
if(isDir())
- t.prepend("0");
+ t.prepend(ascending ? "0" : "1");
else
- t.prepend("1");
+ t.prepend(ascending ? "1" : "0");
}
// and get a case-insensitive sort
lastKey = t.lower();
+ //kdDebug(66666) << lastKey << endl;
return lastKey;
}
--- kdeaddons/noatun-plugins/hayes/branch.h #1.24:1.25
@@ -186,4 +186,5 @@ private:
mutable bool lastKeyDirectoriesFirst : 1;
mutable bool lastKeyCustom : 1;
+ mutable bool lastKeyAscending : 1;
bool special : 1;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic