<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>
</blockquote>

<p>I guess keeping it in sidebar would make more sense: it's not really anything generic, it's highly specific to how the sidebar works.  In that sense what you would really want to share is the sorting order, but you can't too easily do that -- apart maybe by being able to get the document list as sorted in the sidebar, and apply that very order.</p>

<blockquote>
<p>Also, should we add a prefix to <code>get_doc_folder</code>? Like <code>utils_get_doc_folder</code> or <code>sidebar_get_doc_folder</code>?</p>
</blockquote>

<p>yes, all functions added to headers -- event internally -- need to be prefixed.</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-236389676">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJx2rhXIyWx2BvaGsV0qkabCWxm5tks5qa7tVgaJpZM4JQxCD">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ0fmvYBoG98K8WtPbnSsrW8QMkvlks5qa7tVgaJpZM4JQxCD.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-236389676"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>