diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2020-07-12 13:52:22 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2020-07-12 13:52:22 (GMT) |
commit | 2bd3ea7249d1234204c1b70abac8bc46e221fb95 (patch) | |
tree | f6b0f71d430bda2e8d762afbf5d084ac58cee640 /src/gui/editor.c | |
parent | 6ea1b9a8550adf84cde510c2d4446c5120c4d065 (diff) |
Improved the API for loaded contents.
Diffstat (limited to 'src/gui/editor.c')
-rw-r--r-- | src/gui/editor.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gui/editor.c b/src/gui/editor.c index bdd9a78..8e20cc1 100644 --- a/src/gui/editor.c +++ b/src/gui/editor.c @@ -926,8 +926,8 @@ static void on_editor_content_available(GStudyProject *project, GLoadedContent * static void on_editor_loaded_content_added(GStudyProject *project, GLoadedContent *content, void *unused) { GtkWidget *selected; /* Interface de prédilection */ - const char *name; /* Titre associé au binaire */ - const char *lname; /* Description du binaire */ + char *name; /* Titre associé au binaire */ + char *lname; /* Description du binaire */ GPanelItem *panel; /* Nouveau panneau à integrer */ selected = g_loaded_content_build_default_view(content); @@ -936,6 +936,10 @@ static void on_editor_loaded_content_added(GStudyProject *project, GLoadedConten lname = g_loaded_content_describe(content, true); panel = g_panel_item_new(PIP_BINARY_VIEW, name, lname, selected, true, "M"); + + free(lname); + free(name); + register_panel_item(panel, get_main_configuration()); g_signal_connect(selected, "size-allocate", G_CALLBACK(scroll_for_the_first_time), content); |