summaryrefslogtreecommitdiff
path: root/ufo
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2014-11-25 14:11:41 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2014-11-25 14:12:26 +0100
commit85be9c75dbadaf2b94982c86a639004caff186f8 (patch)
treeb29614d0c038d4cc586928054a4b47b9c6fd2646 /ufo
parent859c047f2b2e64f470dc41fd6fd3386a04160b4d (diff)
Fix #66: use GValueArray for remote list
Diffstat (limited to 'ufo')
-rw-r--r--ufo/ufo-arch-graph.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/ufo/ufo-arch-graph.c b/ufo/ufo-arch-graph.c
index de1ef0d..5dbfbd6 100644
--- a/ufo/ufo-arch-graph.c
+++ b/ufo/ufo-arch-graph.c
@@ -276,7 +276,7 @@ ufo_arch_graph_set_property (GObject *object,
case PROP_REMOTES:
{
- GArray *array;
+ GValueArray *array;
g_assert (priv->remotes == NULL);
array = g_value_get_boxed (value);
@@ -284,9 +284,10 @@ ufo_arch_graph_set_property (GObject *object,
if (array != NULL) {
g_list_free (priv->remotes);
- for (guint i = 0; i < array->len; i++)
+ for (guint i = 0; i < array->n_values; i++) {
priv->remotes = g_list_append (priv->remotes,
- g_strdup (&g_array_index (array, const gchar, i)));
+ g_strdup (g_value_get_string (&array->values[i])));
+ }
}
}
break;
@@ -380,11 +381,15 @@ ufo_arch_graph_class_init (UfoArchGraphClass *klass)
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE);
properties[PROP_REMOTES] =
- g_param_spec_boxed ("remotes",
- "List with remote addresses",
- "List with remote addresses",
- G_TYPE_ARRAY,
- G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE);
+ g_param_spec_value_array ("remotes",
+ "List with remote addresses",
+ "List with remote addresses",
+ g_param_spec_string ("remote",
+ "Remote address",
+ "Remote address",
+ "tcp://127.0.0.1:5554",
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READABLE),
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE);
g_object_class_install_property (oclass, PROP_RESOURCES, properties[PROP_RESOURCES]);
g_object_class_install_property (oclass, PROP_REMOTES, properties[PROP_REMOTES]);