aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2007-08-25 10:24:53 +0000
committerChristian Grothoff <christian@grothoff.org>2007-08-25 10:24:53 +0000
commitd72a299c6306f23daff42f04eb5f22ccd605c2ea (patch)
treeeef8468b70fc0b47f60cd983cafaf3cfd6876c9b
parent3c60805e9e6a363f7dbfd8b2160fb38b0deb7b73 (diff)
downloadgnunet-gtk-d72a299c6306f23daff42f04eb5f22ccd605c2ea.tar.gz
gnunet-gtk-d72a299c6306f23daff42f04eb5f22ccd605c2ea.zip
handle newline
-rw-r--r--src/common/logging.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/common/logging.c b/src/common/logging.c
index 93c6833c..25d69b10 100644
--- a/src/common/logging.c
+++ b/src/common/logging.c
@@ -126,6 +126,7 @@ saveAddLogEntry (void *args)
126 static GtkWidget *s = NULL; 126 static GtkWidget *s = NULL;
127 static int once = 1; 127 static int once = 1;
128 static guint id; 128 static guint id;
129 char * val;
129 130
130 init (); 131 init ();
131 if (once) 132 if (once)
@@ -136,7 +137,11 @@ saveAddLogEntry (void *args)
136 } 137 }
137 else 138 else
138 gtk_statusbar_pop (GTK_STATUSBAR (s), id); 139 gtk_statusbar_pop (GTK_STATUSBAR (s), id);
139 gtk_statusbar_push (GTK_STATUSBAR (s), id, (const char *) args); 140 val = STRDUP((const char*) args);
141 if (strstr(val, "\n") != NULL)
142 strstr(val, "\n")[0] = '\0';
143 gtk_statusbar_push (GTK_STATUSBAR (s), id, val);
144 FREE(val);
140 return NULL; 145 return NULL;
141} 146}
142 147