gtk+ r19464 - in trunk: . gtk
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r19464 - in trunk: . gtk
- Date: Tue, 5 Feb 2008 18:35:54 +0000 (GMT)
Author: matthiasc
Date: Tue Feb 5 18:35:54 2008
New Revision: 19464
URL: http://svn.gnome.org/viewvc/gtk+?rev=19464&view=rev
Log:
2008-02-05 Matthias Clasen <mclasen redhat com>
* gtk/updateiconcache.c: Install a printerr handler that
prepends the program name, since gtk-update-icon-cache output
often appears in the middle of other output, e.g. rpm update logs.
Modified:
trunk/ChangeLog
trunk/gtk/updateiconcache.c
Modified: trunk/gtk/updateiconcache.c
==============================================================================
--- trunk/gtk/updateiconcache.c (original)
+++ trunk/gtk/updateiconcache.c Tue Feb 5 18:35:54 2008
@@ -1575,6 +1575,26 @@
{ NULL }
};
+static void
+printerr_handler (const gchar *string)
+{
+ const gchar *charset;
+
+ fputs (g_get_prgname (), stderr);
+ fputs (": ", stderr);
+ if (g_get_charset (&charset))
+ fputs (string, stderr); /* charset is UTF-8 already */
+ else
+ {
+ gchar *lstring = strdup_convert (string, charset);
+ fputs (lstring, stderr);
+ g_free (lstring);
+
+ fflush (stderr);
+ }
+}
+
+
int
main (int argc, char **argv)
{
@@ -1583,6 +1603,8 @@
if (argc < 2)
return 0;
+
+ g_set_printerr_handler (printerr_handler);
setlocale (LC_ALL, "");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]