X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fwidgets%2Fmodest-header-view-render.c;h=fcbe01beba1b43fbf6ff1b440b05b385eda557ae;hb=59b14198e1f8d28945cd7966a66e17122907094e;hp=9b030939eed9e85fde6b528d57d548b6b4bd5afb;hpb=c870f4dab06bcfbafd3be3b57ad510ce925fc080;p=modest diff --git a/src/widgets/modest-header-view-render.c b/src/widgets/modest-header-view-render.c index 9b03093..fcbe01b 100644 --- a/src/widgets/modest-header-view-render.c +++ b/src/widgets/modest-header-view-render.c @@ -199,9 +199,17 @@ _modest_header_view_date_cell_data (GtkTreeViewColumn *column, GtkCellRenderer TNY_GTK_HEADER_LIST_MODEL_FLAGS_COLUMN, &flags, date_col, &date, -1); - - set_cell_text (renderer, modest_text_utils_get_display_date (date), + +#if GTK_CHECK_VERSION (2, 12, 0) + ModestHeaderView *header_view; + header_view = MODEST_HEADER_VIEW (gtk_tree_view_column_get_tree_view (column)); + set_cell_text (renderer, + _modest_header_view_get_display_date (header_view, date), flags, RENDER_CELL_STYLE_DEFAULT); +#else + set_cell_text (renderer, modest_text_utils_get_display_date (date), + flags, RENDER_CELL_STYLE_DEFAULT); +#endif } void @@ -226,7 +234,9 @@ _modest_header_view_sender_receiver_cell_data (GtkTreeViewColumn *column, -1); modest_text_utils_get_display_address (address); /* string is changed in-place */ - set_cell_text (renderer, address, flags, RENDER_CELL_STYLE_DEFAULT); + + set_cell_text (renderer, (address && address[0] != '\0')?address:_("mail_va_no_to"), + flags, RENDER_CELL_STYLE_DEFAULT); g_free (address); } /* @@ -322,7 +332,7 @@ _modest_header_view_compact_header_cell_data (GtkTreeViewColumn *column, GtkCe /* FIXME: we hardcode the color to #666666; instead we should use SecondaryTextColour from the * theme (gtkrc file) */ modest_text_utils_get_display_address (address); /* changed in-place */ - set_cell_text (recipient_cell, address, flags, RENDER_CELL_STYLE_GREY); + set_cell_text (recipient_cell, (address && address[0] != '\0')?address:_("mail_va_no_to"), flags, RENDER_CELL_STYLE_GREY); g_free (address); if (header_mode == MODEST_HEADER_VIEW_COMPACT_HEADER_MODE_OUTBOX) { @@ -337,11 +347,19 @@ _modest_header_view_compact_header_cell_data (GtkTreeViewColumn *column, GtkCe status_str = get_status_string (status); set_cell_text (date_or_status_cell, status_str, flags, RENDER_CELL_STYLE_GREY); - } else { - set_cell_text (date_or_status_cell, date ? modest_text_utils_get_display_date (date) : "", + } else { +#if GTK_CHECK_VERSION (2, 12, 0) + ModestHeaderView *header_view; + header_view = MODEST_HEADER_VIEW (gtk_tree_view_column_get_tree_view (column)); + set_cell_text (date_or_status_cell, + date ? _modest_header_view_get_display_date (header_view, date) : "", flags, RENDER_CELL_STYLE_GREY); +#else + set_cell_text (date_or_status_cell, + date ? modest_text_utils_get_display_date (date) : "", + flags, RENDER_CELL_STYLE_GREY); +#endif } - if (msg_header != NULL) g_object_unref (msg_header); }