[gnome-disk-utility] fstab: Show checkbox for 'nofail' and nuke checkbox for 'defaults'



commit ebb4a6aa1e8575f33e12c6960179a9a1859e9a4c
Author: David Zeuthen <davidz redhat com>
Date:   Tue Jan 24 17:55:18 2012 -0500

    fstab: Show checkbox for 'nofail' and nuke checkbox for 'defaults'
    
    Signed-off-by: David Zeuthen <davidz redhat com>

 data/ui/edit-fstab-dialog.ui    |   19 ++++++-------------
 src/palimpsest/gdufstabdialog.c |   14 +++++++-------
 2 files changed, 13 insertions(+), 20 deletions(-)
---
diff --git a/data/ui/edit-fstab-dialog.ui b/data/ui/edit-fstab-dialog.ui
index f27e7de..3ecbb75 100644
--- a/data/ui/edit-fstab-dialog.ui
+++ b/data/ui/edit-fstab-dialog.ui
@@ -265,14 +265,13 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkCheckButton" id="fstab-defaults-checkbutton">
-                        <property name="label" translatable="yes">Defaults</property>
+                      <object class="GtkCheckButton" id="fstab-noauto-checkbutton">
+                        <property name="label" translatable="yes">Don't mount at startup</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes">If checked, the default options will be used (rw, suid, dev, exec, auto, nouser, async) [defaults]</property>
+                        <property name="tooltip_text" translatable="yes">If checked, the device will not 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>
                       </object>
@@ -284,14 +283,13 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkCheckButton" id="fstab-noauto-checkbutton">
-                        <property name="label" translatable="yes">Don't mount at startu_p</property>
+                      <object class="GtkCheckButton" id="fstab-nofail-checkbutton">
+                        <property name="label" translatable="yes">Don't wait for device at startup</property>
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
-                        <property name="tooltip_text" translatable="yes">If checked, the device will not be mounted at startup [noauto]</property>
+                        <property name="tooltip_text" translatable="yes">If checked, the system won't wait for the device at startup [nofail]</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>
                       </object>
@@ -310,7 +308,6 @@
                         <property name="receives_default">False</property>
                         <property name="tooltip_text" translatable="yes">If checked, additional authorization (typically requiring the user to prove he is an administrator) 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>
                       </object>
@@ -329,7 +326,6 @@
                         <property name="receives_default">False</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>
                       </object>
@@ -348,7 +344,6 @@
                         <property name="receives_default">False</property>
                         <property name="tooltip_text" translatable="yes">If checked, the device is never shown in the user interface no matter what its directory is [x-gvfs-hide]</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>
                       </object>
@@ -371,7 +366,6 @@
                             <property name="can_focus">False</property>
                             <property name="xalign">1</property>
                             <property name="label" translatable="yes">Display _Name</property>
-                            <property name="use_underline">True</property>
                             <property name="mnemonic_widget">fstab-name-entry</property>
                             <style>
                               <class name="dim-label"/>
@@ -407,7 +401,6 @@
                             <property name="can_focus">False</property>
                             <property name="xalign">1</property>
                             <property name="label" translatable="yes">Icon Na_me</property>
-                            <property name="use_underline">True</property>
                             <property name="mnemonic_widget">fstab-icon-entry</property>
                             <style>
                               <class name="dim-label"/>
diff --git a/src/palimpsest/gdufstabdialog.c b/src/palimpsest/gdufstabdialog.c
index dcf1b1c..dad7f44 100644
--- a/src/palimpsest/gdufstabdialog.c
+++ b/src/palimpsest/gdufstabdialog.c
@@ -45,8 +45,8 @@ typedef struct
   GtkWidget *type_entry;
 
   GtkWidget *options_entry;
-  GtkWidget *defaults_checkbutton;
   GtkWidget *noauto_checkbutton;
+  GtkWidget *nofail_checkbutton;
   GtkWidget *auth_checkbutton;
   GtkWidget *show_checkbutton;
   GtkWidget *hide_checkbutton;
@@ -96,8 +96,8 @@ update (FstabDialogData *data,
   ui_opts = gtk_entry_get_text (GTK_ENTRY (data->options_entry));
 
   g_object_freeze_notify (G_OBJECT (data->options_entry));
-  gdu_options_update_check_option (data->options_entry, "defaults", widget, data->defaults_checkbutton, TRUE);
   gdu_options_update_check_option (data->options_entry, "noauto", widget, data->noauto_checkbutton, FALSE);
+  gdu_options_update_check_option (data->options_entry, "nofail", widget, data->nofail_checkbutton, TRUE);
   gdu_options_update_check_option (data->options_entry, "x-udisks-auth", widget, data->auth_checkbutton, FALSE);
   gdu_options_update_check_option (data->options_entry, "x-gvfs-show", widget, data->show_checkbutton, FALSE);
   gdu_options_update_check_option (data->options_entry, "x-gvfs-hide", widget, data->hide_checkbutton, FALSE);
@@ -417,8 +417,8 @@ gdu_fstab_dialog_show (GduWindow    *window,
   data.directory_entry = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-directory-entry"));
   data.type_entry = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-type-entry"));
   data.options_entry = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-options-entry"));
-  data.defaults_checkbutton = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-defaults-checkbutton"));
   data.noauto_checkbutton = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-noauto-checkbutton"));
+  data.nofail_checkbutton = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-nofail-checkbutton"));
   data.auth_checkbutton = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-auth-checkbutton"));
   data.show_checkbutton = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-show-checkbutton"));
   data.hide_checkbutton = GTK_WIDGET (gtk_builder_get_object (builder, "fstab-hide-checkbutton"));
@@ -455,10 +455,10 @@ gdu_fstab_dialog_show (GduWindow    *window,
       fsname = NULL;
       dir = "";
       type = "auto";
-      opts = "defaults";
+      opts = "nofail";
       /* propose noauto if the media is removable - otherwise e.g. systemd will time out at boot */
       if (drive != NULL && udisks_drive_get_removable (drive))
-        opts = "defaults,noauto";
+        opts = "noauto";
       freq = 0;
       passno = 0;
     }
@@ -502,10 +502,10 @@ gdu_fstab_dialog_show (GduWindow    *window,
                     "notify::text", G_CALLBACK (on_property_changed), &data);
   g_signal_connect (data.device_combobox,
                     "changed", G_CALLBACK (fstab_on_device_combobox_changed), &data);
-  g_signal_connect (data.defaults_checkbutton,
-                    "notify::active", G_CALLBACK (on_property_changed), &data);
   g_signal_connect (data.noauto_checkbutton,
                     "notify::active", G_CALLBACK (on_property_changed), &data);
+  g_signal_connect (data.nofail_checkbutton,
+                    "notify::active", G_CALLBACK (on_property_changed), &data);
   g_signal_connect (data.auth_checkbutton,
                     "notify::active", G_CALLBACK (on_property_changed), &data);
   g_signal_connect (data.show_checkbutton,



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