[gnome-disk-utility/udisks2-port] Collapse "Mounted", "Active" and "Unlocked" into a single "In Use" property



commit 3827831e8d0e3bf7dfe2767725baade3cfbd1f82
Author: David Zeuthen <davidz redhat com>
Date:   Fri Dec 9 12:38:39 2011 -0500

    Collapse "Mounted", "Active" and "Unlocked" into a single "In Use" property
    
    Suggested by McCann.
    
    http://people.freedesktop.org/~david/gdu2-in-use.png
    
    Signed-off-by: David Zeuthen <davidz redhat com>

 data/ui/palimpsest.ui      |  118 ++++++++-----------------------------------
 src/palimpsest/gduwindow.c |   34 +++++++------
 2 files changed, 40 insertions(+), 112 deletions(-)
---
diff --git a/data/ui/palimpsest.ui b/data/ui/palimpsest.ui
index a8cc210..a1e7854 100644
--- a/data/ui/palimpsest.ui
+++ b/data/ui/palimpsest.ui
@@ -865,7 +865,7 @@
                           <object class="GtkTable" id="devtab-table">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="n_rows">9</property>
+                            <property name="n_rows">7</property>
                             <property name="n_columns">2</property>
                             <property name="column_spacing">10</property>
                             <child>
@@ -976,11 +976,11 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkLabel" id="devtab-volume-filesystem-mounted-label">
+                              <object class="GtkLabel" id="devtab-volume-in-use-label">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="xalign">1</property>
-                                <property name="label" translatable="yes">Mounted</property>
+                                <property name="label" translatable="yes">In Use</property>
                                 <attributes>
                                   <attribute name="foreground" value="#555555555555"/>
                                 </attributes>
@@ -994,7 +994,7 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkLabel" id="devtab-volume-filesystem-mounted-value-label">
+                              <object class="GtkLabel" id="devtab-volume-in-use-value-label">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="hexpand">True</property>
@@ -1013,25 +1013,25 @@
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkLabel" id="devtab-volume-swap-active-label">
+                              <object class="GtkLabel" id="devtab-partition-label">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="xalign">1</property>
-                                <property name="label" translatable="yes">Active</property>
+                                <property name="label" translatable="yes">Partition Type</property>
                                 <attributes>
                                   <attribute name="foreground" value="#555555555555"/>
                                 </attributes>
                               </object>
                               <packing>
-                                <property name="top_attach">6</property>
-                                <property name="bottom_attach">7</property>
+                                <property name="top_attach">3</property>
+                                <property name="bottom_attach">4</property>
                                 <property name="x_options">GTK_FILL</property>
                                 <property name="y_options"></property>
                                 <property name="y_padding">4</property>
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkLabel" id="devtab-volume-swap-active-value-label">
+                              <object class="GtkLabel" id="devtab-partition-value-label">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="hexpand">True</property>
@@ -1042,33 +1042,33 @@
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
-                                <property name="top_attach">6</property>
-                                <property name="bottom_attach">7</property>
+                                <property name="top_attach">3</property>
+                                <property name="bottom_attach">4</property>
                                 <property name="x_options">GTK_FILL</property>
                                 <property name="y_options"></property>
                                 <property name="y_padding">4</property>
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkLabel" id="devtab-volume-encrypted-unlocked-label">
+                              <object class="GtkLabel" id="devtab-backing-file-label">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="xalign">1</property>
-                                <property name="label" translatable="yes">Unlocked</property>
+                                <property name="label" translatable="yes">Backing File</property>
                                 <attributes>
                                   <attribute name="foreground" value="#555555555555"/>
                                 </attributes>
                               </object>
                               <packing>
-                                <property name="top_attach">7</property>
-                                <property name="bottom_attach">8</property>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
                                 <property name="x_options">GTK_FILL</property>
                                 <property name="y_options"></property>
                                 <property name="y_padding">4</property>
                               </packing>
                             </child>
                             <child>
-                              <object class="GtkLabel" id="devtab-volume-encrypted-unlocked-value-label">
+                              <object class="GtkLabel" id="devtab-backing-file-value-label">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="hexpand">True</property>
@@ -1079,8 +1079,8 @@
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
-                                <property name="top_attach">7</property>
-                                <property name="bottom_attach">8</property>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
                                 <property name="x_options">GTK_FILL</property>
                                 <property name="y_options"></property>
                                 <property name="y_padding">4</property>
@@ -1097,8 +1097,8 @@
                                 </attributes>
                               </object>
                               <packing>
-                                <property name="top_attach">8</property>
-                                <property name="bottom_attach">9</property>
+                                <property name="top_attach">6</property>
+                                <property name="bottom_attach">7</property>
                                 <property name="x_options">GTK_FILL</property>
                                 <property name="y_options"></property>
                                 <property name="y_padding">4</property>
@@ -1116,82 +1116,8 @@
                               <packing>
                                 <property name="left_attach">1</property>
                                 <property name="right_attach">2</property>
-                                <property name="top_attach">8</property>
-                                <property name="bottom_attach">9</property>
-                                <property name="x_options">GTK_FILL</property>
-                                <property name="y_options"></property>
-                                <property name="y_padding">4</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkLabel" id="devtab-partition-label">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="xalign">1</property>
-                                <property name="label" translatable="yes">Partition Type</property>
-                                <attributes>
-                                  <attribute name="foreground" value="#555555555555"/>
-                                </attributes>
-                              </object>
-                              <packing>
-                                <property name="top_attach">3</property>
-                                <property name="bottom_attach">4</property>
-                                <property name="x_options">GTK_FILL</property>
-                                <property name="y_options"></property>
-                                <property name="y_padding">4</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkLabel" id="devtab-partition-value-label">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="hexpand">True</property>
-                                <property name="xalign">0</property>
-                                <property name="selectable">True</property>
-                                <property name="ellipsize">end</property>
-                              </object>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">3</property>
-                                <property name="bottom_attach">4</property>
-                                <property name="x_options">GTK_FILL</property>
-                                <property name="y_options"></property>
-                                <property name="y_padding">4</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkLabel" id="devtab-backing-file-label">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="xalign">1</property>
-                                <property name="label" translatable="yes">Backing File</property>
-                                <attributes>
-                                  <attribute name="foreground" value="#555555555555"/>
-                                </attributes>
-                              </object>
-                              <packing>
-                                <property name="top_attach">2</property>
-                                <property name="bottom_attach">3</property>
-                                <property name="x_options">GTK_FILL</property>
-                                <property name="y_options"></property>
-                                <property name="y_padding">4</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <object class="GtkLabel" id="devtab-backing-file-value-label">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="hexpand">True</property>
-                                <property name="xalign">0</property>
-                                <property name="selectable">True</property>
-                                <property name="ellipsize">end</property>
-                              </object>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">2</property>
-                                <property name="bottom_attach">3</property>
+                                <property name="top_attach">6</property>
+                                <property name="bottom_attach">7</property>
                                 <property name="x_options">GTK_FILL</property>
                                 <property name="y_options"></property>
                                 <property name="y_padding">4</property>
diff --git a/src/palimpsest/gduwindow.c b/src/palimpsest/gduwindow.c
index 0fc3a1f..244975a 100644
--- a/src/palimpsest/gduwindow.c
+++ b/src/palimpsest/gduwindow.c
@@ -2030,25 +2030,27 @@ update_device_page_for_block (GduWindow          *window,
           /* TODO: right now we only display the first mount point */
           if (g_strcmp0 (mount_points[0], "/") == 0)
             {
-              /* Translators: This is shown for a device mounted at the filesystem root / - we show
-               * this text instead of '/', because '/' is too small to hit as a hyperlink
+              /* Translators: Use for mount point '/' simply because '/' is too small to hit as a hyperlink
                */
-              mount_point = g_strdup_printf ("<a href=\"file:///\">%s</a>", _("Root Filesystem (/)"));
+              s = g_strdup_printf ("<a href=\"file:///\">%s</a>", _("Filesystem Root"));
             }
           else
             {
-              mount_point = g_strdup_printf ("<a href=\"file://%s\">%s</a>",
-                                             mount_points[0], mount_points[0]);
+              s = g_strdup_printf ("<a href=\"file://%s\">%s</a>",
+                                   mount_points[0], mount_points[0]);
             }
+          /* Translators: Shown next to "In Use". The first %s is the mount point, e.g. /media/foobar */
+          mount_point = g_strdup_printf (_("Yes, mounted at %s"), s);
+          g_free (s);
         }
       else
         {
-          /* Translators: Shown when the device is not mounted next to the "Mounted" label */
+          /* Translators: Shown when the device is not mounted next to the "In Use" label */
           mount_point = g_strdup (_("No"));
         }
       set_markup (window,
-                  "devtab-volume-filesystem-mounted-label",
-                  "devtab-volume-filesystem-mounted-value-label",
+                  "devtab-volume-in-use-label",
+                  "devtab-volume-in-use-value-label",
                   mount_point,
                   SET_MARKUP_FLAGS_NONE);
       g_free (mount_point);
@@ -2073,18 +2075,18 @@ update_device_page_for_block (GduWindow          *window,
           if (udisks_swapspace_get_active (swapspace))
             {
               *show_flags |= SHOW_FLAGS_DEACTIVATE_SWAP_BUTTON;
-              /* Translators: Shown if the swap device is in use next to the "Active" label */
+              /* Translators: Shown if the swap device is in use next to the "In Use" label */
               str = _("Yes");
             }
           else
             {
               *show_flags |= SHOW_FLAGS_ACTIVATE_SWAP_BUTTON;
-              /* Translators: Shown if the swap device is not in use next to the "Active" label */
+              /* Translators: Shown if the swap device is not in use next to the "In Use" label */
               str = _("No");
             }
           set_markup (window,
-                      "devtab-volume-swap-active-label",
-                      "devtab-volume-swap-active-value-label",
+                      "devtab-volume-in-use-label",
+                      "devtab-volume-in-use-value-label",
                       str,
                       SET_MARKUP_FLAGS_NONE);
         }
@@ -2099,18 +2101,18 @@ update_device_page_for_block (GduWindow          *window,
       if (cleartext_device != NULL)
         {
           *show_flags |= SHOW_FLAGS_ENCRYPTED_LOCK_BUTTON;
-          /* Translators: Shown if the encrypted device is unlocked next to the "Unlocked" label */
+          /* Translators: Shown if the encrypted device is unlocked next to the "In Use" label */
           str = _("Yes");
         }
       else
         {
           *show_flags |= SHOW_FLAGS_ENCRYPTED_UNLOCK_BUTTON;
-          /* Translators: Shown if the encrypted device is not unlocked next to the "Unlocked" label */
+          /* Translators: Shown if the encrypted device is not unlocked next to the "In Use" label */
           str = _("No");
         }
       set_markup (window,
-                  "devtab-volume-encrypted-unlocked-label",
-                  "devtab-volume-encrypted-unlocked-value-label",
+                  "devtab-volume-in-use-label",
+                  "devtab-volume-in-use-value-label",
                   str,
                   SET_MARKUP_FLAGS_NONE);
 



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