SF.net SVN: geany: [1223] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Wed Jan 24 12:35:06 UTC 2007


Revision: 1223
          http://svn.sourceforge.net/geany/?rev=1223&view=rev
Author:   ntrel
Date:     2007-01-24 04:35:05 -0800 (Wed, 24 Jan 2007)

Log Message:
-----------
Setup Find Next/Previous to use the same search text after using
Find Selected/Prev Selected.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/callbacks.c
    trunk/src/search.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2007-01-23 17:51:30 UTC (rev 1222)
+++ trunk/ChangeLog	2007-01-24 12:35:05 UTC (rev 1223)
@@ -1,3 +1,10 @@
+2007-01-24  Nick Treleaven  <nick.treleaven at btinternet.com>
+
+ * src/callbacks.c, src/search.c:
+   Setup Find Next/Previous to use the same search text after using
+   Find Selected/Prev Selected.
+
+
 2007-01-23  Nick Treleaven  <nick.treleaven at btinternet.com>
 
  * src/interface.c, src/keybindings.c, src/keybindings.h,

Modified: trunk/src/callbacks.c
===================================================================
--- trunk/src/callbacks.c	2007-01-23 17:51:30 UTC (rev 1222)
+++ trunk/src/callbacks.c	2007-01-24 12:35:05 UTC (rev 1223)
@@ -567,11 +567,11 @@
 }
 
 
+// store text, clear search flags so we can use Search->Find Next/Previous
 static void setup_find_next(GtkEditable *editable)
 {
 	g_free(search_data.text);
-	search_data.text = g_strdup(gtk_editable_get_chars(editable, 0, -1));
-	// clear search flags so can later use Search->Find Next/Previous
+	search_data.text = gtk_editable_get_chars(editable, 0, -1);
 	search_data.flags = 0;
 	search_data.backwards = FALSE;
 }

Modified: trunk/src/search.c
===================================================================
--- trunk/src/search.c	2007-01-23 17:51:30 UTC (rev 1222)
+++ trunk/src/search.c	2007-01-24 12:35:05 UTC (rev 1223)
@@ -240,6 +240,16 @@
 }
 
 
+// store text, clear search flags so we can use Search->Find Next/Previous
+static void setup_find_next(const gchar *text)
+{
+	g_free(search_data.text);
+	search_data.text = g_strdup(text);
+	search_data.flags = 0;
+	search_data.backwards = FALSE;
+}
+
+
 /* Search for next match of the current "selection"
  * For X11 based systems, this will try to use the system-wide
  * x-selection first. If it doesn't find anything suitable in
@@ -267,6 +277,7 @@
 	if (!s)	{ s=get_default_text(idx); }
 	if (s)
 	{
+		setup_find_next(s);	// allow find next/prev
 		document_find_text(idx, s, 0, search_backwards, TRUE);
 		g_free(s);
 	}


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