[gtk+/dialogs: 21/25] file chooser dialog: Use headerbar



commit b10ea48165b1391884305721b6b24fe1b09e0500
Author: William Jon McCann <william jon mccann gmail com>
Date:   Fri Jan 10 16:16:56 2014 -0500

    file chooser dialog: Use headerbar
    
    Make the file chooser dialog use a headerbar
    when desired.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=720059

 gtk/gtkfilechooserdialog.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkfilechooserdialog.c b/gtk/gtkfilechooserdialog.c
index b71c66f..84b5c1e 100644
--- a/gtk/gtkfilechooserdialog.c
+++ b/gtk/gtkfilechooserdialog.c
@@ -29,6 +29,7 @@
 #include "gtksizerequest.h"
 #include "gtktypebuiltins.h"
 #include "gtkintl.h"
+#include "gtksettings.h"
 
 #include <stdarg.h>
 
@@ -524,10 +525,15 @@ gtk_file_chooser_dialog_new_valist (const gchar          *title,
   GtkWidget *result;
   const char *button_text = first_button_text;
   gint response_id;
+  gboolean use_header;
 
+  g_object_get (gtk_settings_get_default (),
+                "gtk-dialogs-use-header", &use_header,
+                NULL);
   result = g_object_new (GTK_TYPE_FILE_CHOOSER_DIALOG,
                         "title", title,
                         "action", action,
+                         "use-header-bar", use_header,
                         NULL);
 
   if (parent)


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