From 0fa0e9c342c523130d79b6420a8635dc75f3afa4 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Fri, 22 Aug 2008 04:01:41 +0200 Subject: [PATCH] Use HAVE_GIO instead of a full-blown version check --- midori/midori-browser.c | 2 +- midori/midori-webview.c | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index a182774e..dd6d570e 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -28,7 +28,7 @@ #include "compat.h" #include "gjs.h" -#if GLIB_CHECK_VERSION (2, 16, 0) +#ifdef HAVE_GIO #include #endif #include diff --git a/midori/midori-webview.c b/midori/midori-webview.c index b80561e8..faf45855 100644 --- a/midori/midori-webview.c +++ b/midori/midori-webview.c @@ -9,6 +9,10 @@ See the file COPYING for the full license text. */ +#if HAVE_CONFIG_H + #include +#endif + #include "midori-webview.h" #include "main.h" @@ -16,7 +20,7 @@ #include "sokoke.h" #include "compat.h" -#if GLIB_CHECK_VERSION (2, 16, 0) +#ifdef HAVE_GIO #include #endif #include @@ -290,7 +294,7 @@ webkit_web_view_window_object_cleared_cb (MidoriWebView* web_view, web_view->window_object_cleared = TRUE; } -#if GLIB_CHECK_VERSION (2, 16, 0) +#ifdef HAVE_GIO void loadable_icon_finish_cb (GdkPixbuf* icon, GAsyncResult* res, @@ -376,7 +380,7 @@ file_info_finish_cb (GFile* icon_file, static void _midori_web_view_load_icon (MidoriWebView* web_view) { - #if GLIB_CHECK_VERSION (2, 16, 0) + #ifdef HAVE_GIO GFile* file; GFile* icon_file; #endif @@ -384,7 +388,7 @@ _midori_web_view_load_icon (MidoriWebView* web_view) gint icon_width, icon_height; GdkPixbuf* pixbuf_scaled; - #if GLIB_CHECK_VERSION (2, 16, 0) + #ifdef HAVE_GIO if (web_view->uri) { file = g_file_new_for_uri (web_view->uri); @@ -469,7 +473,7 @@ gjs_value_links_foreach_cb (GjsValue* link, { const gchar* type; const gchar* rel; -#if GLIB_CHECK_VERSION (2, 16, 0) +#ifdef HAVE_GIO GFile* icon_file; GIcon* icon; #endif @@ -490,7 +494,7 @@ gjs_value_links_foreach_cb (GjsValue* link, ? gjs_value_get_attribute_string (link, "title") : NULL); } } -#if GLIB_CHECK_VERSION (2, 16, 0) +#ifdef HAVE_GIO if (gjs_value_has_attribute (link, "rel")) { rel = gjs_value_get_attribute_string (link, "rel");