SF.net SVN: geany:[3253] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Wed Nov 19 17:31:55 UTC 2008
Revision: 3253
http://geany.svn.sourceforge.net/geany/?rev=3253&view=rev
Author: eht16
Date: 2008-11-19 17:31:54 +0000 (Wed, 19 Nov 2008)
Log Message:
-----------
Rework search_close_pid() and let it handle the case when the grep command was killed externally.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/search.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-11-18 23:12:23 UTC (rev 3252)
+++ trunk/ChangeLog 2008-11-19 17:31:54 UTC (rev 3253)
@@ -1,3 +1,10 @@
+2008-11-19 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+
+ * src/search.c:
+ Rework search_close_pid() and let it handle the case when the grep
+ command was killed externally.
+
+
2008-11-18 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/notebook.c:
Modified: trunk/src/search.c
===================================================================
--- trunk/src/search.c 2008-11-18 23:12:23 UTC (rev 3252)
+++ trunk/src/search.c 2008-11-19 17:31:54 UTC (rev 3253)
@@ -1428,34 +1428,39 @@
#ifdef G_OS_UNIX
const gchar *msg = _("Search failed (see Help->Debug Messages for details).");
gint color = COLOR_DARK_RED;
+ gint exit_status = 1;
if (WIFEXITED(status))
{
- switch (WEXITSTATUS(status))
+ exit_status = WEXITSTATUS(status);
+ }
+ else if (WIFSIGNALED(status))
+ {
+ exit_status = -1;
+ g_warning("Find in Files: The command failed unexpectedly (signal received).");
+ }
+
+ switch (exit_status)
+ {
+ case 0:
{
- case 0:
- {
- gint count = gtk_tree_model_iter_n_children(
- GTK_TREE_MODEL(msgwindow.store_msg), NULL) - 1;
+ gint count = gtk_tree_model_iter_n_children(
+ GTK_TREE_MODEL(msgwindow.store_msg), NULL) - 1;
+ gchar *text = ngettext(
+ "Search completed with %d match.",
+ "Search completed with %d matches.", count);
- msgwin_msg_add_fmt(COLOR_BLUE, -1, NULL,
- ngettext("Search completed with %d match.",
- "Search completed with %d matches.", count),
- count);
- ui_set_statusbar(FALSE,
- ngettext("Search completed with %d match.",
- "Search completed with %d matches.", count),
- count);
- break;
- }
- case 1:
- msg = _("No matches found.");
- color = COLOR_BLUE;
- default:
- msgwin_msg_add(color, -1, NULL, msg);
- ui_set_statusbar(FALSE, "%s", msg);
- break;
+ msgwin_msg_add_fmt(COLOR_BLUE, -1, NULL, text, count);
+ ui_set_statusbar(FALSE, text, count);
+ break;
}
+ case 1:
+ msg = _("No matches found.");
+ color = COLOR_BLUE;
+ default:
+ msgwin_msg_add(color, -1, NULL, msg);
+ ui_set_statusbar(FALSE, "%s", msg);
+ break;
}
#endif
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