[Github-comments] [geany/geany] Gi signals (#1038)

Thomas Martitz notifications at xxxxx
Sun Jun 5 13:09:26 UTC 2016


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 or view it on GitHub:
https://github.com/geany/geany/pull/1038#issuecomment-223812224
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160605/2c2e56a6/attachment.html>


More information about the Github-comments mailing list