]> git.0d.be Git - empathy.git/commitdiff
Remove trailing whitespace from the debug message.
authorJonny Lamb <jonny.lamb@collabora.co.uk>
Mon, 20 Apr 2009 21:24:40 +0000 (22:24 +0100)
committerJonny Lamb <jonny.lamb@collabora.co.uk>
Fri, 24 Apr 2009 00:52:49 +0000 (01:52 +0100)
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
src/empathy-debug-dialog.c

index b700be73a6d84153f016927cbcd28b5732d1c215..f5fcd6428e9ee25a9785e046fbe77ee2f910578d 100644 (file)
@@ -117,6 +117,7 @@ debug_dialog_add_message (EmpathyDebugDialog *debug_dialog,
   EmpathyDebugDialogPriv *priv = GET_PRIV (debug_dialog);
   gchar *domain, *category;
   GtkTreeIter iter;
+  gchar *string;
 
   if (g_strrstr (domain_category, "/"))
     {
@@ -131,15 +132,22 @@ debug_dialog_add_message (EmpathyDebugDialog *debug_dialog,
       category = g_strdup ("");
     }
 
+  if (g_str_has_suffix (message, "\n"))
+    string = g_strchomp (g_strdup (message));
+  else
+    string = g_strdup (message);
+
+
   gtk_list_store_append (priv->store, &iter);
   gtk_list_store_set (priv->store, &iter,
       COL_TIMESTAMP, timestamp,
       COL_DOMAIN, domain,
       COL_CATEGORY, category,
       COL_LEVEL, log_level_to_string (level),
-      COL_MESSAGE, message,
+      COL_MESSAGE, string,
       -1);
 
+  g_free (string);
   g_free (domain);
   g_free (category);
 }