Use HAVE_GIO instead of a full-blown version check

This commit is contained in:
Christian Dywan 2008-08-22 04:01:41 +02:00
parent c375f862a0
commit 0fa0e9c342
2 changed files with 11 additions and 7 deletions

View file

@ -28,7 +28,7 @@
#include "compat.h" #include "compat.h"
#include "gjs.h" #include "gjs.h"
#if GLIB_CHECK_VERSION (2, 16, 0) #ifdef HAVE_GIO
#include <gio/gio.h> #include <gio/gio.h>
#endif #endif
#include <glib/gi18n.h> #include <glib/gi18n.h>

View file

@ -9,6 +9,10 @@
See the file COPYING for the full license text. See the file COPYING for the full license text.
*/ */
#if HAVE_CONFIG_H
#include <config.h>
#endif
#include "midori-webview.h" #include "midori-webview.h"
#include "main.h" #include "main.h"
@ -16,7 +20,7 @@
#include "sokoke.h" #include "sokoke.h"
#include "compat.h" #include "compat.h"
#if GLIB_CHECK_VERSION (2, 16, 0) #ifdef HAVE_GIO
#include <gio/gio.h> #include <gio/gio.h>
#endif #endif
#include <webkit/webkit.h> #include <webkit/webkit.h>
@ -290,7 +294,7 @@ webkit_web_view_window_object_cleared_cb (MidoriWebView* web_view,
web_view->window_object_cleared = TRUE; web_view->window_object_cleared = TRUE;
} }
#if GLIB_CHECK_VERSION (2, 16, 0) #ifdef HAVE_GIO
void void
loadable_icon_finish_cb (GdkPixbuf* icon, loadable_icon_finish_cb (GdkPixbuf* icon,
GAsyncResult* res, GAsyncResult* res,
@ -376,7 +380,7 @@ file_info_finish_cb (GFile* icon_file,
static void static void
_midori_web_view_load_icon (MidoriWebView* web_view) _midori_web_view_load_icon (MidoriWebView* web_view)
{ {
#if GLIB_CHECK_VERSION (2, 16, 0) #ifdef HAVE_GIO
GFile* file; GFile* file;
GFile* icon_file; GFile* icon_file;
#endif #endif
@ -384,7 +388,7 @@ _midori_web_view_load_icon (MidoriWebView* web_view)
gint icon_width, icon_height; gint icon_width, icon_height;
GdkPixbuf* pixbuf_scaled; GdkPixbuf* pixbuf_scaled;
#if GLIB_CHECK_VERSION (2, 16, 0) #ifdef HAVE_GIO
if (web_view->uri) if (web_view->uri)
{ {
file = g_file_new_for_uri (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* type;
const gchar* rel; const gchar* rel;
#if GLIB_CHECK_VERSION (2, 16, 0) #ifdef HAVE_GIO
GFile* icon_file; GFile* icon_file;
GIcon* icon; GIcon* icon;
#endif #endif
@ -490,7 +494,7 @@ gjs_value_links_foreach_cb (GjsValue* link,
? gjs_value_get_attribute_string (link, "title") : NULL); ? 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")) if (gjs_value_has_attribute (link, "rel"))
{ {
rel = gjs_value_get_attribute_string (link, "rel"); rel = gjs_value_get_attribute_string (link, "rel");