<p><b>@b4n</b> commented on this pull request.</p>

<p>I propose a few small fixes in <a href="https://github.com/geany/geany/commit/148fa9f59e70ce1e691fa7d008cb7fc9b798f481" class="commit-link"><tt>148fa9f</tt></a>.  If you're OK with them (as I just amended the commit they are in your name), I'll merge that.</p>
<p>A better solution would be to update the items sensitivity in reaction to selection changes (e.g. enable them whenever they can work, disable them when they can't).  That could also fix the statusbar items sensitivity.  But unfortunately it's tricky because those need to work on a wide range of widgets, not only the main editing area, but also all entry and text fields.  So your proposal looks reasonable enough to me.</p><hr>

<p>In <a href="https://github.com/geany/geany/pull/1386#pullrequestreview-20167378">data/geany.glade</a>:</p>
<pre style='color:#555'>> @@ -6321,6 +6321,7 @@
               <object class="GtkMenuBar" id="menubar1">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
+                <signal name="deactivate" handler="on_menubar1_deactivate" after="yes" swapped="no"/>
</pre>
<p>Sad we can't really connect something on the menu item next to the "activate" signal.  We could use "deselect", but I'm not sure is really correct.</p>

<hr>

<p>In <a href="https://github.com/geany/geany/pull/1386#pullrequestreview-20167378">src/ui_utils.h</a>:</p>
<pre style='color:#555'>> @@ -299,6 +299,8 @@ void ui_update_popup_goto_items(gboolean enable);
 
 void ui_update_menu_copy_items(GeanyDocument *doc);
 
+void ui_restore_menu_copy_items();
</pre>
<p>argument list should be <code>(void)</code> for a proper prototype</p>

<hr>

<p>In <a href="https://github.com/geany/geany/pull/1386#pullrequestreview-20167378">src/ui_utils.c</a>:</p>
<pre style='color:#555'>> @@ -533,9 +541,13 @@ void ui_update_menu_copy_items(GeanyDocument *doc)
                enable = gtk_text_buffer_get_selection_bounds(buffer, NULL, NULL);
        }
 
-       len = G_N_ELEMENTS(widgets.menu_copy_items);
-       for (i = 0; i < len; i++)
-               ui_widget_set_sensitive(widgets.menu_copy_items[i], enable);
+       set_menu_copy_items_sensitive(enable);
+}
+
+
+void ui_restore_menu_copy_items()
</pre>
<p>This function indirection doesn't add clarity to me, so I'd rather expose the <code>set_sensitive()</code> part directly.</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/1386#pullrequestreview-20167378">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ4_ZM_9TL1WjCX9waMdjOHg4cveEks5rZbd1gaJpZM4L3VrJ">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJz6Kf7-W4cgiakFhrIECbuY_mCdZks5rZbd1gaJpZM4L3VrJ.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/1386#pullrequestreview-20167378"></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","title":"geany/geany","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"}},"updates":{"snippets":[{"icon":"PERSON","message":"@b4n commented on #1386"}],"action":{"name":"View Pull Request","url":"https://github.com/geany/geany/pull/1386#pullrequestreview-20167378"}}}</script>