~ubuntu-branches/ubuntu/oneiric/gconf/oneiric-proposed

« back to all changes in this revision

Viewing changes to gsettings/gsettings-data-convert.c

  • Committer: Bazaar Package Importer
  • Author(s): Robert Ancell
  • Date: 2010-09-01 18:47:35 UTC
  • mto: (7.3.5 sid) (1.2.1)
  • mto: This revision was merged to the branch mainline in revision 53.
  • Revision ID: james.westby@ubuntu.com-20100901184735-eujhkrmxvlcgz6ex
Tags: upstream-2.31.91
ImportĀ upstreamĀ versionĀ 2.31.91

Show diffs side-by-side

added added

removed removed

Lines of Context:
183
183
                case GCONF_VALUE_STRING:
184
184
                  builder = g_variant_builder_new (G_VARIANT_TYPE_ARRAY);
185
185
                  list = gconf_value_get_list (value);
186
 
                  for (l = list; l; l = l->next)
 
186
                  if (list != NULL)
187
187
                    {
188
 
                      GConfValue *lv = l->data;
189
 
                      s = gconf_value_get_string (lv);
190
 
                      g_variant_builder_add (builder, "s", s);
 
188
                      for (l = list; l; l = l->next)
 
189
                        {
 
190
                          GConfValue *lv = l->data;
 
191
                          s = gconf_value_get_string (lv);
 
192
                          g_variant_builder_add (builder, "s", s);
 
193
                        }
 
194
                      v = g_variant_new ("as", builder);
191
195
                    }
192
 
                  v = g_variant_new ("as", builder);
 
196
                  else
 
197
                    v = g_variant_new_array (G_VARIANT_TYPE_STRING, NULL, 0);
 
198
                  g_variant_ref_sink (v);
193
199
 
194
200
                  if (dry_run)
195
201
                    {
208
214
                case GCONF_VALUE_INT:
209
215
                  builder = g_variant_builder_new (G_VARIANT_TYPE_ARRAY);
210
216
                  list = gconf_value_get_list (value);
211
 
                  for (l = list; l; l = l->next)
 
217
                  if (list != NULL)
212
218
                    {
213
 
                      GConfValue *lv = l->data;
214
 
                      ii = gconf_value_get_int (lv);
215
 
                      g_variant_builder_add (builder, "i", ii);
 
219
                      for (l = list; l; l = l->next)
 
220
                        {
 
221
                          GConfValue *lv = l->data;
 
222
                          ii = gconf_value_get_int (lv);
 
223
                          g_variant_builder_add (builder, "i", ii);
 
224
                        }
 
225
                      v = g_variant_new ("ai", builder);
216
226
                    }
217
 
                  v = g_variant_new ("ai", builder);
 
227
                  else
 
228
                    v = g_variant_new_array (G_VARIANT_TYPE_INT32, NULL, 0);
 
229
                  g_variant_ref_sink (v);
218
230
 
219
231
                  if (dry_run)
220
232
                    {