SF.net SVN: geany: [630] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Tue Jul 25 13:14:58 UTC 2006


Revision: 630
Author:   eht16
Date:     2006-07-25 06:14:51 -0700 (Tue, 25 Jul 2006)
ViewCVS:  http://svn.sourceforge.net/geany/?rev=630&view=rev

Log Message:
-----------
Fixed broken Find usage.
Put "No matches" message also in the message window.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/callbacks.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-07-25 12:46:08 UTC (rev 629)
+++ trunk/ChangeLog	2006-07-25 13:14:51 UTC (rev 630)
@@ -9,6 +9,9 @@
    Added simple wrapper function win32_open_browser().
  * src/dialogs.c, src/main.c, src/document.c, src/callbacks.c:
    Removed some unneeded functions to avoid duplicate code.
+ * src/callbacks.c:
+   Fixed broken Find usage.
+   Put "No matches" message also in the message window.
 
 
 2006-07-24  Enrico Tröger  <enrico.troeger at uvena.de>

Modified: trunk/src/callbacks.c
===================================================================
--- trunk/src/callbacks.c	2006-07-25 12:46:08 UTC (rev 629)
+++ trunk/src/callbacks.c	2006-07-25 13:14:51 UTC (rev 630)
@@ -1358,8 +1358,7 @@
 		{
 			ttf.chrg.cpMin = 0;
 			ttf.chrg.cpMax = sci_get_length(doc_list[i].sci);
-			ttf.lpstrText = g_malloc(sizeof search_text);
-			strncpy(ttf.lpstrText, search_text, sizeof search_text);
+			ttf.lpstrText = search_text;
 			while (1)
 			{
 				pos = sci_find_text(doc_list[i].sci, flags, &ttf);
@@ -1381,11 +1380,15 @@
 				g_free(string);
 				ttf.chrg.cpMin = ttf.chrgText.cpMax + 1;
 			}
-			g_free(ttf.lpstrText);
 		}
 	}
 	if (line == -1) // no matches were found (searching from unnamed file)
-		msgwin_status_add(_("No matches found for '%s'."), search_text);
+	{
+		gchar *text = g_strdup_printf(_("No matches found for '%s'."), search_text);
+		msgwin_status_add(text);
+		msgwin_msg_add(-1, -1, text);
+		g_free(text);
+	}
 
 	g_free(search_text);
 }


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