gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r5542 - gnunet-gtk/src/common


From: gnunet
Subject: [GNUnet-SVN] r5542 - gnunet-gtk/src/common
Date: Sat, 25 Aug 2007 04:24:58 -0600 (MDT)

Author: grothoff
Date: 2007-08-25 04:24:53 -0600 (Sat, 25 Aug 2007)
New Revision: 5542

Modified:
   gnunet-gtk/src/common/logging.c
Log:
handle newline


Modified: gnunet-gtk/src/common/logging.c
===================================================================
--- gnunet-gtk/src/common/logging.c     2007-08-25 08:54:23 UTC (rev 5541)
+++ gnunet-gtk/src/common/logging.c     2007-08-25 10:24:53 UTC (rev 5542)
@@ -126,6 +126,7 @@
   static GtkWidget *s = NULL;
   static int once = 1;
   static guint id;
+  char * val;
 
   init ();
   if (once)
@@ -136,7 +137,11 @@
     }
   else
     gtk_statusbar_pop (GTK_STATUSBAR (s), id);
-  gtk_statusbar_push (GTK_STATUSBAR (s), id, (const char *) args);
+  val = STRDUP((const char*) args);
+  if (strstr(val, "\n") != NULL)
+    strstr(val, "\n")[0] = '\0';
+  gtk_statusbar_push (GTK_STATUSBAR (s), id, val);
+  FREE(val);
   return NULL;
 }
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]