Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Wed, 15 Oct 2014 12:52:49 UTC Commit: 953532b1d1eb2e6ba1e2fb0e2b43eb166fe521d6 https://github.com/geany/geany-plugins/commit/953532b1d1eb2e6ba1e2fb0e2b43eb...
Log Message: ----------- multiterm: Fix building with recent Vala versions
Vala doesn't allow dynamic code as global variable initializers anymore, so move the dynamic initialization inside plugin_init().
Interestingly, if this actually used to work is only because the initialization wasn't actually dynamic in C, as a NULL GList is a valid one and that's what it was initialized to.
Modified Paths: -------------- multiterm/src/plugin.vala
Modified: multiterm/src/plugin.vala 5 lines changed, 4 insertions(+), 1 deletions(-) =================================================================== @@ -28,7 +28,7 @@ public Data geany_data; public Functions geany_functions;
/* Widgets to clean up when the plugin is unloaded */ -private List<Widget> toplevel_widgets = new List<Widget>(); +private List<Widget> toplevel_widgets = null;
/* Geany calls this to determine min. required API/ABI version */ public int plugin_version_check(int abi_version) @@ -57,6 +57,8 @@ public void plugin_init(Geany.Data data) * unregistering and re-registering new types */ geany_plugin.module_make_resident();
+ toplevel_widgets = new List<Widget>(); + /* Initialize plugin's configuration directory/file */ config_dir = Path.build_filename(geany_data.app.config_dir, "plugins", "multiterm"); config_file = Path.build_filename(config_dir, "multiterm.conf"); @@ -107,4 +109,5 @@ public void plugin_cleanup () { foreach (Widget wid in toplevel_widgets) wid.destroy(); + toplevel_widgets = null; }
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
plugins-commits@lists.geany.org