Revision: 2728 http://geany.svn.sourceforge.net/geany/?rev=2728&view=rev Author: ntrel Date: 2008-06-26 09:39:41 -0700 (Thu, 26 Jun 2008)
Log Message: ----------- Add keybindings for Previous Message, Previous Error commands (#1931125).
Modified Paths: -------------- trunk/ChangeLog trunk/src/build.c trunk/src/keybindings.c trunk/src/keybindings.h
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-06-26 16:17:28 UTC (rev 2727) +++ trunk/ChangeLog 2008-06-26 16:39:41 UTC (rev 2728) @@ -5,6 +5,9 @@ Call vte_restart() in vte_keypress() as the code is the same. * src/build.c, src/build.h, src/msgwindow.c: Add Previous Error menu item. + * src/build.c, src/keybindings.c, src/keybindings.h: + Add keybindings for Previous Message, Previous Error commands + (#1931125).
2008-06-25 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/build.c =================================================================== --- trunk/src/build.c 2008-06-26 16:17:28 UTC (rev 2727) +++ trunk/src/build.c 2008-06-26 16:39:41 UTC (rev 2728) @@ -1108,7 +1108,7 @@
item = gtk_image_menu_item_new_with_mnemonic(_("_Previous Error")); gtk_widget_show(item); - /*GEANY_ADD_WIDGET_ACCEL(GEANY_KEYS_BUILD_, item);*/ + GEANY_ADD_WIDGET_ACCEL(GEANY_KEYS_BUILD_PREVIOUSERROR, item); gtk_container_add(GTK_CONTAINER(menu), item); g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_build_previous_error), NULL); menu_items->item_previous_error = item;
Modified: trunk/src/keybindings.c =================================================================== --- trunk/src/keybindings.c 2008-06-26 16:17:28 UTC (rev 2727) +++ trunk/src/keybindings.c 2008-06-26 16:39:41 UTC (rev 2728) @@ -324,6 +324,8 @@ LW(find_in_files1)); keybindings_set_item(group, GEANY_KEYS_SEARCH_NEXTMESSAGE, cb_func_search_action, 0, 0, "menu_nextmessage", _("Next Message"), LW(next_message1)); + keybindings_set_item(group, GEANY_KEYS_SEARCH_PREVIOUSMESSAGE, cb_func_search_action, + 0, 0, "menu_previousmessage", _("Previous Message"), LW(previous_message1)); keybindings_set_item(group, GEANY_KEYS_SEARCH_FINDUSAGE, cb_func_search_action, 0, 0, "popup_findusage", _("Find Usage"), NULL);
@@ -433,6 +435,8 @@ 0, 0, "build_makeobject", _("Make object"), NULL); keybindings_set_item(group, GEANY_KEYS_BUILD_NEXTERROR, cb_func_build_action, 0, 0, "build_nexterror", _("Next error"), NULL); + keybindings_set_item(group, GEANY_KEYS_BUILD_PREVIOUSERROR, cb_func_build_action, + 0, 0, "build_previouserror", _("Previous error"), NULL); keybindings_set_item(group, GEANY_KEYS_BUILD_RUN, cb_func_build_action, GDK_F5, 0, "build_run", _("Run"), NULL); keybindings_set_item(group, GEANY_KEYS_BUILD_RUN2, cb_func_build_action, @@ -1049,6 +1053,8 @@ on_find_in_files1_activate(NULL, NULL); break; case GEANY_KEYS_SEARCH_NEXTMESSAGE: on_next_message1_activate(NULL, NULL); break; + case GEANY_KEYS_SEARCH_PREVIOUSMESSAGE: + on_previous_message1_activate(NULL, NULL); break; case GEANY_KEYS_SEARCH_FINDUSAGE: if (check_current_word()) on_find_usage1_activate(NULL, NULL); @@ -1119,6 +1125,9 @@ case GEANY_KEYS_BUILD_NEXTERROR: item = menu_items->item_next_error; break; + case GEANY_KEYS_BUILD_PREVIOUSERROR: + item = menu_items->item_previous_error; + break; case GEANY_KEYS_BUILD_RUN: item = menu_items->item_exec; break;
Modified: trunk/src/keybindings.h =================================================================== --- trunk/src/keybindings.h 2008-06-26 16:17:28 UTC (rev 2727) +++ trunk/src/keybindings.h 2008-06-26 16:39:41 UTC (rev 2728) @@ -71,8 +71,10 @@ extern const gchar keybindings_keyfile_group_name[];
-/* Note: keybinding_groups is not in the API, so we don't need to increment the ABI when - * appending keybindings or keygroups, as the _COUNT item shouldn't be used by plugins. */ +/* Note: we don't need to increment the plugin ABI when appending keybindings or keygroups, + * just make sure to only insert keybindings/groups immediately before the _COUNT item, so + * the existing enum values stay the same. + * The _COUNT item should not be used by plugins, as it may well change. */
/** Keybinding group IDs */ enum @@ -207,6 +209,7 @@ GEANY_KEYS_SEARCH_FINDPREVSEL, GEANY_KEYS_SEARCH_NEXTMESSAGE, GEANY_KEYS_SEARCH_FINDUSAGE, + GEANY_KEYS_SEARCH_PREVIOUSMESSAGE, GEANY_KEYS_SEARCH_COUNT };
@@ -287,6 +290,7 @@ GEANY_KEYS_BUILD_RUN, GEANY_KEYS_BUILD_RUN2, GEANY_KEYS_BUILD_OPTIONS, + GEANY_KEYS_BUILD_PREVIOUSERROR, GEANY_KEYS_BUILD_COUNT };
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.