[gnome-disk-utility/udisks2-port] Add mnemonics for device tree, volumes and cache switch



commit ea3c8896e077417fdcd8708bbad9e7f5ea137f5e
Author: David Zeuthen <davidz redhat com>
Date:   Thu Mar 10 16:32:30 2011 -0500

    Add mnemonics for device tree, volumes and cache switch
    
    Signed-off-by: David Zeuthen <davidz redhat com>

 data/ui/palimpsest.ui      |    8 +++++---
 src/palimpsest/gduwindow.c |   12 ++++++++++++
 2 files changed, 17 insertions(+), 3 deletions(-)
---
diff --git a/data/ui/palimpsest.ui b/data/ui/palimpsest.ui
index c82ff3b..bf8791a 100644
--- a/data/ui/palimpsest.ui
+++ b/data/ui/palimpsest.ui
@@ -25,7 +25,7 @@
                   <object class="GtkTreeView" id="device-tree-treeview">
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
-                    <property name="headers_visible">False</property>
+                    <property name="headers_clickable">False</property>
                     <property name="show_expanders">False</property>
                     <property name="level_indentation">12</property>
                     <child internal-child="selection">
@@ -180,7 +180,8 @@
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="xalign">1</property>
-                            <property name="label" translatable="yes">Write Cache</property>
+                            <property name="label" translatable="yes">_Write Cache</property>
+                            <property name="use_underline">True</property>
                             <attributes>
                               <attribute name="foreground" value="#555555555555"/>
                             </attributes>
@@ -454,8 +455,9 @@
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
                     <property name="xalign">0</property>
-                    <property name="label" translatable="yes">&lt;b&gt;Volumes&lt;/b&gt;</property>
+                    <property name="label" translatable="yes">&lt;b&gt;_Volumes&lt;/b&gt;</property>
                     <property name="use_markup">True</property>
+                    <property name="use_underline">True</property>
                   </object>
                   <packing>
                     <property name="expand">False</property>
diff --git a/src/palimpsest/gduwindow.c b/src/palimpsest/gduwindow.c
index 6c40861..6404feb 100644
--- a/src/palimpsest/gduwindow.c
+++ b/src/palimpsest/gduwindow.c
@@ -227,6 +227,7 @@ gdu_window_constructed (GObject *object)
   GtkTreeSelection *selection;
   const gchar *path;
   GtkWidget *w;
+  GtkWidget *label;
   GtkStyleContext *context;
   GDBusProxyManager *proxy_manager;
 
@@ -265,6 +266,13 @@ gdu_window_constructed (GObject *object)
   window->model = gdu_device_tree_model_new (window->client);
 
   tree_view = GTK_TREE_VIEW (gdu_window_get_widget (window, "device-tree-treeview"));
+
+  label = gtk_label_new (NULL);
+  gtk_label_set_markup_with_mnemonic (GTK_LABEL (label), _("_Storage Devices"));
+  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+  gtk_label_set_mnemonic_widget (GTK_LABEL (label), GTK_WIDGET (tree_view));
+  gtk_widget_show_all (label);
+
   gtk_tree_view_set_model (tree_view, GTK_TREE_MODEL (window->model));
   gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (window->model),
                                         GDU_DEVICE_TREE_MODEL_COLUMN_SORT_KEY,
@@ -278,6 +286,7 @@ gdu_window_constructed (GObject *object)
                     window);
 
   column = gtk_tree_view_column_new ();
+  gtk_tree_view_column_set_widget (column, label);
   gtk_tree_view_append_column (tree_view, column);
 
   renderer = gtk_cell_renderer_text_new ();
@@ -340,6 +349,9 @@ gdu_window_constructed (GObject *object)
   gtk_box_pack_start (GTK_BOX (gdu_window_get_widget (window, "devtab-grid-hbox")),
                       window->volume_grid,
                       TRUE, TRUE, 0);
+
+  gtk_label_set_mnemonic_widget (GTK_LABEL (gdu_window_get_widget (window, "devtab-volumes-label")),
+                                 window->volume_grid);
 }
 
 static void



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