]> spindle.queued.net Git - midori/commitdiff
Use HAVE_GIO instead of a full-blown version check
authorChristian Dywan <christian@twotoasts.de>
Fri, 22 Aug 2008 02:01:41 +0000 (04:01 +0200)
committerChristian Dywan <christian@twotoasts.de>
Fri, 22 Aug 2008 02:01:41 +0000 (04:01 +0200)
midori/midori-browser.c
midori/midori-webview.c

index a182774e9404fb03d36209d6d445de5e699b1df4..dd6d570e408b46ea248c07d29002677beaf9bbe2 100644 (file)
@@ -28,7 +28,7 @@
 #include "compat.h"
 #include "gjs.h"
 
-#if GLIB_CHECK_VERSION (2, 16, 0)
+#ifdef HAVE_GIO
 #include <gio/gio.h>
 #endif
 #include <glib/gi18n.h>
index b80561e8e06817b20428a8005f1c7d4718bd9438..faf45855b76a43f4e123c6f82bad91dc97337d76 100644 (file)
@@ -9,6 +9,10 @@
  See the file COPYING for the full license text.
 */
 
+#if HAVE_CONFIG_H
+    #include <config.h>
+#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 <gio/gio.h>
 #endif
 #include <webkit/webkit.h>
@@ -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");