Revision: 1077 http://svn.sourceforge.net/geany/?rev=1077&view=rev Author: ntrel Date: 2006-12-09 09:03:03 -0800 (Sat, 09 Dec 2006)
Log Message: ----------- Add keybindings for Next Message and Next Error commands.
Modified Paths: -------------- trunk/ChangeLog trunk/src/build.c trunk/src/keybindings.c trunk/src/keybindings.h
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2006-12-09 16:23:29 UTC (rev 1076) +++ trunk/ChangeLog 2006-12-09 17:03:03 UTC (rev 1077) @@ -7,6 +7,8 @@ Windows it can be later than expected (closes #1611530). * src/keybindings.c: Show the Message window when switching to the vte. + * src/build.c, src/keybindings.c, src/keybindings.h: + Add keybindings for Next Message and Next Error commands.
2006-12-08 Nick Treleaven nick.treleaven@btinternet.com
Modified: trunk/src/build.c =================================================================== --- trunk/src/build.c 2006-12-09 16:23:29 UTC (rev 1076) +++ trunk/src/build.c 2006-12-09 17:03:03 UTC (rev 1077) @@ -883,6 +883,7 @@ // next error item = gtk_image_menu_item_new_with_mnemonic(_("_Next Error")); gtk_widget_show(item); + GEANY_ADD_WIDGET_ACCEL(GEANY_KEYS_BUILD_NEXTERROR, item); gtk_container_add(GTK_CONTAINER(menu), item); g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_build_next_error), NULL); menu_items->item_next_error = item; @@ -938,9 +939,7 @@ gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(menu), item); gtk_tooltips_set_tip(tooltips, item, _("Compiles the current file into a DVI file"), NULL); - if (keys[GEANY_KEYS_BUILD_COMPILE]->key) - gtk_widget_add_accelerator(item, "activate", accel_group, keys[GEANY_KEYS_BUILD_COMPILE]->key, - keys[GEANY_KEYS_BUILD_COMPILE]->mods, GTK_ACCEL_VISIBLE); + GEANY_ADD_WIDGET_ACCEL(GEANY_KEYS_BUILD_COMPILE, item); image = gtk_image_new_from_stock("gtk-convert", GTK_ICON_SIZE_MENU); gtk_widget_show(image); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image); @@ -953,9 +952,7 @@ gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(menu), item); gtk_tooltips_set_tip(tooltips, item, _("Compiles the current file into a PDF file"), NULL); - if (keys[GEANY_KEYS_BUILD_LINK]->key) - gtk_widget_add_accelerator(item, "activate", accel_group, keys[GEANY_KEYS_BUILD_LINK]->key, - keys[GEANY_KEYS_BUILD_LINK]->mods, GTK_ACCEL_VISIBLE); + GEANY_ADD_WIDGET_ACCEL(GEANY_KEYS_BUILD_LINK, item); image = gtk_image_new_from_stock("gtk-convert", GTK_ICON_SIZE_MENU); gtk_widget_show(image); gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(item), image); @@ -997,6 +994,7 @@ // next error item = gtk_image_menu_item_new_with_mnemonic(_("_Next Error")); gtk_widget_show(item); + GEANY_ADD_WIDGET_ACCEL(GEANY_KEYS_BUILD_NEXTERROR, item); gtk_container_add(GTK_CONTAINER(menu), item); g_signal_connect((gpointer) item, "activate", G_CALLBACK(on_build_next_error), NULL); menu_items->item_next_error = item; @@ -1010,9 +1008,7 @@ item = gtk_image_menu_item_new_with_mnemonic(LATEX_VIEW_DVI_LABEL); gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(menu), item); - if (keys[GEANY_KEYS_BUILD_RUN]->key) - gtk_widget_add_accelerator(item, "activate", accel_group, keys[GEANY_KEYS_BUILD_RUN]->key, - keys[GEANY_KEYS_BUILD_RUN]->mods, GTK_ACCEL_VISIBLE); + GEANY_ADD_WIDGET_ACCEL(GEANY_KEYS_BUILD_RUN, item); gtk_tooltips_set_tip(tooltips, item, _("Compiles and view the current file"), NULL); image = gtk_image_new_from_stock("gtk-find", GTK_ICON_SIZE_MENU); gtk_widget_show(image); @@ -1025,9 +1021,7 @@ item = gtk_image_menu_item_new_with_mnemonic(_("View PDF file")); gtk_widget_show(item); gtk_container_add(GTK_CONTAINER(menu), item); - if (keys[GEANY_KEYS_BUILD_RUN2]->key) - gtk_widget_add_accelerator(item, "activate", accel_group, keys[GEANY_KEYS_BUILD_RUN2]->key, - keys[GEANY_KEYS_BUILD_RUN2]->mods, GTK_ACCEL_VISIBLE); + GEANY_ADD_WIDGET_ACCEL(GEANY_KEYS_BUILD_RUN2, item); gtk_tooltips_set_tip(tooltips, item, _("Compiles and view the current file"), NULL); image = gtk_image_new_from_stock("gtk-find", GTK_ICON_SIZE_MENU); gtk_widget_show(image); @@ -1045,9 +1039,7 @@ // arguments item = gtk_image_menu_item_new_with_mnemonic(_("Set Arguments")); gtk_widget_show(item); - if (keys[GEANY_KEYS_BUILD_OPTIONS]->key) - gtk_widget_add_accelerator(item, "activate", accel_group, keys[GEANY_KEYS_BUILD_OPTIONS]->key, - keys[GEANY_KEYS_BUILD_OPTIONS]->mods, GTK_ACCEL_VISIBLE); + GEANY_ADD_WIDGET_ACCEL(GEANY_KEYS_BUILD_OPTIONS, item); gtk_container_add(GTK_CONTAINER(menu), item); gtk_tooltips_set_tip(tooltips, item, _("Sets the program paths and arguments"), NULL);
Modified: trunk/src/keybindings.c =================================================================== --- trunk/src/keybindings.c 2006-12-09 16:23:29 UTC (rev 1076) +++ trunk/src/keybindings.c 2006-12-09 17:03:03 UTC (rev 1077) @@ -65,6 +65,7 @@ static void cb_func_menu_findprevious(guint key_id); static void cb_func_menu_replace(guint key_id); static void cb_func_menu_findinfiles(guint key_id); +static void cb_func_menu_nextmessage(guint key_id); static void cb_func_menu_gotoline(guint key_id); static void cb_func_menu_opencolorchooser(guint key_id); static void cb_func_menu_fullscreen(guint key_id); @@ -136,6 +137,8 @@ GDK_e, GDK_CONTROL_MASK, "menu_replace", _("Replace")); keys[GEANY_KEYS_MENU_FINDINFILES] = fill(cb_func_menu_findinfiles, GDK_f, GDK_CONTROL_MASK | GDK_SHIFT_MASK, "menu_findinfiles", _("Find in files")); + keys[GEANY_KEYS_MENU_NEXTMESSAGE] = fill(cb_func_menu_nextmessage, + 0, 0, "menu_nextmessage", _("Next Message")); keys[GEANY_KEYS_MENU_GOTOLINE] = fill(cb_func_menu_gotoline, GDK_l, GDK_CONTROL_MASK, "menu_gotoline", _("Go to line")); keys[GEANY_KEYS_MENU_OPENCOLORCHOOSER] = fill(cb_func_menu_opencolorchooser, @@ -167,6 +170,8 @@ _("Make custom target")); keys[GEANY_KEYS_BUILD_MAKEOBJECT] = fill(cb_func_build_action, 0, 0, "build_makeobject", _("Make object")); + keys[GEANY_KEYS_BUILD_NEXTERROR] = fill(cb_func_build_action, + 0, 0, "build_nexterror", _("Next error")); keys[GEANY_KEYS_BUILD_RUN] = fill(cb_func_build_action, GDK_F5, 0, "build_run", _("Run")); keys[GEANY_KEYS_BUILD_RUN2] = fill(cb_func_build_action, @@ -283,6 +288,7 @@ GEANY_ADD_ACCEL(GEANY_KEYS_MENU_FINDPREVIOUS, find_previous1); GEANY_ADD_ACCEL(GEANY_KEYS_MENU_REPLACE, replace1); GEANY_ADD_ACCEL(GEANY_KEYS_MENU_FINDINFILES, find_in_files1); + GEANY_ADD_ACCEL(GEANY_KEYS_MENU_NEXTMESSAGE, next_message1); GEANY_ADD_ACCEL(GEANY_KEYS_MENU_GOTOLINE, go_to_line1); GEANY_ADD_ACCEL(GEANY_KEYS_MENU_FULLSCREEN, menu_fullscreen1); GEANY_ADD_ACCEL(GEANY_KEYS_MENU_MESSAGEWINDOW, menu_show_messages_window1); @@ -516,6 +522,11 @@ on_find_in_files1_activate(NULL, NULL); }
+static void cb_func_menu_nextmessage(guint key_id) +{ + on_next_message1_activate(NULL, NULL); +} + static void cb_func_menu_gotoline(G_GNUC_UNUSED guint key_id) { on_go_to_line1_activate(NULL, NULL); @@ -599,6 +610,10 @@ item = menu_items->item_make_object; break;
+ case GEANY_KEYS_BUILD_NEXTERROR: + item = menu_items->item_next_error; + break; + case GEANY_KEYS_BUILD_RUN: item = menu_items->item_exec; break;
Modified: trunk/src/keybindings.h =================================================================== --- trunk/src/keybindings.h 2006-12-09 16:23:29 UTC (rev 1076) +++ trunk/src/keybindings.h 2006-12-09 17:03:03 UTC (rev 1077) @@ -60,6 +60,7 @@ GEANY_KEYS_MENU_FINDPREVIOUS, GEANY_KEYS_MENU_REPLACE, GEANY_KEYS_MENU_FINDINFILES, + GEANY_KEYS_MENU_NEXTMESSAGE, GEANY_KEYS_MENU_GOTOLINE, GEANY_KEYS_MENU_OPENCOLORCHOOSER, GEANY_KEYS_MENU_FULLSCREEN, @@ -75,6 +76,7 @@ GEANY_KEYS_BUILD_MAKE, GEANY_KEYS_BUILD_MAKEOWNTARGET, GEANY_KEYS_BUILD_MAKEOBJECT, + GEANY_KEYS_BUILD_NEXTERROR, GEANY_KEYS_BUILD_RUN, GEANY_KEYS_BUILD_RUN2, GEANY_KEYS_BUILD_OPTIONS,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.