2007-10-08 Emmanuele Bassi <ebassi@openedhand.com>

* clutter/clutter-script.c (json_parse_end):
	* clutter/json/json-object.c (json_object_get_members): Replace
	the GLib 2.14 API with the equivalent code for GLib < 2.14.

	* configure.ac: Revert the dependency bump.
This commit is contained in:
Emmanuele Bassi 2007-10-08 15:18:31 +00:00
parent adcfc6d130
commit 9e81870d0b
4 changed files with 46 additions and 10 deletions

View File

@ -1,3 +1,11 @@
2007-10-08 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script.c (json_parse_end):
* clutter/json/json-object.c (json_object_get_members): Replace
the GLib 2.14 API with the equivalent code for GLib < 2.14.
* configure.ac: Revert the dependency bump.
2007-10-08 Emmanuele Bassi <ebassi@openedhand.com>
Initial implementation of the UI definition files. (#424)

View File

@ -542,22 +542,25 @@ clutter_script_construct_object (ClutterScript *script,
return oinfo->object;
}
static void
for_each_object (gpointer key,
gpointer value,
gpointer data)
{
ClutterScript *script = data;
ObjectInfo *oinfo = value;
clutter_script_construct_object (script, oinfo);
}
static void
json_parse_end (JsonParser *parser,
gpointer user_data)
{
ClutterScript *script = user_data;
ClutterScriptPrivate *priv = script->priv;
GList *objects, *l;
objects = g_hash_table_get_values (priv->objects);
for (l = objects; l; l = l->next)
{
ObjectInfo *oinfo = l->data;
oinfo->object = clutter_script_construct_object (script, oinfo);
}
g_list_free (objects);
g_hash_table_foreach (priv->objects, for_each_object, script);
}
static void

View File

@ -158,6 +158,31 @@ json_object_add_member (JsonObject *object,
g_hash_table_replace (object->members, g_strdup (member_name), node);
}
#if GLIB_MAJOR_VERSION >= 2 && GLIB_MAJOR_VERSION < 14
static void
get_keys (gpointer key,
gpointer value,
gpointer data)
{
GList **list = data;
*list = g_list_prepend (*list, key);
}
static GList *
g_hash_table_get_keys (GHashTable *hash_table)
{
GList *retval;
g_return_val_if_fail (hash_table != NULL, NULL);
retval = NULL;
g_hash_table_foreach (hash_table, get_keys, &retval);
return g_list_reverse (retval);
}
#endif
/**
* json_object_get_members:
* @object: a #JsonObject

View File

@ -273,7 +273,7 @@ AC_SUBST([clutterbackendlib])
dnl ========================================================================
pkg_modules="pangoft2 glib-2.0 >= 2.14 gobject-2.0 gthread-2.0 gdk-pixbuf-2.0 $BACKEND_PC_FILES"
pkg_modules="pangoft2 glib-2.0 >= 2.12 gobject-2.0 gthread-2.0 gdk-pixbuf-2.0 $BACKEND_PC_FILES"
PKG_CHECK_MODULES(CLUTTER_DEPS, [$pkg_modules])
dnl ========================================================================