[gnome-disk-utility] Make it possible to edit x-gvfs-symbolic-icon=foo mount option



commit a44d3cc2472440e5e30e52c4d01bc3293d8b672f
Author: David Zeuthen <zeuthen gmail com>
Date:   Wed Dec 5 19:00:32 2012 -0500

    Make it possible to edit x-gvfs-symbolic-icon=foo mount option
    
    See this commit
    
     http://git.gnome.org/browse/gvfs/commit/?id=bb4e7ed0236855d2ced7cfd4445877822da8fe7b
    
    for in GVfs.
    
    Signed-off-by: David Zeuthen <zeuthen gmail com>

 data/ui/edit-fstab-dialog.ui |   51 +++++++++++++++++++++++++++++++----------
 src/disks/gdufstabdialog.c   |    5 ++++
 2 files changed, 43 insertions(+), 13 deletions(-)
---
diff --git a/data/ui/edit-fstab-dialog.ui b/data/ui/edit-fstab-dialog.ui
index a4ee109..dbe0b8c 100644
--- a/data/ui/edit-fstab-dialog.ui
+++ b/data/ui/edit-fstab-dialog.ui
@@ -4,11 +4,11 @@
   <object class="GtkDialog" id="device-fstab-dialog">
     <property name="can_focus">False</property>
     <property name="border_width">5</property>
+    <property name="title" translatable="yes">Mount Options</property>
     <property name="resizable">False</property>
     <property name="modal">True</property>
     <property name="destroy_with_parent">True</property>
     <property name="type_hint">dialog</property>
-    <property name="title" translatable="yes">Mount Options</property>
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox6">
         <property name="can_focus">False</property>
@@ -59,11 +59,9 @@
                 </child>
                 <child>
                   <object class="GtkSwitch" id="automatic-mount-options-switch">
-                    <property name="use_action_appearance">False</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="tooltip_markup" translatable="yes">Switch off &lt;i&gt;Automatic Mount Options&lt;/i&gt; to manage mount point and mount options for the device. The options correspond to an entry in the &lt;b&gt;/etc/fstab&lt;/b&gt; file</property>
-                    <property name="use_action_appearance">False</property>
                   </object>
                   <packing>
                     <property name="expand">False</property>
@@ -288,14 +286,12 @@
                     <child>
                       <object class="GtkCheckButton" id="fstab-show-checkbutton">
                         <property name="label" translatable="yes">Sho_w in user interface</property>
-                        <property name="use_action_appearance">False</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="has_tooltip">True</property>
                         <property name="tooltip_markup" translatable="yes">If checked, the device is always shown in the user interface no matter what its directory is [x-gvfs-show]</property>
                         <property name="tooltip_text" translatable="yes">If checked, the device is always shown in the user interface no matter what its directory is [x-gvfs-show]</property>
-                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="xalign">0</property>
                         <property name="draw_indicator">True</property>
@@ -310,14 +306,12 @@
                     <child>
                       <object class="GtkCheckButton" id="fstab-auth-checkbutton">
                         <property name="label" translatable="yes">Require additional authori_zation to mount</property>
-                        <property name="use_action_appearance">False</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="has_tooltip">True</property>
                         <property name="tooltip_markup" translatable="yes">If checked, additional authorization is required to mount the device [x-udisks-auth]</property>
                         <property name="tooltip_text" translatable="yes">If checked, additional authorization is required to mount the device [x-udisks-auth]</property>
-                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="xalign">0</property>
                         <property name="draw_indicator">True</property>
@@ -332,13 +326,11 @@
                     <child>
                       <object class="GtkCheckButton" id="fstab-neg-noauto-checkbutton">
                         <property name="label" translatable="yes">Mount at _startup</property>
-                        <property name="use_action_appearance">False</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
                         <property name="has_tooltip">True</property>
                         <property name="tooltip_markup" translatable="yes">If checked, the device will be mounted at startup [!noauto]</property>
-                        <property name="use_action_appearance">False</property>
                         <property name="use_underline">True</property>
                         <property name="xalign">0</property>
                         <property name="draw_indicator">True</property>
@@ -350,6 +342,43 @@
                         <property name="height">1</property>
                       </packing>
                     </child>
+                    <child>
+                      <object class="GtkLabel" id="label4">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">1</property>
+                        <property name="label" translatable="yes">S_ymbolic Icon Name</property>
+                        <property name="use_underline">True</property>
+                        <property name="mnemonic_widget">fstab-symbolic-icon-entry</property>
+                        <style>
+                          <class name="dim-label"/>
+                        </style>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">5</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkEntry" id="fstab-symbolic-icon-entry">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="has_tooltip">True</property>
+                        <property name="tooltip_markup" translatable="yes">If set, the name of the symbolic icon to use in the device in the user interface [x-gvfs-symbolic-icon=]</property>
+                        <property name="tooltip_text" translatable="yes">If set, the name of the symbolic icon to use in the device in the user interface [x-gvfs-symbolic-icon=]</property>
+                        <property name="hexpand">True</property>
+                        <property name="invisible_char">â</property>
+                        <property name="invisible_char_set">True</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">5</property>
+                        <property name="width">1</property>
+                        <property name="height">1</property>
+                      </packing>
+                    </child>
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
@@ -421,11 +450,9 @@
             <child>
               <object class="GtkButton" id="fstab-button-cancel">
                 <property name="label">gtk-cancel</property>
-                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
@@ -437,12 +464,10 @@
             <child>
               <object class="GtkButton" id="fstab-button-ok">
                 <property name="label">gtk-ok</property>
-                <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
                 <property name="receives_default">True</property>
-                <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
diff --git a/src/disks/gdufstabdialog.c b/src/disks/gdufstabdialog.c
index e11a3ca..e030026 100644
--- a/src/disks/gdufstabdialog.c
+++ b/src/disks/gdufstabdialog.c
@@ -36,6 +36,7 @@ typedef struct
   GtkWidget *show_checkbutton;
   GtkWidget *name_entry;
   GtkWidget *icon_entry;
+  GtkWidget *symbolic_icon_entry;
 
   GVariant *orig_fstab_entry;
 } FstabDialogData;
@@ -85,6 +86,7 @@ update (FstabDialogData *data,
   gdu_options_update_check_option (data->options_entry, "x-gvfs-show", widget, data->show_checkbutton, FALSE, FALSE);
   gdu_options_update_entry_option (data->options_entry, "x-gvfs-name=", widget, data->name_entry);
   gdu_options_update_entry_option (data->options_entry, "x-gvfs-icon=", widget, data->icon_entry);
+  gdu_options_update_entry_option (data->options_entry, "x-gvfs-symbolic-icon=", widget, data->symbolic_icon_entry);
   g_object_thaw_notify (G_OBJECT (data->options_entry));
 
   can_ok = FALSE;
@@ -401,6 +403,7 @@ gdu_fstab_dialog_show (GduWindow    *window,
   data.show_checkbutton = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-show-checkbutton"));
   data.name_entry = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-name-entry"));
   data.icon_entry = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-icon-entry"));
+  data.symbolic_icon_entry = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-symbolic-icon-entry"));
 
   /* there could be multiple fstab entries - we only consider the first one */
   g_variant_iter_init (&iter, udisks_block_get_configuration (block));
@@ -489,6 +492,8 @@ gdu_fstab_dialog_show (GduWindow    *window,
                     "notify::text", G_CALLBACK (on_property_changed), &data);
   g_signal_connect (data.icon_entry,
                     "notify::text", G_CALLBACK (on_property_changed), &data);
+  g_signal_connect (data.symbolic_icon_entry,
+                    "notify::text", G_CALLBACK (on_property_changed), &data);
 
  again:
   response = gtk_dialog_run (GTK_DIALOG (dialog));



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