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

Reply via email to