This reverts commit
ea57feff96f13bbd4d03a76040a4ddfad2677310.
It makes the gsettings tool fail any time it tries to set a
key to a value, that the key already has.
https://bugzilla.gnome.org/show_bug.cgi?id=641768
GError *error = NULL;
GVariant *existing;
GVariant *new;
GError *error = NULL;
GVariant *existing;
GVariant *new;
gchar *freeme = NULL;
existing = g_settings_get_value (settings, key);
gchar *freeme = NULL;
existing = g_settings_get_value (settings, key);
if (!g_settings_range_check (settings, key, new))
{
g_printerr (_("The provided value is outside of the valid range\n"));
if (!g_settings_range_check (settings, key, new))
{
g_printerr (_("The provided value is outside of the valid range\n"));
exit (1);
}
g_settings_set_value (settings, key, new);
exit (1);
}
g_settings_set_value (settings, key, new);
- g_settings_sync ();
-
- stored = g_settings_get_value (settings, key);
- if (g_variant_equal (stored, existing))
- {
- g_printerr (_("Failed to set value\n"));
- exit (1);
- }
-
- g_variant_unref (stored);
g_variant_unref (existing);
g_variant_unref (new);
g_variant_unref (existing);
g_variant_unref (new);