<p><a href="https://github.com/elextr" class="user-mention">@elextr</a> I'm aware that it shouldn't be needed, it was just one attempt on the way of achieving point 1. So, understood: no usage due to not being in the documented API :)<br>
Probably fixing <code>build_remove_menu_item()</code> should be handled in a separate bug report.</p>

<p>Side note: the changes presented here work nicely when switching between geanyprj projects and also when loading a Geany core project file.<br>
My issue is that when tabbing from a geanyprj file to a non-project file, the build menu needs to be repopulated as given by the file type and <code>geany.conf</code>.</p>

<p>I can't play with the current <code>GeanyBuildSource</code> values because chosing below <code>GEANY_BCS_HOME_FT</code> is not enough to make geanyprj settings show up, while using <code>GEANY_BCS_HOME_FT</code> or <code>GEANY_BCS_PREF</code> lets the project paths linger (not get updated) at non-project files due to same priority in the respective cases.</p>

<p>One solution would be a plugin API that lets me reload stored settings from the config files (which I don't see currently).</p>

<p>Another one would be to introduce something like <code>GEANY_BCS_PLUGIN</code> either higher than or just below the <code>GEANY_BCS_PROJ</code> entries, so plugins get their own place for build menu changes.</p>

<p>Thoughts?</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-plugins/pull/486#issuecomment-258687870">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ_p6XjZqbQMqFxqIRcP-P8WBZ8Yrks5q7fDmgaJpZM4KQOrP">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ9tfRmZKiutWS9ehkVl_taEdS-fxks5q7fDmgaJpZM4KQOrP.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-plugins/pull/486#issuecomment-258687870"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany-plugins","title":"geany/geany-plugins","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany-plugins"}},"updates":{"snippets":[{"icon":"PERSON","message":"@donjan in #486: @elextr I'm aware that it shouldn't be needed, it was just one attempt on the way of achieving point 1. So, understood: no usage due to not being in the documented API :)\r\nProbably fixing `build_remove_menu_item()` should be handled in a separate bug report.\r\n\r\nSide note: the changes presented here work nicely when switching between geanyprj projects and also when loading a Geany core project file.\r\nMy issue is that when tabbing from a geanyprj file to a non-project file, the build menu needs to be repopulated as given by the file type and `geany.conf`.\r\n\r\nI can't play with the current `GeanyBuildSource` values because chosing below `GEANY_BCS_HOME_FT` is not enough to make geanyprj settings show up, while using `GEANY_BCS_HOME_FT` or `GEANY_BCS_PREF` lets the project paths linger (not get updated) at non-project files due to same priority in the respective cases.\r\n\r\nOne solution would be a plugin API that lets me reload stored settings from the config files (which I don't see currently).\r\n\r\nAnother one would be to introduce something like `GEANY_BCS_PLUGIN` either higher than or just below the `GEANY_BCS_PROJ` entries, so plugins get their own place for build menu changes.\r\n\r\nThoughts?"}],"action":{"name":"View Pull Request","url":"https://github.com/geany/geany-plugins/pull/486#issuecomment-258687870"}}}</script>