From 155d8dec3ff6e7b009de4956acc739ac2c61e6f7 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 13 Mar 2011 09:52:40 +0000 Subject: gtk_dialog_set_has_separator is deprecated in GTK >= 2.21.8 svn path=/trunk/netsurf/; revision=12009 --- gtk/compat.c | 9 +++++++++ gtk/compat.h | 1 + gtk/dialogs/about.c | 3 ++- 3 files changed, 12 insertions(+), 1 deletion(-) (limited to 'gtk') diff --git a/gtk/compat.c b/gtk/compat.c index 822459474..2361dc201 100644 --- a/gtk/compat.c +++ b/gtk/compat.c @@ -88,3 +88,12 @@ GtkStateType nsgtk_widget_get_state(GtkWidget *widget) #endif } +void nsgtk_dialog_set_has_separator(GtkDialog *dialog, gboolean setting) +{ + #if GTK_CHECK_VERSION(2,21,8) + /* Deprecated */ + #else + gtk_dialog_set_has_separator(dialog, setting); + #endif +} + diff --git a/gtk/compat.h b/gtk/compat.h index 489fa7ea1..1bd18a0d6 100644 --- a/gtk/compat.h +++ b/gtk/compat.h @@ -32,5 +32,6 @@ gboolean nsgtk_widget_get_realized(GtkWidget *widget); gboolean nsgtk_widget_get_mapped(GtkWidget *widget); gboolean nsgtk_widget_is_drawable(GtkWidget *widget); GtkStateType nsgtk_widget_get_state(GtkWidget *widget); +void nsgtk_dialog_set_has_separator(GtkDialog *dialog, gboolean setting); #endif /* NETSURF_GTK_COMPAT_H */ diff --git a/gtk/dialogs/about.c b/gtk/dialogs/about.c index e3886e973..f29592c97 100644 --- a/gtk/dialogs/about.c +++ b/gtk/dialogs/about.c @@ -16,6 +16,7 @@ * along with this program. If not, see . */ +#include "gtk/compat.h" #include "gtk/gui.h" #include "gtk/dialogs/about.h" #include "desktop/browser.h" @@ -94,7 +95,7 @@ void nsgtk_about_dialog_init(GtkWindow *parent, gtk_box_pack_start(GTK_BOX (vbox), label, FALSE, FALSE, 0); - gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE); + nsgtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE); /* Add the credits button */ button = gtk_button_new_from_stock ("Credits"); -- cgit v1.2.3