diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2021-09-28 21:40:39 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2021-09-28 21:40:39 (GMT) |
commit | 0b5e9a3c7bcd3eb15be0e888ebfe46d14497b101 (patch) | |
tree | 059d8e5712476a9df8c429ed787efd484d5f372d /src/glibext | |
parent | dc25699a414f0baa2265be0cfa162c77b2cdc22d (diff) |
Rely on a generic task to analyze loaded content.
Diffstat (limited to 'src/glibext')
-rw-r--r-- | src/glibext/seq.c | 2 | ||||
-rw-r--r-- | src/glibext/seq.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/glibext/seq.c b/src/glibext/seq.c index 3474d72..ba5cc35 100644 --- a/src/glibext/seq.c +++ b/src/glibext/seq.c @@ -343,7 +343,7 @@ static void g_seq_work_process(GSeqWork *work, GtkStatusStack *status) } - if (work->type == SWT_BOOLEAN) + if (work->status != NULL && (work->type == SWT_BOOLEAN || work->type == SWT_OBJECT)) *(work->status) = (i == work->end && state); } diff --git a/src/glibext/seq.h b/src/glibext/seq.h index f275375..c00b4e2 100644 --- a/src/glibext/seq.h +++ b/src/glibext/seq.h @@ -71,6 +71,10 @@ GSeqWork *g_seq_work_new_boolean(void *, size_t, size_t, activity_id_t, seq_work /* Crée une tâche de traitement séquentiel avec objects. */ GSeqWork *g_seq_work_new_object(void *, size_t, size_t, activity_id_t, seq_work_obj_cb, bool *); +#define g_gen_work_new(d, i, c) g_seq_work_new(d, 0, 1, i, c) +#define g_gen_work_new_boolean(d, i, c, b) g_seq_work_new_boolean(d, 0, 1, i, c, b) +#define g_gen_work_new_object(d, i, c, b) g_seq_work_new_object(d, 0, 1, i, c, b) + #endif /* _GLIBEXT_SEQ_H */ |