aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2009-04-21 05:24:40 +0800
committerJonny Lamb <jonny.lamb@collabora.co.uk>2009-04-24 08:52:49 +0800
commit0dce56f5fccdb09c42a66823986f5b13ba2e4704 (patch)
treeab5dd824c473e6a32d6cb1de8bbc625a1e11beac
parent37b7480c83cae6bc8bb818c1a0d6ba77ead968eb (diff)
downloadgsoc2013-empathy-0dce56f5fccdb09c42a66823986f5b13ba2e4704.tar
gsoc2013-empathy-0dce56f5fccdb09c42a66823986f5b13ba2e4704.tar.gz
gsoc2013-empathy-0dce56f5fccdb09c42a66823986f5b13ba2e4704.tar.bz2
gsoc2013-empathy-0dce56f5fccdb09c42a66823986f5b13ba2e4704.tar.lz
gsoc2013-empathy-0dce56f5fccdb09c42a66823986f5b13ba2e4704.tar.xz
gsoc2013-empathy-0dce56f5fccdb09c42a66823986f5b13ba2e4704.tar.zst
gsoc2013-empathy-0dce56f5fccdb09c42a66823986f5b13ba2e4704.zip
Remove trailing whitespace from the debug message.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
-rw-r--r--src/empathy-debug-dialog.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/empathy-debug-dialog.c b/src/empathy-debug-dialog.c
index b700be73a..f5fcd6428 100644
--- a/src/empathy-debug-dialog.c
+++ b/src/empathy-debug-dialog.c
@@ -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);
}