Add #ifdefs around GFile to allow building with Glib < 2.16

This commit is contained in:
Przemysław Sitek 2008-08-06 20:22:45 +02:00 committed by Christian Dywan
parent a41a0e008e
commit 8ff2856bf6

View file

@ -469,8 +469,10 @@ 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)
GFile* icon_file; GFile* icon_file;
GIcon* icon; GIcon* icon;
#endif
if (gjs_value_is_object (link) && gjs_value_has_attribute (link, "href")) if (gjs_value_is_object (link) && gjs_value_has_attribute (link, "href"))
{ {
@ -488,6 +490,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)
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");
@ -500,6 +503,7 @@ gjs_value_links_foreach_cb (GjsValue* link,
0, NULL, (GAsyncReadyCallback)loadable_icon_finish_cb, web_view); 0, NULL, (GAsyncReadyCallback)loadable_icon_finish_cb, web_view);
} }
} }
#endif
} }
} }