summaryrefslogtreecommitdiff
path: root/src/gui/panel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/panel.c')
-rw-r--r--src/gui/panel.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/src/gui/panel.c b/src/gui/panel.c
index 976a2d7..5b21620 100644
--- a/src/gui/panel.c
+++ b/src/gui/panel.c
@@ -516,40 +516,31 @@ bool gtk_panel_item_class_setup_configuration(const GPanelItemClass *class, GGen
bool result; /* Bilan à retourner */
char *key; /* Clef d'accès à un paramètre */
bool dock_at_startup; /* Affichage dès le départ ? */
- GCfgParam *param; /* Paramètre chargé */
char *path; /* Localisation du panneau */
- result = true;
-
key = gtk_panel_item_class_build_configuration_key(class, "dock_at_startup");
dock_at_startup = class->dock_at_startup(class);
- param = g_generic_config_create_param_if_not_exist(config, key, CPT_BOOLEAN, dock_at_startup);
+ result = g_generic_config_create_param_if_not_exist(config, key, CPT_BOOLEAN, dock_at_startup);
free(key);
- if (param == NULL)
- {
- result = false;
+ if (!result)
goto exit;
- }
key = gtk_panel_item_class_build_configuration_key(class, "path");
path = class->get_path(class);
- param = g_generic_config_create_param_if_not_exist(config, key, CPT_STRING, path);
-
- if (param == NULL)
- result = false;
+ result = g_generic_config_create_param_if_not_exist(config, key, CPT_STRING, path);
free(path);
- exit:
-
free(key);
+ exit:
+
return result;
}