[gnome-disk-utility] fstab,crypttab dialogs: Use OK, not Apply



commit f9f6d21309ae339cf52285075ed9c11d95d46ac5
Author: David Zeuthen <davidz redhat com>
Date:   Mon Feb 27 13:09:00 2012 -0500

    fstab,crypttab dialogs: Use OK, not Apply
    
    Signed-off-by: David Zeuthen <davidz redhat com>

 data/ui/edit-crypttab-dialog.ui    |    7 ++++---
 data/ui/edit-fstab-dialog.ui       |    7 ++++---
 src/palimpsest/gducrypttabdialog.c |   12 ++++++------
 src/palimpsest/gdufstabdialog.c    |   14 +++++++-------
 4 files changed, 21 insertions(+), 19 deletions(-)
---
diff --git a/data/ui/edit-crypttab-dialog.ui b/data/ui/edit-crypttab-dialog.ui
index 93314c2..4761d5f 100644
--- a/data/ui/edit-crypttab-dialog.ui
+++ b/data/ui/edit-crypttab-dialog.ui
@@ -34,12 +34,13 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="crypttab-apply-button">
-                <property name="label">gtk-apply</property>
+              <object class="GtkButton" id="crypttab-ok-button">
+                <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="receives_default">True</property>
+                <property name="can_default">True</property>
                 <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
               </object>
@@ -362,7 +363,7 @@
     </child>
     <action-widgets>
       <action-widget response="0">crypttab-cancel-button</action-widget>
-      <action-widget response="-10">crypttab-apply-button</action-widget>
+      <action-widget response="-5">crypttab-ok-button</action-widget>
       <action-widget response="1">crypttab-reset-button</action-widget>
     </action-widgets>
   </object>
diff --git a/data/ui/edit-fstab-dialog.ui b/data/ui/edit-fstab-dialog.ui
index ad1c251..9cc6022 100644
--- a/data/ui/edit-fstab-dialog.ui
+++ b/data/ui/edit-fstab-dialog.ui
@@ -405,12 +405,13 @@
               </packing>
             </child>
             <child>
-              <object class="GtkButton" id="fstab-button-apply">
-                <property name="label">gtk-apply</property>
+              <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="receives_default">True</property>
+                <property name="can_default">True</property>
                 <property name="tooltip_markup" translatable="yes">Click to create or update entry in the &lt;b&gt;/etc/fstab&lt;/b&gt; file</property>
                 <property name="use_action_appearance">False</property>
                 <property name="use_stock">True</property>
@@ -450,7 +451,7 @@
     </child>
     <action-widgets>
       <action-widget response="-6">fstab-button-cancel</action-widget>
-      <action-widget response="-10">fstab-button-apply</action-widget>
+      <action-widget response="-5">fstab-button-ok</action-widget>
       <action-widget response="1">fstab-button-reset</action-widget>
     </action-widgets>
   </object>
diff --git a/src/palimpsest/gducrypttabdialog.c b/src/palimpsest/gducrypttabdialog.c
index 31cd446..a5a8139 100644
--- a/src/palimpsest/gducrypttabdialog.c
+++ b/src/palimpsest/gducrypttabdialog.c
@@ -89,7 +89,7 @@ update (CrypttabDialogData *data,
   const gchar *passphrase_path;
   const gchar *passphrase_contents;
   const gchar *options;
-  gboolean can_apply;
+  gboolean can_ok;
   gchar *s;
 
   if (data->orig_crypttab_entry != NULL)
@@ -157,16 +157,16 @@ update (CrypttabDialogData *data,
   gdu_options_update_check_option (data->options_entry, "x-udisks-auth", widget, data->auth_checkbutton, FALSE, FALSE);
   g_object_thaw_notify (G_OBJECT (data->options_entry));
 
-  can_apply = FALSE;
+  can_ok = FALSE;
   if (g_strcmp0 (ui_name, name) != 0 ||
       g_strcmp0 (ui_options, options) != 0 ||
       g_strcmp0 (ui_passphrase_contents, passphrase_contents) != 0)
     {
-      can_apply = TRUE;
+      can_ok = TRUE;
     }
   gtk_dialog_set_response_sensitive (GTK_DIALOG (data->dialog),
-                                     GTK_RESPONSE_APPLY,
-                                     can_apply);
+                                     GTK_RESPONSE_OK,
+                                     can_ok);
 }
 
 static void
@@ -256,7 +256,7 @@ crypttab_dialog_present (CrypttabDialogData *data)
           goto out;
         }
     }
-  else if (response == GTK_RESPONSE_APPLY)
+  else if (response == GTK_RESPONSE_OK)
     {
       const gchar *ui_name;
       const gchar *ui_options;
diff --git a/src/palimpsest/gdufstabdialog.c b/src/palimpsest/gdufstabdialog.c
index 96618b3..a138ef7 100644
--- a/src/palimpsest/gdufstabdialog.c
+++ b/src/palimpsest/gdufstabdialog.c
@@ -66,7 +66,7 @@ update (FstabDialogData *data,
   const gchar *dir;
   const gchar *type;
   const gchar *opts;
-  gboolean can_apply;
+  gboolean can_ok;
 
   if (data->orig_fstab_entry != NULL)
     {
@@ -96,13 +96,13 @@ update (FstabDialogData *data,
   gdu_options_update_entry_option (data->options_entry, "x-gvfs-icon=", widget, data->icon_entry);
   g_object_thaw_notify (G_OBJECT (data->options_entry));
 
-  can_apply = FALSE;
+  can_ok = FALSE;
   if (g_strcmp0 (ui_fsname, fsname) != 0 ||
       g_strcmp0 (ui_dir, dir) != 0 ||
       g_strcmp0 (ui_type, type) != 0 ||
       g_strcmp0 (ui_opts, opts) != 0)
     {
-      can_apply = TRUE;
+      can_ok = TRUE;
     }
 
   /* sanity-check and validate */
@@ -111,12 +111,12 @@ update (FstabDialogData *data,
       strlen (ui_type) == 0 ||
       strlen (ui_opts) == 0)
     {
-      can_apply = FALSE;
+      can_ok = FALSE;
     }
 
   gtk_dialog_set_response_sensitive (GTK_DIALOG (data->dialog),
-                                     GTK_RESPONSE_APPLY,
-                                     can_apply);
+                                     GTK_RESPONSE_OK,
+                                     can_ok);
 
   g_free (ui_fsname);
 }
@@ -510,7 +510,7 @@ gdu_fstab_dialog_show (GduWindow    *window,
           goto out;
         }
     }
-  else if (response == GTK_RESPONSE_APPLY)
+  else if (response == GTK_RESPONSE_OK)
     {
       gchar *ui_fsname;
       const gchar *ui_dir;



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