From 6f3f0f9d3db8bfe1ad2d965a957edfa5ac0b498f Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Mon, 28 Jul 2008 00:21:45 +0200 Subject: [PATCH] Build fix for < Gtk 2.12 and Glib < 2.16 --- midori/compat.c | 7 +++++++ midori/compat.h | 4 ++++ midori/midori-browser.c | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/midori/compat.c b/midori/compat.c index 5bd73b70..a1e90621 100644 --- a/midori/compat.c +++ b/midori/compat.c @@ -95,6 +95,13 @@ gdk_pixbuf_new_from_stream (GInputStream* stream, #if !GTK_CHECK_VERSION(2, 12, 0) +void +gtk_widget_set_has_tooltip (GtkWidget* widget, + gboolean has_tooltip) +{ + /* Do nothing */ +} + void gtk_widget_set_tooltip_text (GtkWidget* widget, const gchar* text) diff --git a/midori/compat.h b/midori/compat.h index 415b6b74..5aec6163 100644 --- a/midori/compat.h +++ b/midori/compat.h @@ -35,6 +35,10 @@ gdk_pixbuf_new_from_stream (GInputStream* stream, #if !GTK_CHECK_VERSION(2, 12, 0) +void +gtk_widget_set_has_tooltip (GtkWidget* widget, + gboolean has_tooltip); + void gtk_widget_set_tooltip_text (GtkWidget* widget, const gchar* text); diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 03511b79..ed61d531 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -1843,10 +1843,10 @@ _action_source_view_activate (GtkAction* action, uri = midori_web_view_get_display_uri (MIDORI_WEB_VIEW (web_view)); contents = NULL; - tag = NULL; #if GLIB_CHECK_VERSION (2, 16, 0) file = g_file_new_for_uri (uri); + tag = NULL; #ifdef HAVE_GTKSOURCEVIEW content_type = NULL; #endif