From 68552ed22e3feeb63456d03d4c428b05d17a4c0b Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 6 May 2008 22:30:47 +0000 Subject: Use the GtkCellRendererText's "markup" property for error messages. 2008-05-06 Matthew Barnes * mail-component.c (mail_component_show_logger): Use the GtkCellRendererText's "markup" property for error messages. svn path=/trunk/; revision=35473 --- mail/ChangeLog | 5 +++++ mail/mail-component.c | 28 +++++++++------------------- 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index bdff98881a..a2a0b7e318 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,8 @@ +2008-05-06 Matthew Barnes + + * mail-component.c (mail_component_show_logger): + Use the GtkCellRendererText's "markup" property for error messages. + 2008-05-05 Matthew Barnes ** Fixes bug #531426 diff --git a/mail/mail-component.c b/mail/mail-component.c index 8e96477c84..7c83872314 100644 --- a/mail/mail-component.c +++ b/mail/mail-component.c @@ -1615,29 +1615,19 @@ append_logs (const char *txt, GtkListStore *store) str = g_strsplit (txt, ":", 3); if (str[0] && str[1] && str[2]) { - int level; - time_t time; - char *data; GtkTreeIter iter; - level = atoi (str[0]); - time = atol (str[1]); - data = strrchr (str[2], '\n'); - *data = 0; - data = str[2]; - - gtk_list_store_append(store, &iter); - gtk_list_store_set(store, &iter, - COL_LEVEL, level, - COL_TIME, time, - COL_DATA, data, - -1); + gtk_list_store_append (store, &iter); + gtk_list_store_set ( + store, &iter, + COL_LEVEL, atoi (str[0]), + COL_TIME, atol (str[1]), + COL_DATA, g_strstrip (str[2]), + -1); } else - printf("Unable to decode error log: %s\n", txt); + g_printerr ("Unable to decode error log: %s\n", txt); g_strfreev (str); - - } static void @@ -1768,7 +1758,7 @@ mail_component_show_logger (gpointer top) renderer = gtk_cell_renderer_text_new (); gtk_tree_view_insert_column_with_attributes( GTK_TREE_VIEW (widget), -1, _("Messages"), - renderer, "text", COL_DATA, NULL); + renderer, "markup", COL_DATA, NULL); container = gtk_hbutton_box_new (); gtk_button_box_set_layout ( -- cgit v1.2.3