<blockquote>
<p>And if really it needs to be the exact same as the sidebar, the code should indeed be shared rather than copied.</p>
</blockquote>

<p>I actually just copied it to avoid more intrusion.  I'm just waiting for a go signal so I could place it somewhere else like <code>utils.c</code>.  How should we share the code?  As what I've suggested, we can place it in <code>utils.h</code>.  Or should we just place it in <code>sidebar.c</code> and have <code>notebook.c</code> include <code>sidebar.h</code>?</p>

<p>Also, should we have add a prefix to <code>get_doc_folder</code>? Like <code>utils_get_doc_folder</code> or <code>sidebar_get_doc_folder</code>?</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, <a href="https://github.com/geany/geany/pull/1144#issuecomment-236382767">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ20CgzeFT8w0KyBWk-rfBI9jojBIks5qa5zjgaJpZM4JQxCD">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJyYAhjIy-NqI1ieyF9i-M4aB7tLZks5qa5zjgaJpZM4JQxCD.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/1144#issuecomment-236382767"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>