From f85e4e341f4317e68da266bb409348d7f42ec4ad Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Fri, 13 Jan 2023 22:14:56 +0000 Subject: [PATCH] gsettings: Slightly simplify g_settings_action_get_state() This introduces no functional changes. Suggested by Christian Persch. Signed-off-by: Philip Withnall --- gio/gsettings.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/gio/gsettings.c b/gio/gsettings.c index 1c46afc45..a2c3dd0e4 100644 --- a/gio/gsettings.c +++ b/gio/gsettings.c @@ -3223,13 +3223,7 @@ g_settings_action_get_state (GAction *action) value = g_settings_read_from_backend (gsa->settings, &gsa->key, FALSE, FALSE); if (value == NULL) - value = g_settings_schema_key_get_translated_default (&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); + value = g_settings_schema_key_get_default_value (&gsa->key); return value; }