summaryrefslogtreecommitdiff
path: root/src/gui/editor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/editor.c')
-rw-r--r--src/gui/editor.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/src/gui/editor.c b/src/gui/editor.c
index 58dda53..627df95 100644
--- a/src/gui/editor.c
+++ b/src/gui/editor.c
@@ -131,7 +131,7 @@ static void notify_editor_project_change(GStudyProject *, bool);
static gboolean scroll_for_the_first_time(GtkWidget *, GdkEvent *, GLoadedContent *);
/* Présente une possibilité de sélection des contenus chargés. */
-static void on_editor_contents_available(GStudyProject *, GLoadedContent **, guint, void *);
+static void on_editor_content_available(GStudyProject *, GLoadedContent *, void *);
/* Affiche le contenu qui vient de rejoindre un projet donné. */
static void on_editor_loaded_content_added(GStudyProject *, GLoadedContent *, void *);
@@ -912,8 +912,8 @@ static void notify_editor_project_change(GStudyProject *project, bool new)
if (new)
{
- g_signal_connect_to_main(project, "contents-available", G_CALLBACK(on_editor_contents_available), NULL,
- g_cclosure_user_marshal_VOID__POINTER_UINT);
+ g_signal_connect_to_main(project, "content-available", G_CALLBACK(on_editor_content_available), NULL,
+ g_cclosure_marshal_VOID__OBJECT);
g_signal_connect_to_main(project, "content-added", G_CALLBACK(on_editor_loaded_content_added), NULL,
g_cclosure_marshal_VOID__OBJECT);
@@ -946,10 +946,9 @@ static void notify_editor_project_change(GStudyProject *project, bool new)
/******************************************************************************
* *
-* Paramètres : project = project impliqué dans l'opération. *
-* contents = nouveaux contenus à éventuellement charger. *
-* count = taille de la liste fournie. *
-* unused = adresse non utilisée ici. *
+* Paramètres : project = project impliqué dans l'opération. *
+* content = nouveau contenu à éventuellement charger. *
+* unused = adresse non utilisée ici. *
* *
* Description : Présente une possibilité de sélection des contenus chargés. *
* *
@@ -959,22 +958,13 @@ static void notify_editor_project_change(GStudyProject *project, bool new)
* *
******************************************************************************/
-static void on_editor_contents_available(GStudyProject *project, GLoadedContent **contents, guint count, void *unused)
+static void on_editor_content_available(GStudyProject *project, GLoadedContent *content, void *unused)
{
- guint i; /* Boucle de parcours */
-
- for (i = 0; i < count; i++)
- {
- g_signal_connect(contents[i], "analyzed", G_CALLBACK(on_loaded_content_analyzed), project);
+ g_object_ref(G_OBJECT(content));
- g_loaded_content_analyze(contents[i], true);
+ g_signal_connect(content, "analyzed", G_CALLBACK(on_loaded_content_analyzed), project);
- g_object_unref(G_OBJECT(contents[i]));
-
- }
-
- if (contents != NULL)
- free(contents);
+ g_loaded_content_analyze(content, true);
}