SF.net SVN: geany: [761] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Wed Aug 23 18:08:56 UTC 2006


Revision: 761
Author:   eht16
Date:     2006-08-23 11:08:48 -0700 (Wed, 23 Aug 2006)
ViewCVS:  http://svn.sourceforge.net/geany/?rev=761&view=rev

Log Message:
-----------
Added counter when using "Replace All" and display the count of replacements in the status window.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/document.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-08-23 16:51:36 UTC (rev 760)
+++ trunk/ChangeLog	2006-08-23 18:08:48 UTC (rev 761)
@@ -5,6 +5,8 @@
    Improved ignore menu bar accelerator settings.
    Keep current working directory when restarting the VTE
    (happens when hitting Ctrl+C).
+ * src/document.c: Added counter when using "Replace All" and display
+                   the count of replacements in the status window.
 
 
 2006-08-23  Frank Lanitz  <frank at frank.uvena.de>

Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c	2006-08-23 16:51:36 UTC (rev 760)
+++ trunk/src/document.c	2006-08-23 18:08:48 UTC (rev 761)
@@ -928,6 +928,7 @@
 	gint flags, gint start, gint end)
 {
 	gint search_pos;
+	gint count = 0;
 	gint find_len = 0, replace_len = 0;
 	gboolean match_found = FALSE;
 	struct TextToFind ttf;
@@ -958,9 +959,12 @@
 			ttf.chrg.cpMin = search_pos + replace_len; //next search starts after replacement
 			end += replace_len - find_len; //update end of range now text has changed
 			ttf.chrg.cpMax = end;
+			count++;
 		}
 	}
 	sci_end_undo_action(doc_list[idx].sci);
+	msgwin_status_add(_("Replaced %d occurrences of \"%s\" with \"%s\"."),
+						count, find_text, replace_text);
 
 	if (match_found)
 	{


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