]> spindle.queued.net Git - midori/commitdiff
Use HAVE_GIO *everywhere* now
authorChristian Dywan <christian@twotoasts.de>
Wed, 27 Aug 2008 23:15:30 +0000 (01:15 +0200)
committerChristian Dywan <christian@twotoasts.de>
Wed, 27 Aug 2008 23:15:30 +0000 (01:15 +0200)
midori/compat.c
midori/compat.h
midori/gtkiconentry.c
midori/gtkiconentry.h

index a1e90621a73d39e356bdf8fc7e16f1b7ac5c9032..7a871ad18caedcd4beaf96b8d52d07e371c4f940 100644 (file)
@@ -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 <mclasen@redhat.com>
@@ -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);
     }
index 5aec6163ab1e684eec47e05581ac97561b0d0edd..a3c6d5c122f0e630f23274c825d0f8f8610f95ff 100644 (file)
 #ifndef __COMPAT_H__
 #define __COMPAT_H__
 
+#if HAVE_CONFIG_H
+    #include <config.h>
+#endif
+
 #include <glib.h>
-#if GLIB_CHECK_VERSION(2, 16, 0)
+#if HAVE_GIO
 #include <gio/gio.h>
 #endif
 #include <webkit/webkit.h>
@@ -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,
index 6faa98455a749b24a8358633aac8890b536c8c03..33d4308f0e5293d9666acc789adfcca3a92712d8 100644 (file)
@@ -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)
index 314eccb6f82f1b84bc3f45d155e731487210bc48..c7fe063baa18729142a12355fc1320dc9cf697a6 100644 (file)
 #ifndef __GTK_ICON_ENTRY_H__
 #define __GTK_ICON_ENTRY_H__
 
+#if HAVE_CONFIG_H
+    #include <config.h>
+#endif
 
 #include <glib.h>
-#if GLIB_CHECK_VERSION (2, 16, 0)
+#if HAVE_GIO
 #include <gio/gio.h>
 #endif
 #include <gtk/gtk.h>
@@ -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