[tracker/tracker-0.14] tracker-preferences: Sort the list contents for ignored patterns
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-0.14] tracker-preferences: Sort the list contents for ignored patterns
- Date: Thu, 5 Jul 2012 16:23:48 +0000 (UTC)
commit 62a5d2d79ced9ca9fa2b23aeb211c28640a02e04
Author: Martyn Russell <martyn lanedo com>
Date: Fri May 4 16:57:22 2012 +0100
tracker-preferences: Sort the list contents for ignored patterns
Fixes GB#675431.
src/tracker-preferences/tracker-preferences.vala | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/src/tracker-preferences/tracker-preferences.vala b/src/tracker-preferences/tracker-preferences.vala
index 9d285f3..07e0971 100644
--- a/src/tracker-preferences/tracker-preferences.vala
+++ b/src/tracker-preferences/tracker-preferences.vala
@@ -143,10 +143,10 @@ public class Tracker.Preferences {
treeview_ignored_directories_with_content = builder.get_object ("treeview_ignored_directories_with_content") as TreeView;
treeview_ignored_files = builder.get_object ("treeview_ignored_files") as TreeView;
- treeview_setup (treeview_index, _("Directory"), true);
- treeview_setup (treeview_ignored_directories, _("Directory"), false);
- treeview_setup (treeview_ignored_directories_with_content, _("Directory"), false);
- treeview_setup (treeview_ignored_files, _("File"), false);
+ treeview_setup (treeview_index, _("Directory"), true, false);
+ treeview_setup (treeview_ignored_directories, _("Directory"), false, true);
+ treeview_setup (treeview_ignored_directories_with_content, _("Directory"), false, true);
+ treeview_setup (treeview_ignored_files, _("File"), false, true);
liststore_index = builder.get_object ("liststore_index") as ListStore;
liststore_index.set_sort_column_id (0, Gtk.SortType.ASCENDING);
@@ -774,7 +774,7 @@ public class Tracker.Preferences {
}
}
- private void treeview_setup (TreeView view, string title, bool show_recurse_column) {
+ private void treeview_setup (TreeView view, string title, bool show_recurse_column, bool sort) {
TreeViewColumn column;
GLib.List<weak TreeViewColumn> columns = view.get_columns ();
@@ -810,6 +810,11 @@ public class Tracker.Preferences {
store.set (iter, 1, !toggle.active);
});
}
+
+ if (sort) {
+ TreeSortable sortable = view.get_model() as TreeSortable;
+ sortable.set_sort_column_id (0, SortType.ASCENDING);
+ }
}
private void sanitize_user_dirs () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]