SF.net SVN: geany: [1593] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Sun Jun 3 16:03:46 UTC 2007


Revision: 1593
          http://svn.sourceforge.net/geany/?rev=1593&view=rev
Author:   eht16
Date:     2007-06-03 09:03:46 -0700 (Sun, 03 Jun 2007)

Log Message:
-----------
Add keybindings for forward/back code navigation.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/doc/geany.docbook
    trunk/src/keybindings.c
    trunk/src/keybindings.h

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2007-06-03 08:04:18 UTC (rev 1592)
+++ trunk/ChangeLog	2007-06-03 16:03:46 UTC (rev 1593)
@@ -1,3 +1,18 @@
+2007-06-03  Enrico Tröger  <enrico.troeger at uvena.de>
+
+ * doc/geany.docbook, src/keybindings.c, src/keybindings.h:
+   Add keybindings for forward/back code navigation.
+
+
+2007-06-02  Enrico Tröger  <enrico.troeger at uvena.de>
+
+ * geany.glade, src/callbacks.c, src/callbacks.h, src/geany.h,
+   src/interface.c, src/keyfile.c, src/main.c, src/Makefile.am,
+   src/navqueue.h, src/navqueue.c, src/prefs.c, src/ui_utils.c:
+   Applied patch from Dave Moore to add simple code navigation
+   (thank you).
+
+
 2007-05-31  Enrico Tröger  <enrico.troeger at uvena.de>
 
  * src/templates.c: Add Haskell to make_comment_block().

Modified: trunk/doc/geany.docbook
===================================================================
--- trunk/doc/geany.docbook	2007-06-03 08:04:18 UTC (rev 1592)
+++ trunk/doc/geany.docbook	2007-06-03 16:03:46 UTC (rev 1593)
@@ -1729,6 +1729,14 @@
 								<entry>Switches to the previously selected open document.</entry>
 							</row>
 							<row>
+								<entry>Navigate forward a location</entry>
+								<entry>Switches to the next location in the navigation history.</entry>
+							</row>
+							<row>
+								<entry>Navigate back a location</entry>
+								<entry>Switches to the previous location in the navigation history.</entry>
+							</row>
+							<row>
 								<entry align="left" spanname="hspan">Editing operations</entry>
 							</row>
 							<row>

Modified: trunk/src/keybindings.c
===================================================================
--- trunk/src/keybindings.c	2007-06-03 08:04:18 UTC (rev 1592)
+++ trunk/src/keybindings.c	2007-06-03 16:03:46 UTC (rev 1593)
@@ -40,6 +40,7 @@
 #include "sciwrappers.h"
 #include "build.h"
 #include "tools.h"
+#include "navqueue.h"
 // include vte.h on non-Win32 systems, else define fake vte_init
 #ifdef HAVE_VTE
 # include "vte.h"
@@ -94,6 +95,8 @@
 static void cb_func_switch_tableft(guint key_id);
 static void cb_func_switch_tabright(guint key_id);
 static void cb_func_switch_tablastused(guint key_id);
+static void cb_func_nav_back(guint key_id);
+static void cb_func_nav_forward(guint key_id);
 static void cb_func_toggle_sidebar(guint key_id);
 
 // common function for editing keybindings, only valid when scintilla has focus.
@@ -230,6 +233,10 @@
 		GDK_Page_Down, GDK_CONTROL_MASK, "switch_tabright", _("Switch to right document"));
 	keys[GEANY_KEYS_SWITCH_TABLASTUSED] = fill(cb_func_switch_tablastused,
 		GDK_Tab, GDK_CONTROL_MASK, "switch_tablastused", _("Switch to last used document"));
+	keys[GEANY_KEYS_NAV_BACK] = fill(cb_func_nav_back,
+		0, 0, "nav_back", _("Navigate back a location"));
+	keys[GEANY_KEYS_NAV_FORWARD] = fill(cb_func_nav_forward,
+		0, 0, "nav_forward", _("Navigate forward a location"));
 
 	keys[GEANY_KEYS_EDIT_DUPLICATELINE] = fill(cb_func_edit,
 		GDK_d, GDK_CONTROL_MASK, "edit_duplicateline", _("Duplicate line or selection"));
@@ -1154,3 +1161,12 @@
 	on_menu_insert_special_chars1_activate(NULL, NULL);
 }
 
+static void cb_func_nav_back(G_GNUC_UNUSED guint key_id)
+{
+	navqueue_go_back();
+}
+
+static void cb_func_nav_forward(G_GNUC_UNUSED guint key_id)
+{
+	navqueue_go_forward();
+}

Modified: trunk/src/keybindings.h
===================================================================
--- trunk/src/keybindings.h	2007-06-03 08:04:18 UTC (rev 1592)
+++ trunk/src/keybindings.h	2007-06-03 16:03:46 UTC (rev 1593)
@@ -32,7 +32,7 @@
 {
 	guint key;
 	GdkModifierType mods;
-	// at the moment only needed as keys for the configuration file because indices or tranlatable
+	// at the moment only needed as keys for the configuration file because indices or translatable
 	// strings as keys are not very useful
 	const gchar *name;
 	const gchar *label;
@@ -107,6 +107,8 @@
 	GEANY_KEYS_SWITCH_TABLEFT,
 	GEANY_KEYS_SWITCH_TABRIGHT,
 	GEANY_KEYS_SWITCH_TABLASTUSED,
+	GEANY_KEYS_NAV_FORWARD,
+	GEANY_KEYS_NAV_BACK,
 
 	GEANY_KEYS_EDIT_TOLOWERCASE,
 	GEANY_KEYS_EDIT_TOUPPERCASE,


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list