[gtk+/dialogs: 22/25] recent chooser dialog: Use headerbar



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

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

 gtk/gtkrecentchooserdialog.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkrecentchooserdialog.c b/gtk/gtkrecentchooserdialog.c
index 9730965..9adc857 100644
--- a/gtk/gtkrecentchooserdialog.c
+++ b/gtk/gtkrecentchooserdialog.c
@@ -23,6 +23,7 @@
 #include "gtkrecentchooserutils.h"
 #include "gtkrecentmanager.h"
 #include "gtktypebuiltins.h"
+#include "gtksettings.h"
 
 #include <stdarg.h>
 
@@ -274,8 +275,13 @@ gtk_recent_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_RECENT_CHOOSER_DIALOG,
+                         "use-header-bar", use_header,
                          "title", title,
                          "recent-manager", manager,
                          NULL);


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