[Xfce4-commits] <postler:master> Sort non-localized folders and accounts by name
Christian Dywan
noreply at xfce.org
Sat Jan 22 00:28:02 CET 2011
Updating branch refs/heads/master
to 4836ea7c5227e7891aa30b8d41efcf8c5c4cb4a7 (commit)
from 5c8896064ac8d19a28e941ec84db00de12631e06 (commit)
commit 4836ea7c5227e7891aa30b8d41efcf8c5c4cb4a7
Author: Christian Dywan <christian at twotoasts.de>
Date: Sat Jan 22 00:27:48 2011 +0100
Sort non-localized folders and accounts by name
As a bonus, search folders appear at the bottom now.
Fixes: https://bugs.launchpad.net/postler/+bug/703143
postler/postler-folders.vala | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/postler/postler-folders.vala b/postler/postler-folders.vala
index 0f0d989..e64385f 100644
--- a/postler/postler-folders.vala
+++ b/postler/postler-folders.vala
@@ -90,8 +90,14 @@ public class Postler.Folders : Gtk.TreeView {
return -1;
if (type_a > type_b)
return 1;
- if (type_a == type_b)
- return 0;
+ if (type_a == type_b) {
+ string name_a;
+ string name_b;
+
+ model.get (a, Columns.NAME, out name_a);
+ model.get (b, Columns.NAME, out name_b);
+ return GLib.strcmp (name_a, name_b);
+ }
assert_not_reached ();
}
@@ -172,7 +178,8 @@ public class Postler.Folders : Gtk.TreeView {
Columns.NAME, account_info.name,
Columns.ELLIPSIZE, Pango.EllipsizeMode.MIDDLE,
Columns.INFO, account_info,
- Columns.LOCATION, account_info.path);
+ Columns.LOCATION, account_info.path,
+ Columns.FOLDER_TYPE, FolderType.GENERIC);
continue;
}
More information about the Xfce4-commits
mailing list