Use HAVE_GIO *everywhere* now
This commit is contained in:
parent
be4038e555
commit
b6ae63249b
4 changed files with 21 additions and 14 deletions
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
#if !GTK_CHECK_VERSION(2, 14, 0)
|
#if !GTK_CHECK_VERSION(2, 14, 0)
|
||||||
|
|
||||||
#if GLIB_CHECK_VERSION(2, 16, 0)
|
#if HAVE_GIO
|
||||||
|
|
||||||
/* GTK+/ GdkPixbuf internal helper function
|
/* GTK+/ GdkPixbuf internal helper function
|
||||||
Copyright (C) 2008 Matthias Clasen <mclasen@redhat.com>
|
Copyright (C) 2008 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
@ -120,7 +120,7 @@ gtk_tool_item_set_tooltip_text (GtkToolItem* toolitem,
|
||||||
{
|
{
|
||||||
static GtkTooltips* tooltips = NULL;
|
static GtkTooltips* tooltips = NULL;
|
||||||
if (G_UNLIKELY (!tooltips))
|
if (G_UNLIKELY (!tooltips))
|
||||||
tooltips = gtk_tooltips_new();
|
tooltips = gtk_tooltips_new ();
|
||||||
|
|
||||||
gtk_tool_item_set_tooltip (toolitem, tooltips, text, NULL);
|
gtk_tool_item_set_tooltip (toolitem, tooltips, text, NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,12 @@
|
||||||
#ifndef __COMPAT_H__
|
#ifndef __COMPAT_H__
|
||||||
#define __COMPAT_H__
|
#define __COMPAT_H__
|
||||||
|
|
||||||
|
#if HAVE_CONFIG_H
|
||||||
|
#include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#if GLIB_CHECK_VERSION(2, 16, 0)
|
#if HAVE_GIO
|
||||||
#include <gio/gio.h>
|
#include <gio/gio.h>
|
||||||
#endif
|
#endif
|
||||||
#include <webkit/webkit.h>
|
#include <webkit/webkit.h>
|
||||||
|
@ -22,7 +26,7 @@ G_BEGIN_DECLS
|
||||||
|
|
||||||
#if !GTK_CHECK_VERSION(2, 14, 0)
|
#if !GTK_CHECK_VERSION(2, 14, 0)
|
||||||
|
|
||||||
#if GLIB_CHECK_VERSION(2,16, 0)
|
#if HAVE_GIO
|
||||||
|
|
||||||
GdkPixbuf*
|
GdkPixbuf*
|
||||||
gdk_pixbuf_new_from_stream (GInputStream* stream,
|
gdk_pixbuf_new_from_stream (GInputStream* stream,
|
||||||
|
|
|
@ -61,7 +61,7 @@ typedef struct
|
||||||
GdkCursorType cursor_type;
|
GdkCursorType cursor_type;
|
||||||
gboolean custom_cursor;
|
gboolean custom_cursor;
|
||||||
GtkImageType storage_type;
|
GtkImageType storage_type;
|
||||||
#if GLIB_CHECK_VERSION (2, 16, 0)
|
#if HAVE_GIO
|
||||||
GIcon *gicon;
|
GIcon *gicon;
|
||||||
#endif
|
#endif
|
||||||
gchar *icon_name;
|
gchar *icon_name;
|
||||||
|
@ -274,7 +274,7 @@ gtk_icon_entry_class_init (GtkIconEntryClass *klass)
|
||||||
NULL,
|
NULL,
|
||||||
GTK_PARAM_WRITABLE));
|
GTK_PARAM_WRITABLE));
|
||||||
|
|
||||||
#if GLIB_CHECK_VERSION (2, 16, 0)
|
#if HAVE_GIO
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
PROP_GICON_PRIMARY,
|
PROP_GICON_PRIMARY,
|
||||||
g_param_spec_object ("gicon-primary",
|
g_param_spec_object ("gicon-primary",
|
||||||
|
@ -433,7 +433,7 @@ gtk_icon_entry_set_property (GObject *object,
|
||||||
g_value_get_string (value));
|
g_value_get_string (value));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#if GLIB_CHECK_VERSION (2, 16, 0)
|
#if HAVE_GIO
|
||||||
case PROP_GICON_PRIMARY:
|
case PROP_GICON_PRIMARY:
|
||||||
gtk_icon_entry_set_icon_from_gicon (entry,
|
gtk_icon_entry_set_icon_from_gicon (entry,
|
||||||
GTK_ICON_ENTRY_PRIMARY,
|
GTK_ICON_ENTRY_PRIMARY,
|
||||||
|
@ -471,7 +471,7 @@ gtk_icon_entry_get_property (GObject *object,
|
||||||
GTK_ICON_ENTRY_SECONDARY));
|
GTK_ICON_ENTRY_SECONDARY));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#if GLIB_CHECK_VERSION (2, 16, 0)
|
#if HAVE_GIO
|
||||||
case PROP_GICON_PRIMARY:
|
case PROP_GICON_PRIMARY:
|
||||||
g_value_set_object (value,
|
g_value_set_object (value,
|
||||||
gtk_icon_entry_get_gicon (entry,
|
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);
|
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)
|
else if (priv->icons[i].storage_type == _GTK_IMAGE_GICON)
|
||||||
{
|
{
|
||||||
g_object_unref (priv->icons[i].pixbuf);
|
g_object_unref (priv->icons[i].pixbuf);
|
||||||
|
@ -1339,7 +1339,7 @@ gtk_icon_entry_set_icon_from_icon_name (GtkIconEntry *entry,
|
||||||
* appropriately.
|
* appropriately.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if GLIB_CHECK_VERSION (2, 16, 0)
|
#if HAVE_GIO
|
||||||
void
|
void
|
||||||
gtk_icon_entry_set_icon_from_gicon (const GtkIconEntry *entry,
|
gtk_icon_entry_set_icon_from_gicon (const GtkIconEntry *entry,
|
||||||
GtkIconEntryPosition icon_pos,
|
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 *
|
GIcon *
|
||||||
gtk_icon_entry_get_gicon (const GtkIconEntry *entry,
|
gtk_icon_entry_get_gicon (const GtkIconEntry *entry,
|
||||||
GtkIconEntryPosition icon_pos)
|
GtkIconEntryPosition icon_pos)
|
||||||
|
|
|
@ -21,9 +21,12 @@
|
||||||
#ifndef __GTK_ICON_ENTRY_H__
|
#ifndef __GTK_ICON_ENTRY_H__
|
||||||
#define __GTK_ICON_ENTRY_H__
|
#define __GTK_ICON_ENTRY_H__
|
||||||
|
|
||||||
|
#if HAVE_CONFIG_H
|
||||||
|
#include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#if GLIB_CHECK_VERSION (2, 16, 0)
|
#if HAVE_GIO
|
||||||
#include <gio/gio.h>
|
#include <gio/gio.h>
|
||||||
#endif
|
#endif
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
@ -83,14 +86,14 @@ void gtk_icon_entry_set_icon_from_icon_name (GtkIconEntry *entry,
|
||||||
GtkIconEntryPosition icon_pos,
|
GtkIconEntryPosition icon_pos,
|
||||||
const gchar *icon_name);
|
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,
|
void gtk_icon_entry_set_icon_from_gicon (const GtkIconEntry *entry,
|
||||||
GtkIconEntryPosition icon_pos,
|
GtkIconEntryPosition icon_pos,
|
||||||
GIcon *icon);
|
GIcon *icon);
|
||||||
#endif
|
#endif
|
||||||
GdkPixbuf* gtk_icon_entry_get_pixbuf (const GtkIconEntry *entry,
|
GdkPixbuf* gtk_icon_entry_get_pixbuf (const GtkIconEntry *entry,
|
||||||
GtkIconEntryPosition icon_pos);
|
GtkIconEntryPosition icon_pos);
|
||||||
#if GLIB_CHECK_VERSION (2, 16, 0)
|
#if HAVE_GIO
|
||||||
GIcon* gtk_icon_entry_get_gicon (const GtkIconEntry *entry,
|
GIcon* gtk_icon_entry_get_gicon (const GtkIconEntry *entry,
|
||||||
GtkIconEntryPosition icon_pos);
|
GtkIconEntryPosition icon_pos);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue