Normally a plugin would connect using its own plugin object, this is what I expect for peasy based ones at least:

def on_document_new(self, doc):
  pass
def do_enable(self):
 self.geany_plugin.geany_data.object.connect("document-new", self.on_document_new)

In this case the signal connection is automatically cleaned up when self is destructed, i.e. when geany (via peasy) unloads the plugin.

I'm not sure we can enforce such behavior for all GI based plugins but I expect the most common cases are handled like above.

Also, we can't enforce it for plain C plugins either (for non-geany_object signals) since those can too always use plain g_object_connect().


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.