[baobab] Sort by size when allocated size in not available



commit bef030edf73985564b01658b94682663d00c7601
Author: Stefano Facchini <stefano facchini gmail com>
Date:   Sat Jul 20 18:20:16 2013 +0200

    Sort by size when allocated size in not available

 src/baobab-window.vala |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/baobab-window.vala b/src/baobab-window.vala
index bea02c0..e7505cd 100644
--- a/src/baobab-window.vala
+++ b/src/baobab-window.vala
@@ -54,6 +54,8 @@ namespace Baobab {
         [GtkChild]
         private Gtk.TreeView treeview;
         [GtkChild]
+        private Gtk.TreeViewColumn size_column;
+        [GtkChild]
         private CellRendererSize size_column_size_renderer;
         [GtkChild]
         private Gtk.Menu treeview_popup_menu;
@@ -588,6 +590,7 @@ namespace Baobab {
                 scanner.get (iter, Scanner.Columns.ALLOC_SIZE, out alloc_size, -1);
                 bool show_allocated_size = alloc_size > 0;
                 size_column_size_renderer.show_allocated_size = show_allocated_size;
+                size_column.sort_column_id = show_allocated_size ? Scanner.Columns.ALLOC_SIZE : 
Scanner.Columns.SIZE;
                 set_chart_model (active_location.scanner, show_allocated_size);
 
                 set_ui_state (result_page, false);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]