diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2020-08-08 21:37:21 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2020-08-08 21:37:21 (GMT) |
commit | 4370d2d77d623f560c7df94a3bc15b1395e4878b (patch) | |
tree | 57cc6268f504c19aaac3b1adda4295ed3b1ddc7f /src/gui/core/panels.c | |
parent | 34d28c7418342d3c67be4747b13cdcb124edda32 (diff) |
Updated all the code relative to GUI items.
Diffstat (limited to 'src/gui/core/panels.c')
-rw-r--r-- | src/gui/core/panels.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/core/panels.c b/src/gui/core/panels.c index 9cc0592..8505f37 100644 --- a/src/gui/core/panels.c +++ b/src/gui/core/panels.c @@ -25,6 +25,9 @@ #include "panels.h" +#include <malloc.h> + + #include "global.h" #include "items.h" #include "../panel-int.h" @@ -221,10 +224,10 @@ GPanelItem *get_panel_item_by_name(const char *name) bool look_for_named_panel(GPanelItem *item, GPanelItem **found) { - const char *key; /* Clef à utiliser */ + char *key; /* Clef à utiliser */ bool status; /* Bilan de la comparaison */ - key = g_editor_item_get_name(G_EDITOR_ITEM(item)); + key = g_editor_item_get_key(G_EDITOR_ITEM(item)); if (strcmp(key, name) == 0) { @@ -234,6 +237,8 @@ GPanelItem *get_panel_item_by_name(const char *name) else status = true; + free(key); + return status; } |