[gnome-font-viewer] font-view: Show a close button instead of cancel button for the info dialog



commit e9567f301c0fd4daa031e28c9f4ed7217e9cfc0d
Author: Yosef Or Boczko <yoseforb src gnome org>
Date:   Wed Mar 26 03:24:17 2014 +0200

    font-view: Show a close button instead of cancel button for the info dialog
    
    https://bugzilla.gnome.org/show_bug.cgi?id=727065

 src/font-view.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/font-view.c b/src/font-view.c
index ecc35a9..31f6eec 100644
--- a/src/font-view.c
+++ b/src/font-view.c
@@ -474,10 +474,12 @@ info_button_clicked_cb (GtkButton *button,
 
     populate_grid (self, grid, face);
 
-    dialog = gtk_dialog_new_with_buttons ("", GTK_WINDOW (self->main_window),
-                                          GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT | 
GTK_DIALOG_USE_HEADER_BAR,
-                                          _("_Close"), GTK_RESPONSE_CLOSE,
-                                          NULL);
+    dialog = g_object_new (GTK_TYPE_DIALOG,
+                           "transient-for", self->main_window,
+                           "modal", TRUE,
+                           "destroy-with-parent", TRUE,
+                           "use-header-bar", TRUE,
+                           NULL);
     gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), grid);
     g_signal_connect (dialog, "response",
                       G_CALLBACK (gtk_widget_destroy), NULL);


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