[almanah] UI: Removed preferences dialog "Close" button



commit 1ba42c6862350e61342b4c9fbba2d23381be7163
Author: Álvaro Peña <alvaropg gmail com>
Date:   Mon Jun 15 13:21:23 2015 +0200

    UI: Removed preferences dialog "Close" button
    
    Following the HIG recommendations, the "close" button is not
    required in the preferences dialog, instead, we are going to use a
    HeaderBar (with a close button)
    
    See https://bugzilla.gnome.org/show_bug.cgi?id=750987

 src/preferences-dialog.c |    8 --------
 src/ui/almanah.ui        |   16 +---------------
 2 files changed, 1 insertions(+), 23 deletions(-)
---
diff --git a/src/preferences-dialog.c b/src/preferences-dialog.c
index 1165e61..a3903a3 100644
--- a/src/preferences-dialog.c
+++ b/src/preferences-dialog.c
@@ -37,7 +37,6 @@ static void set_property (GObject *object, guint property_id, const GValue *valu
 static void almanah_preferences_dialog_dispose (GObject *object);
 static void pd_key_combo_changed_cb (GtkComboBox *combo_box, AlmanahPreferencesDialog *preferences_dialog);
 static void pd_new_key_button_clicked_cb (GtkButton *button, AlmanahPreferencesDialog *preferences_dialog);
-static void pd_response_cb (GtkDialog *dialog, gint response_id, AlmanahPreferencesDialog 
*preferences_dialog);
 
 struct _AlmanahPreferencesDialogPrivate {
        GSettings *settings;
@@ -80,7 +79,6 @@ almanah_preferences_dialog_init (AlmanahPreferencesDialog *self)
 {
        self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, ALMANAH_TYPE_PREFERENCES_DIALOG, 
AlmanahPreferencesDialogPrivate);
 
-       g_signal_connect (self, "response", G_CALLBACK (pd_response_cb), self);
        gtk_window_set_modal (GTK_WINDOW (self), FALSE);
        gtk_window_set_title (GTK_WINDOW (self), _("Almanah Preferences"));
        gtk_widget_set_size_request (GTK_WIDGET (self), 400, -1);
@@ -288,9 +286,3 @@ pd_new_key_button_clicked_cb (GtkButton *button, AlmanahPreferencesDialog *prefe
                g_error_free (error);
        }
 }
-
-static void
-pd_response_cb (GtkDialog *dialog, gint response_id, AlmanahPreferencesDialog *preferences_dialog)
-{
-       gtk_widget_hide (GTK_WIDGET (dialog));
-}
diff --git a/src/ui/almanah.ui b/src/ui/almanah.ui
index 2b4c6cf..f8d8317 100644
--- a/src/ui/almanah.ui
+++ b/src/ui/almanah.ui
@@ -462,6 +462,7 @@
        </object>
 
        <object class="AlmanahPreferencesDialog" id="almanah_preferences_dialog">
+               <property name="use-header-bar">1</property>
                <property name="border-width">5</property>
                <child internal-child="vbox">
                        <object class="GtkVBox" id="vbox4">
@@ -479,23 +480,8 @@
                                                <property name="expand">False</property>
                                        </packing>
                                </child>
-                               <child internal-child="action_area">
-                                       <object class="GtkHButtonBox" id="hbuttonbox2">
-                                               <child>
-                                                       <object class="GtkButton" 
id="almanah_pd_close_button">
-                                                               <property name="use-stock">True</property>
-                                                               <property name="label">gtk-close</property>
-                                                               <property name="can-default">True</property>
-                                                               <property name="has-default">True</property>
-                                                       </object>
-                                               </child>
-                                       </object>
-                               </child>
                        </object>
                </child>
-               <action-widgets>
-                       <action-widget response="-7">almanah_pd_close_button</action-widget><!-- 
GTK_RESPONSE_CLOSE -->
-               </action-widgets>
        </object>
 
        <object class="AlmanahDateEntryDialog" id="almanah_date_entry_dialog">


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