If the plugin gets activated *after* Geany has been started already, we need to iterate all open documents and attach the "button-press" signal handler.
Fixes #638. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany-plugins/pull/639
-- Commit Summary --
* Connect button-press signal handlers on plugin activation
-- File Changes --
M addons/src/ao_markword.c (40)
-- Patch Links --
https://github.com/geany/geany-plugins/pull/639.patch https://github.com/geany/geany-plugins/pull/639.diff
Not sure wether it's layer 8 issue but when deactivating the plugin again, it's still marking
b4n commented on this pull request.
@@ -78,6 +79,13 @@ static void ao_mark_word_set_property(GObject *object, guint prop_id,
{ case PROP_ENABLE_MARKWORD: priv->enable_markword = g_value_get_boolean(value); + /* if the plugin is loaded while Geany is already running, we need to connect the + * button press signal for open documents, if Geany is just booting, + * it happens automatically */ + if (main_is_realized())
shouldn't this check for `priv->enable_markword` too, not to do that on deactivation as well?
@eht16 pushed 1 commit.
71e26d8 Connect button press handler to open documents only if activated
eht16 commented on this pull request.
@@ -78,6 +79,13 @@ static void ao_mark_word_set_property(GObject *object, guint prop_id,
{ case PROP_ENABLE_MARKWORD: priv->enable_markword = g_value_get_boolean(value); + /* if the plugin is loaded while Geany is already running, we need to connect the + * button press signal for open documents, if Geany is just booting, + * it happens automatically */ + if (main_is_realized())
Uhhh, of course, thanks. Stupid me. Fixed in 71e26d8f69092ddaa2da305bb3cee4f76378a8b5.
@frlan details on reproducing? Even without 71e26d8f69092ddaa2da305bb3cee4f76378a8b5 it doesn't mark anything after deactivation.
Hmmm. Weird. I'm pretty sure I tested it with a clean version. Will retest it with latest HEAD of that branch later and give feedback. Maybe just another layer 8 issue on my end :(
Ah... Was an issue with automark-plugin.
Merged #639.
github-comments@lists.geany.org