summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlban Crequy <alban.crequy@collabora.co.uk>2011-12-16 16:15:09 +0000
committerAlban Crequy <alban.crequy@collabora.co.uk>2011-12-16 16:19:48 +0000
commit8a1a8d94d40d731a8045d4fb2a67a65484a7983c (patch)
tree8e1a20e9ed110b0c17f3a7054d29f9471f50b301
parent9e38356210772956d1d05e5eed2e485df962ceee (diff)
wocky_data_form_set_type: add default value and raw content
They are needed for wocky_caps_hash_compute_from_lists(). https://bugs.freedesktop.org/show_bug.cgi?id=43891
-rw-r--r--wocky/wocky-data-form.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/wocky/wocky-data-form.c b/wocky/wocky-data-form.c
index 6856b52..3830265 100644
--- a/wocky/wocky-data-form.c
+++ b/wocky/wocky-data-form.c
@@ -649,6 +649,8 @@ wocky_data_form_set_type (WockyDataForm *self,
const gchar *form_type)
{
WockyDataFormField *field;
+ const gchar const *raw_value_contents[] =
+ { form_type, NULL };
g_return_val_if_fail (form_type != NULL, FALSE);
@@ -661,7 +663,9 @@ wocky_data_form_set_type (WockyDataForm *self,
}
field = wocky_data_form_field_new (WOCKY_DATA_FORM_FIELD_TYPE_HIDDEN,
- "FORM_TYPE", NULL, NULL, FALSE, NULL, NULL,
+ "FORM_TYPE", NULL, NULL, FALSE,
+ wocky_g_value_slice_new_string (form_type),
+ g_strdupv ((GStrv) raw_value_contents),
wocky_g_value_slice_new_string (form_type),
NULL);
data_form_add_field (self, field, FALSE);