Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Sun, 05 Feb 2017 14:34:24 UTC Commit: 2c1a71ad2bbe7bc73abb37cb94f065c0137f84c7 https://github.com/geany/geany/commit/2c1a71ad2bbe7bc73abb37cb94f065c0137f84...
Log Message: ----------- Use :select/:deselect signals for consistency
Instead of having a handler on 2 separate objects, use :select and :deselect on the same one. Those signals are appropriate, as the documentation mentions that submenus are popped up on :select.
Modified Paths: -------------- data/geany.glade src/callbacks.c
Modified: data/geany.glade 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -6321,7 +6321,6 @@ <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"/> <child> <object class="GtkMenuItem" id="file1"> <property name="visible">True</property> @@ -6563,7 +6562,8 @@ <property name="can_focus">False</property> <property name="label" translatable="yes">_Edit</property> <property name="use_underline">True</property> - <signal name="activate" handler="on_edit1_activate" swapped="no"/> + <signal name="select" handler="on_edit1_select" swapped="no"/> + <signal name="deselect" handler="on_edit1_deselect" swapped="no"/> <child type="submenu"> <object class="GtkMenu" id="edit1_menu"> <property name="can_focus">False</property>
Modified: src/callbacks.c 6 lines changed, 3 insertions(+), 3 deletions(-) =================================================================== @@ -183,7 +183,7 @@ static void on_file1_activate(GtkMenuItem *menuitem, gpointer user_data)
/* edit actions, c&p & co, from menu bar and from popup menu */ -static void on_edit1_activate(GtkMenuItem *menuitem, gpointer user_data) +static void on_edit1_select(GtkMenuItem *menuitem, gpointer user_data) { GtkWidget *item; GeanyDocument *doc = document_get_current(); @@ -200,9 +200,9 @@ static void on_edit1_activate(GtkMenuItem *menuitem, gpointer user_data) }
-static void on_menubar1_deactivate(GtkMenuShell *menushell, gpointer user_data) +static void on_edit1_deselect(GtkMenuShell *menushell, gpointer user_data) { - /* we re-enable items that were disabled in on_edit1_activate() on menu popdown to + /* we re-enable items that were disabled in on_edit1_select() on menu popdown to * workaround mutli-layout keyboard issues in our keybinding handling code, so that * GTK's accelerator handling can catch them. * See https://github.com/geany/geany/issues/1368#issuecomment-273678207 */
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).