[Github-comments] [geany/geany] Fix Ctrl+X and Ctrl+C in non-Latin keyboard layouts (#1386)

Colomban Wendling notifications at xxxxx
Sun Feb 5 11:50:13 UTC 2017


b4n commented on this pull request.

I propose a few small fixes in 148fa9f59e70ce1e691fa7d008cb7fc9b798f481.  If you're OK with them (as I just amended the commit they are in your name), I'll merge that.

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.

> @@ -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"/>

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.

> @@ -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();

argument list should be `(void)` for a proper prototype

> @@ -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()

This function indirection doesn't add clarity to me, so I'd rather expose the `set_sensitive()` part directly.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1386#pullrequestreview-20167378
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20170205/d37e0982/attachment.html>


More information about the Github-comments mailing list