From b6ae63249b14d6501dd46466c7f15f10882f31f2 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Thu, 28 Aug 2008 01:15:30 +0200 Subject: [PATCH] Use HAVE_GIO *everywhere* now --- midori/compat.c | 4 ++-- midori/compat.h | 8 ++++++-- midori/gtkiconentry.c | 14 +++++++------- midori/gtkiconentry.h | 9 ++++++--- 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/midori/compat.c b/midori/compat.c index a1e90621..7a871ad1 100644 --- a/midori/compat.c +++ b/midori/compat.c @@ -13,7 +13,7 @@ #if !GTK_CHECK_VERSION(2, 14, 0) -#if GLIB_CHECK_VERSION(2, 16, 0) +#if HAVE_GIO /* GTK+/ GdkPixbuf internal helper function Copyright (C) 2008 Matthias Clasen @@ -120,7 +120,7 @@ gtk_tool_item_set_tooltip_text (GtkToolItem* toolitem, { static GtkTooltips* tooltips = NULL; if (G_UNLIKELY (!tooltips)) - tooltips = gtk_tooltips_new(); + tooltips = gtk_tooltips_new (); gtk_tool_item_set_tooltip (toolitem, tooltips, text, NULL); } diff --git a/midori/compat.h b/midori/compat.h index 5aec6163..a3c6d5c1 100644 --- a/midori/compat.h +++ b/midori/compat.h @@ -12,8 +12,12 @@ #ifndef __COMPAT_H__ #define __COMPAT_H__ +#if HAVE_CONFIG_H + #include +#endif + #include -#if GLIB_CHECK_VERSION(2, 16, 0) +#if HAVE_GIO #include #endif #include @@ -22,7 +26,7 @@ G_BEGIN_DECLS #if !GTK_CHECK_VERSION(2, 14, 0) -#if GLIB_CHECK_VERSION(2,16, 0) +#if HAVE_GIO GdkPixbuf* gdk_pixbuf_new_from_stream (GInputStream* stream, diff --git a/midori/gtkiconentry.c b/midori/gtkiconentry.c index 6faa9845..33d4308f 100644 --- a/midori/gtkiconentry.c +++ b/midori/gtkiconentry.c @@ -61,7 +61,7 @@ typedef struct GdkCursorType cursor_type; gboolean custom_cursor; GtkImageType storage_type; - #if GLIB_CHECK_VERSION (2, 16, 0) + #if HAVE_GIO GIcon *gicon; #endif gchar *icon_name; @@ -274,7 +274,7 @@ gtk_icon_entry_class_init (GtkIconEntryClass *klass) NULL, GTK_PARAM_WRITABLE)); - #if GLIB_CHECK_VERSION (2, 16, 0) + #if HAVE_GIO g_object_class_install_property (gobject_class, PROP_GICON_PRIMARY, g_param_spec_object ("gicon-primary", @@ -433,7 +433,7 @@ gtk_icon_entry_set_property (GObject *object, g_value_get_string (value)); break; - #if GLIB_CHECK_VERSION (2, 16, 0) + #if HAVE_GIO case PROP_GICON_PRIMARY: gtk_icon_entry_set_icon_from_gicon (entry, GTK_ICON_ENTRY_PRIMARY, @@ -471,7 +471,7 @@ gtk_icon_entry_get_property (GObject *object, GTK_ICON_ENTRY_SECONDARY)); break; - #if GLIB_CHECK_VERSION (2, 16, 0) + #if HAVE_GIO case PROP_GICON_PRIMARY: g_value_set_object (value, gtk_icon_entry_get_gicon (entry, @@ -1104,7 +1104,7 @@ icon_theme_changed (GtkIconEntry *entry) gtk_icon_entry_set_icon_from_icon_name (entry, i, priv->icons[i].icon_name); } - #if GLIB_CHECK_VERSION (2, 16, 0) + #if HAVE_GIO else if (priv->icons[i].storage_type == _GTK_IMAGE_GICON) { g_object_unref (priv->icons[i].pixbuf); @@ -1339,7 +1339,7 @@ gtk_icon_entry_set_icon_from_icon_name (GtkIconEntry *entry, * appropriately. */ -#if GLIB_CHECK_VERSION (2, 16, 0) +#if HAVE_GIO void gtk_icon_entry_set_icon_from_gicon (const GtkIconEntry *entry, GtkIconEntryPosition icon_pos, @@ -1493,7 +1493,7 @@ gtk_icon_entry_get_pixbuf (const GtkIconEntry *entry, */ -#if GLIB_CHECK_VERSION (2, 16, 0) +#if HAVE_GIO GIcon * gtk_icon_entry_get_gicon (const GtkIconEntry *entry, GtkIconEntryPosition icon_pos) diff --git a/midori/gtkiconentry.h b/midori/gtkiconentry.h index 314eccb6..c7fe063b 100644 --- a/midori/gtkiconentry.h +++ b/midori/gtkiconentry.h @@ -21,9 +21,12 @@ #ifndef __GTK_ICON_ENTRY_H__ #define __GTK_ICON_ENTRY_H__ +#if HAVE_CONFIG_H + #include +#endif #include -#if GLIB_CHECK_VERSION (2, 16, 0) +#if HAVE_GIO #include #endif #include @@ -83,14 +86,14 @@ void gtk_icon_entry_set_icon_from_icon_name (GtkIconEntry *entry, GtkIconEntryPosition icon_pos, const gchar *icon_name); -#if GLIB_CHECK_VERSION (2, 16, 0) +#if HAVE_GIO void gtk_icon_entry_set_icon_from_gicon (const GtkIconEntry *entry, GtkIconEntryPosition icon_pos, GIcon *icon); #endif GdkPixbuf* gtk_icon_entry_get_pixbuf (const GtkIconEntry *entry, GtkIconEntryPosition icon_pos); -#if GLIB_CHECK_VERSION (2, 16, 0) +#if HAVE_GIO GIcon* gtk_icon_entry_get_gicon (const GtkIconEntry *entry, GtkIconEntryPosition icon_pos); #endif