mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 05:56:14 +01:00
gsettings: Slightly simplify g_settings_action_get_state()
This introduces no functional changes. Suggested by Christian Persch. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
b494b83405
commit
f85e4e341f
@ -3223,13 +3223,7 @@ g_settings_action_get_state (GAction *action)
|
|||||||
value = g_settings_read_from_backend (gsa->settings, &gsa->key, FALSE, FALSE);
|
value = g_settings_read_from_backend (gsa->settings, &gsa->key, FALSE, FALSE);
|
||||||
|
|
||||||
if (value == NULL)
|
if (value == NULL)
|
||||||
value = g_settings_schema_key_get_translated_default (&gsa->key);
|
value = g_settings_schema_key_get_default_value (&gsa->key);
|
||||||
|
|
||||||
if (value == NULL)
|
|
||||||
value = g_settings_schema_key_get_per_desktop_default (&gsa->key);
|
|
||||||
|
|
||||||
if (value == NULL)
|
|
||||||
value = g_variant_ref (gsa->key.default_value);
|
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user