summaryrefslogtreecommitdiffstats
path: root/gtk-gui.c
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2013-02-25 17:51:18 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-02-25 08:34:03 -0800
commit739ea9989c126bae5ebee303e6701561da20e094 (patch)
tree6d42527024a4ee4962115e1a04ead006f49392e0 /gtk-gui.c
parent6bc54bd5e718c4412ad0296121a2cffe62a0134f (diff)
downloadsubsurface-739ea9989c126bae5ebee303e6701561da20e094.tar.gz
gtk-gui: Check if the GTK version is lower than 2.24 for the about dialog
The about dialog URI calls are broken on Windows, therefore we needed a way to override the default URI method. On versions bellow or equal to GTK 2.24 this is possible with gtk_about_dialog_set_url_hook(), which on the other hand is deprecated for newer GTK versions. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'gtk-gui.c')
-rw-r--r--gtk-gui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk-gui.c b/gtk-gui.c
index c181b5816..d292e6db3 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -1054,8 +1054,8 @@ static void about_dialog(GtkWidget *w, gpointer data)
logo = gdk_pixbuf_from_pixdata(&subsurface_icon_pixbuf, TRUE, NULL);
}
dialog = gtk_about_dialog_new();
-#if !GTK_CHECK_VERSION(2,24,0) /* F*cking gtk */
- gtk_about_dialog_set_url_hook(about_dialog_link_cb, NULL, NULL);
+#if (GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION <= 24)
+ gtk_about_dialog_set_url_hook(about_dialog_link_cb, NULL, NULL); /* deprecated since GTK 2.24 */
#else
g_signal_connect(GTK_ABOUT_DIALOG(dialog), "activate-link", G_CALLBACK(about_dialog_link_cb), NULL);
#endif