This hopefully fixes some Travis CI problems.
If GIO is not available and the GLib version is older than 2.46 then the feature "Live Update" will be disabled. Everything else works normal. In the "Settings"-Dialog the option do enable/disable the feature is grayed out and the tooltip text for the option informs the user that the feature is not available on the system. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany-plugins/pull/718
-- Commit Summary --
* workbench: make "live update"-feature depending on GIO and Glib version 2.46
-- File Changes --
M build/workbench.m4 (6) M workbench/src/dialogs.c (9) M workbench/src/wb_monitor.c (3) M workbench/src/wb_monitor.h (6) M workbench/src/wb_project.c (11) M workbench/src/workbench.c (14)
-- Patch Links --
https://github.com/geany/geany-plugins/pull/718.patch https://github.com/geany/geany-plugins/pull/718.diff
Merged #718.
Why does it require such a high version of GIO? I think the file monitoring stuff was added in 2.18, wasn't it?
I am doing directory monitoring. For that I also use the events ```G_FILE_MONITOR_EVENT_RENAMED```, ```G_FILE_MONITOR_EVENT_MOVED_IN``` and ```G_FILE_MONITOR_EVENT_MOVED_OUT```. And for that the GNOME documentation says version 2.46 is required, see https://developer.gnome.org/gio/stable/GFileMonitor.html (under section ```enum GFileMonitorEvent```).
I see. You could probably still use monitoring with older versions and just `#if`-guard out those flags.
One problem here, this tests on the build machine, not the machine the plugin is installed on when its distributed.
One problem here, this tests on the build machine, not the machine the plugin is installed on when its distributed.
Follow up.
According to our Debian packager the plugin package is tied to a Glib version anyway, so its not going to cause problems for normal users who get it from the repositories.
And if a user is smart enough to build the plugins themselves they are smart enough to handle their Glib version.
So never mind a runtime check.
@codebrainz:
I see. You could probably still use monitoring with older versions and just #if-guard out those flags.
I checked the GLib history and version 2.46 seems to exist since 2015. So if no one is really requiring it I will only support the new flags for a plugin which is as new/young as the workbench plugin.
@elextr:
So never mind a runtime check.
I will also add a runtime check soon.
Ok, please forget about GLib version 2.46. It turned out I do not need that events. See PR #719.
github-comments@lists.geany.org