~ubuntu-branches/ubuntu/precise/gconf/precise-201203060106

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2011-08-16 12:12:23 UTC
  • mfrom: (1.1.31 upstream)
  • Revision ID: james.westby@ubuntu.com-20110816121223-20e8lg1110yb6y75
Tags: 3.1.6-0ubuntu1
New upstream version

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
extern const gchar *gconf_value_type_to_string (int type);
38
38
 
39
39
static gboolean
 
40
type_uint32 (GSettings   *settings,
 
41
             const gchar *key)
 
42
{
 
43
  const GVariantType *type;
 
44
  GVariant *value;
 
45
 
 
46
  value = g_settings_get_value (settings, key);
 
47
  type = g_variant_get_type (value);
 
48
  g_variant_unref (value);
 
49
 
 
50
  return g_variant_type_equal (type, G_VARIANT_TYPE_UINT32);
 
51
}
 
52
 
 
53
static gboolean
40
54
handle_file (const gchar *filename)
41
55
{
42
56
  GKeyFile *keyfile;
166
180
                    g_settings_set_enum (settings, keys[j], gconf_value_get_int (value));
167
181
                  else if (strcmp (type, "flags") == 0)
168
182
                    g_settings_set_flags (settings, keys[j], gconf_value_get_int (value));
 
183
                  else if (type_uint32 (settings, keys[j]))
 
184
                    g_settings_set (settings, keys[j], "u",
 
185
                                    gconf_value_get_int (value));
169
186
                  else
170
187
                    g_settings_set (settings, keys[j], "i",
171
188
                                    gconf_value_get_int (value));