SF.net SVN: geany: [556] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Fri Jul 14 15:50:34 UTC 2006


Revision: 556
Author:   ntrel
Date:     2006-07-14 08:50:29 -0700 (Fri, 14 Jul 2006)
ViewCVS:  http://svn.sourceforge.net/geany/?rev=556&view=rev

Log Message:
-----------
Give accurate message on finishing finding in files

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/search.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-07-14 13:47:03 UTC (rev 555)
+++ trunk/ChangeLog	2006-07-14 15:50:29 UTC (rev 556)
@@ -1,3 +1,8 @@
+2006-07-14  Nick Treleaven  <nick.treleaven at btinternet.com>
+
+ * src/search.c: Give accurate message on finishing finding in files.
+
+
 2006-07-14  Enrico Tröger  <enrico.troeger at uvena.de>
 
  * src/filetypes.c, src/highlighting.c, tagmanager/tm_tag.c,

Modified: trunk/src/search.c
===================================================================
--- trunk/src/search.c	2006-07-14 13:47:03 UTC (rev 555)
+++ trunk/src/search.c	2006-07-14 15:50:29 UTC (rev 556)
@@ -188,24 +188,19 @@
 static void search_close_pid(GPid child_pid, gint status, gpointer user_data)
 {
 #ifdef G_OS_UNIX
-	gboolean failure = FALSE;
+	gchar *msg = _("Search failed.");
 
 	if (WIFEXITED(status))
 	{
-		if (WEXITSTATUS(status) != EXIT_SUCCESS)
-			failure = TRUE;
+		switch (WEXITSTATUS(status))
+		{
+			case 0: msg = _("Search completed."); break;
+			case 1: msg = _("No matches found."); break;
+			default: break;
+		}
 	}
-	else if (WIFSIGNALED(status))
-	{
-		// the terminating signal: WTERMSIG (status));
-		failure = TRUE;
-	}
-	else
-	{	// any other failure occured
-		failure = TRUE;
-	}
 
-	msgwin_msg_add(-1, -1, (failure) ? _("Search failed.") : _("Search completed."));
+	msgwin_msg_add(-1, -1, msg);
 #endif
 	utils_beep();
 	g_spawn_close_pid(child_pid);


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