[frogr] Do not use GTK_DIALOG_USE_HEADER_BAR if GTK+ < 3.12



commit e45217b9ec0025ff63cf38c850d667fa60cf49df
Author: Mario Sanchez Prada <msanchez gnome org>
Date:   Sun Jan 4 01:14:20 2015 +0100

    Do not use GTK_DIALOG_USE_HEADER_BAR if GTK+ < 3.12

 src/frogr-auth-dialog.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/frogr-auth-dialog.c b/src/frogr-auth-dialog.c
index 066b759..70de6b1 100644
--- a/src/frogr-auth-dialog.c
+++ b/src/frogr-auth-dialog.c
@@ -27,6 +27,13 @@
 #include <config.h>
 #include <glib/gi18n.h>
 
+#if GTK_CHECK_VERSION (3, 12, 0)
+#define AUTH_DIALOG_FLAGS (GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_USE_HEADER_BAR)
+#else
+#define AUTH_DIALOG_FLAGS (GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT)
+#endif
+
+
 /* Prototypes */
 
 static void _ask_for_authorization (GtkWindow *parent);
@@ -142,7 +149,7 @@ _ask_for_auth_confirmation (GtkWindow *parent)
   title = g_strdup_printf (_("Authorize %s"), APP_SHORTNAME);
   dialog = gtk_dialog_new_with_buttons (title,
                                         parent,
-                                        GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT | 
GTK_DIALOG_USE_HEADER_BAR,
+                                        AUTH_DIALOG_FLAGS,
                                         _("_Cancel"),
                                         GTK_RESPONSE_CANCEL,
                                         _("_Close"),


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