[gedit/wip/merge-encoding-settings: 26/26] EncodingsDialog: replace OK + Cancel -> Close button



commit 8d7d13458614ff68a811b35d7813edec22e84fb7
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Apr 4 16:19:14 2015 +0200

    EncodingsDialog: replace OK + Cancel -> Close button
    
    Instant apply for preferences is recommended by the HIG. Moreover,
    having both Reset and Cancel was weird: does the Cancel button cancels
    the Reset? Should the Cancel button be insensitive when there was
    nothing to cancel (e.g. just after a reset)? There were many
    possibilities.
    
    Now with only the Close button it's much simpler.

 gedit/gedit-encodings-dialog.c               |    2 +-
 gedit/resources/ui/gedit-encodings-dialog.ui |   21 ++-------------------
 2 files changed, 3 insertions(+), 20 deletions(-)
---
diff --git a/gedit/gedit-encodings-dialog.c b/gedit/gedit-encodings-dialog.c
index 92d59ab..0e24c12 100644
--- a/gedit/gedit-encodings-dialog.c
+++ b/gedit/gedit-encodings-dialog.c
@@ -146,7 +146,7 @@ gedit_encodings_dialog_response (GtkDialog *gtk_dialog,
                                     "gedit",
                                     NULL);
        }
-       else if (response_id == GTK_RESPONSE_OK &&
+       else if (response_id == GTK_RESPONSE_CLOSE &&
                 dialog->priv->modified)
        {
                GSList *enc_list;
diff --git a/gedit/resources/ui/gedit-encodings-dialog.ui b/gedit/resources/ui/gedit-encodings-dialog.ui
index 9211d20..6aaa105 100644
--- a/gedit/resources/ui/gedit-encodings-dialog.ui
+++ b/gedit/resources/ui/gedit-encodings-dialog.ui
@@ -63,7 +63,7 @@
             </child>
             <child>
               <object class="GtkButton" id="close_button">
-                <property name="label" translatable="yes">_Cancel</property>
+                <property name="label" translatable="yes">_Close</property>
                 <property name="use_action_appearance">False</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
@@ -77,22 +77,6 @@
                 <property name="position">1</property>
               </packing>
             </child>
-            <child>
-              <object class="GtkButton" id="ok_button">
-                <property name="label" translatable="yes">_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">False</property>
-                <property name="use_underline">True</property>
-              </object>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">True</property>
-                <property name="position">2</property>
-              </packing>
-            </child>
           </object>
           <packing>
             <property name="expand">False</property>
@@ -337,8 +321,7 @@
     </child>
     <action-widgets>
       <action-widget response="-11">help_button</action-widget>
-      <action-widget response="-6">close_button</action-widget>
-      <action-widget response="-5">ok_button</action-widget>
+      <action-widget response="-7">close_button</action-widget>
     </action-widgets>
   </template>
 </interface>


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