Kaydet (Commit) 4b85d71e authored tarafından Nick Treleaven's avatar Nick Treleaven

Give accurate message on finishing finding in files

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@556 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 52e23769
2006-07-14 Nick Treleaven <nick.treleaven@btinternet.com>
* src/search.c: Give accurate message on finishing finding in files.
2006-07-14 Enrico Tröger <enrico.troeger@uvena.de>
* src/filetypes.c, src/highlighting.c, tagmanager/tm_tag.c,
......
......@@ -188,24 +188,19 @@ static gboolean search_read_io (GIOChannel *source,
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;
}
else if (WIFSIGNALED(status))
{
// the terminating signal: WTERMSIG (status));
failure = TRUE;
}
else
{ // any other failure occured
failure = TRUE;
switch (WEXITSTATUS(status))
{
case 0: msg = _("Search completed."); break;
case 1: msg = _("No matches found."); break;
default: break;
}
}
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment