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

Colomban Wendling notifications at xxxxx
Mon May 23 14:36:09 UTC 2016


For most use case having our signals on an "application" object makes sense, as they are meant as global events.  We could have object-specific ones, but some are truly useful as is, not only `new` and `open` can't be on a `Document` object as @kugel- pointed out, but many others are really handy to have globally instead of one handler per document: many plugin don't really care to attach to each document, and rather want the event in any one.  This avoids doing stuff like `foreach (geany_documents as doc) { doc.connect(...); }`, which would also be less optimized, and would require to also `geany_app.connect("document-new", (app, doc) => { doc.connect(...) })` and same for `new`.
My point being that some signals are great for global events and make sense to be on the application/window rather than on each specific document (or alike).

---
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-220998378
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160523/64702686/attachment.html>


More information about the Github-comments mailing list