<p>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 <code>new</code> and <code>open</code> can't be on a <code>Document</code> object as <a href="https://github.com/kugel-" class="user-mention">@kugel-</a> 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 <code>foreach (geany_documents as doc) { doc.connect(...); }</code>, which would also be less optimized, and would require to also <code>geany_app.connect("document-new", (app, doc) => { doc.connect(...) })</code> and same for <code>new</code>.<br>
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).</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly or <a href="https://github.com/geany/geany/pull/1038#issuecomment-220998378">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ5ujTQxjCm_pl308BoEhaoxsxAUmks5qEbtZgaJpZM4Ifw_7.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/pull/1038#issuecomment-220998378"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>