aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2008-05-07 06:30:47 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-05-07 06:30:47 +0800
commit68552ed22e3feeb63456d03d4c428b05d17a4c0b (patch)
tree3d34e91b83d45da584950184442afc03a63aec96
parent27a752e9c4a9ca419d08036feb066f6fe5e30b17 (diff)
downloadgsoc2013-evolution-68552ed22e3feeb63456d03d4c428b05d17a4c0b.tar.gz
gsoc2013-evolution-68552ed22e3feeb63456d03d4c428b05d17a4c0b.tar.zst
gsoc2013-evolution-68552ed22e3feeb63456d03d4c428b05d17a4c0b.zip
Use the GtkCellRendererText's "markup" property for error messages.
2008-05-06 Matthew Barnes <mbarnes@redhat.com> * mail-component.c (mail_component_show_logger): Use the GtkCellRendererText's "markup" property for error messages. svn path=/trunk/; revision=35473
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/mail-component.c28
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 <mbarnes@redhat.com>
+
+ * mail-component.c (mail_component_show_logger):
+ Use the GtkCellRendererText's "markup" property for error messages.
+
2008-05-05 Matthew Barnes <mbarnes@redhat.com>
** 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 (