WIP: Deprecate ExoJob and ExoSimpleJob (#58)
Merge request reports
Activity
Does this still makes sense? I mean, is GTask a drop-in replacement for ExoJob?
I got the following warnings when building:
DOC Building XML ../../exo/exo-binding.c:93: warning: ExoBinding is deprecated in the inline comments, but no deprecation guards were found around the declaration. (See the --deprecated-guards option for gtkdoc-scan.) ../../exo/exo-binding.c:108: warning: ExoMutualBinding is deprecated in the inline comments, but no deprecation guards were found around the declaration. (See the --deprecated-guards option for gtkdoc-scan.) ../../exo-open/main.c:58: warning: Symbol name not found at the start of the comment block. ./exo-unused.txt:1: warning: 160 unused declarations. They should be added to exo-sections.txt in the appropriate place.
Edited by Andre MirandaI think generally it makes sense to use GTask over exo-selfmade stuff, even if it is no drop-in replacement, Just because it will reduce maintenance effort for Xfce.
Though probably this concrete MR can be closed for now, since the 'masterplan' on how to do it changed meanwhile. All the details are discussed in #58
Edited by Alexander SchwinnGreat, thanks for the explanation, I'll try to migrate screenshooter to GTask (someday).
I tried this, no success, ExoJob supports a nice way of triggering signals which I couldn't figure out how to replace with GTask, it seems to support either a successful or error result.
Pointers and good references are welcome.
Humm, so far I did not look into it in detail. @MShrimp4 was diving into it (ping, if you are still interested)
I suppose if GTask is missing some features, it might make sense to wrap it with a new 'XfceTask' construct in libxfce4util which adds the missing functionality.
@andreldm Looks like vanilla
GTask
lacks such a helper function. I should addxfce_g_task_emit()
or something similar.Function of
exo_job_emit()
:- Packs va_list into a struct
- Calls
g_io_scheduler_job_send_to_mainloop
(deprecated, can be easily replaced withg_main_context_invoke_full()
) - In main context,
exo_job_emit_valist_in_mainloop()
emits signal (g_signal_emit_valist()
)
Edited by Yongha HwangI created a new branch of libxfce4util to create
xfce_g_task_emit()
. It is not a direct in-place replacement sinceGTask
only manages asynchronous job execution. The difference is thatxfce_g_task_emit()
would trigger a signal of the source object (as returned byg_task_get_source_object()
).I have not tested the function though. (only tested compilation)
Thanks alot @MShrimp4 ! Hope I will find some time soon to take a closer look at it.
mentioned in issue #58