[baobab/wip/new-design: 54/59] Show mount point in the volume chooser



commit 60cd5f1c19376f64a03682f676827eff8ba56aa6
Author: Stefano Facchini <stefano facchini gmail com>
Date:   Thu Mar 15 16:35:21 2012 +0100

    Show mount point in the volume chooser
    
    Instead of a non-clickable checkbox, show the full mount point
    if mounted, otherwise show "Not mounted"

 src/baobab-volume-chooser-dialog.ui |    4 ++--
 src/baobab-window.vala              |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/baobab-volume-chooser-dialog.ui b/src/baobab-volume-chooser-dialog.ui
index cd94590..b07771f 100644
--- a/src/baobab-volume-chooser-dialog.ui
+++ b/src/baobab-volume-chooser-dialog.ui
@@ -88,13 +88,13 @@
             <child>
               <object class="GtkTreeViewColumn" id="mount-column">
                 <property name="sizing">autosize</property>
-                <property name="title" translatable="yes">Mounted</property>
+                <property name="title" translatable="yes">Mounted at</property>
                 <property name="expand">True</property>
                 <property name="clickable">True</property>
                 <property name="reorderable">True</property>
                 <property name="sort_column_id">0</property>
                 <child>
-                  <object class="GtkCellRendererToggle" id="mount-renderer"/>
+                  <object class="GtkCellRendererText" id="mount-renderer"/>
                 </child>
               </object>
             </child>
diff --git a/src/baobab-window.vala b/src/baobab-window.vala
index 2c576dd..b8fd6dc 100644
--- a/src/baobab-window.vala
+++ b/src/baobab-window.vala
@@ -142,7 +142,7 @@ namespace Baobab {
 			var dialog = builder.get_object ("volume-dialog") as Gtk.Dialog;
 			var volume_treeview = builder.get_object ("volume-treeview") as Gtk.TreeView;
 			var mount_column = builder.get_object ("mount-column") as Gtk.TreeViewColumn;
-			var mount_renderer = builder.get_object ("mount-renderer") as Gtk.CellRendererToggle;
+			var mount_renderer = builder.get_object ("mount-renderer") as Gtk.CellRendererText;
 
 			VolumeList volumes = new VolumeList ();
 			volume_treeview.model = volumes;
@@ -150,7 +150,7 @@ namespace Baobab {
 			mount_column.set_cell_data_func (mount_renderer, (layout, cell, model, iter) => {
 				string? mount_point = null;
 				model.get (iter, VolumeList.Columns.MOUNT_POINT, out mount_point);
-				((Gtk.CellRendererToggle) cell).active = mount_point != null;
+				((Gtk.CellRendererText) cell).text = mount_point != null ? mount_point : _("Not mounted");
 			});
 
 			dialog.response.connect ((response) => {



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