summaryrefslogtreecommitdiff
path: root/src/gui/dialogs
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-07-12 13:52:22 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-07-12 13:52:22 (GMT)
commit2bd3ea7249d1234204c1b70abac8bc46e221fb95 (patch)
treef6b0f71d430bda2e8d762afbf5d084ac58cee640 /src/gui/dialogs
parent6ea1b9a8550adf84cde510c2d4446c5120c4d065 (diff)
Improved the API for loaded contents.
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r--src/gui/dialogs/loading.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/dialogs/loading.c b/src/gui/dialogs/loading.c
index 3e71df4..97cd892 100644
--- a/src/gui/dialogs/loading.c
+++ b/src/gui/dialogs/loading.c
@@ -457,6 +457,8 @@ static void update_loading_dialog_counter(GtkBuilder *builder)
void add_content_to_loading_dialog(GtkBuilder *builder, GLoadedContent *content, GStudyProject *project)
{
GtkListStore *store; /* Modèle de gestion */
+ char *desc; /* Description d'un contenu */
+ char *format; /* Format associé à un contenu */
char *name; /* Désignation complète */
gboolean recognized; /* Nature du contenu */
GtkTreeIter iter; /* Point d'insertion */
@@ -472,9 +474,13 @@ void add_content_to_loading_dialog(GtkBuilder *builder, GLoadedContent *content,
/* Inscription */
- asprintf(&name, "%s (%s)",
- g_loaded_content_describe(content, false),
- g_loaded_content_get_format_name(content));
+ desc = g_loaded_content_describe(content, false);
+ format = g_loaded_content_get_format_name(content);
+
+ asprintf(&name, "%s (%s)", desc, format);
+
+ free(format);
+ free(desc);
recognized = TRUE;