From 39b7d49b0dbd7aa014484153e79380a0fcb28fb7 Mon Sep 17 00:00:00 2001 From: Colin Leroy Date: Fri, 25 Apr 2008 15:47:53 +0000 Subject: [PATCH] 2008-04-25 [colin] 3.4.0cvs13 * src/summaryview.c Fix bug 1586, '3-pane vertical layout now and then still shows sender column' --- ChangeLog | 6 ++++++ PATCHSETS | 1 + configure.ac | 2 +- src/summaryview.c | 32 +++++++++++++++++++++----------- 4 files changed, 29 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 683872b91..c1280e7d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-04-25 [colin] 3.4.0cvs13 + + * src/summaryview.c + Fix bug 1586, '3-pane vertical layout now and then + still shows sender column' + 2008-04-25 [colin] 3.4.0cvs12 * src/Makefile.am diff --git a/PATCHSETS b/PATCHSETS index e6941f837..38f52cc4d 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -3308,3 +3308,4 @@ ( cvs diff -u -r 1.204.2.166 -r 1.204.2.167 src/prefs_common.c; ) > 3.4.0cvs10.patchset ( cvs diff -u -r 1.149.2.89 -r 1.149.2.90 src/inc.c; cvs diff -u -r 1.29.2.13 -r 1.29.2.14 src/inc.h; cvs diff -u -r 1.12.2.15 -r 1.12.2.16 src/ldif.c; cvs diff -u -r 1.5.2.6 -r 1.5.2.7 src/ldif.h; ) > 3.4.0cvs11.patchset ( cvs diff -u -r 1.155.2.84 -r 1.155.2.85 src/Makefile.am; diff -u /dev/null src/w32-logo.ico; diff -u /dev/null src/w32-resource.rc; ) > 3.4.0cvs12.patchset +( cvs diff -u -r 1.395.2.365 -r 1.395.2.366 src/summaryview.c; ) > 3.4.0cvs13.patchset diff --git a/configure.ac b/configure.ac index c41879827..8b60cf93b 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=4 MICRO_VERSION=0 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=12 +EXTRA_VERSION=13 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/summaryview.c b/src/summaryview.c index 94408b943..1638bf03a 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -1024,9 +1024,9 @@ void summary_init(SummaryView *summaryview) && (!g_ascii_strcasecmp(m->folder->name,item->name)) ) #define FOLDER_SHOWS_TO_HDR(i) \ -( folder_has_parent_of_type(i, F_OUTBOX) \ - || folder_has_parent_of_type(i, F_DRAFT) \ - || folder_has_parent_of_type(i, F_QUEUE) ) +( i && (folder_has_parent_of_type(i, F_OUTBOX) \ + || folder_has_parent_of_type(i, F_DRAFT) \ + || folder_has_parent_of_type(i, F_QUEUE)) ) static void summary_switch_from_to(SummaryView *summaryview, FolderItem *item) { @@ -1036,7 +1036,7 @@ static void summary_switch_from_to(SummaryView *summaryview, FolderItem *item) SummaryColumnState *col_state = summaryview->col_state; GtkCTree *ctree = GTK_CTREE(summaryview->ctree); - if (!item) + if (!item || (prefs_common.layout_mode == VERTICAL_LAYOUT && prefs_common.two_line_vert) ) return; if (FOLDER_SHOWS_TO_HDR(item)) show_to = TRUE; @@ -3242,12 +3242,21 @@ static inline void summary_set_header(SummaryView *summaryview, gchar *text[], text[col_pos[S_COL_SUBJECT]] = msginfo->subject ? msginfo->subject : _("(No Subject)"); if (vert && prefs_common.two_line_vert) { - gchar *tmp = g_markup_printf_escaped(_("%s\nFrom: %s, on %s"), - text[col_pos[S_COL_SUBJECT]], - color_dim_rgb, - text[col_pos[S_COL_FROM]], - text[col_pos[S_COL_DATE]]); - text[col_pos[S_COL_SUBJECT]] = tmp; + if (!FOLDER_SHOWS_TO_HDR(summaryview->folder_item)) { + gchar *tmp = g_markup_printf_escaped(_("%s\nFrom: %s, on %s"), + text[col_pos[S_COL_SUBJECT]], + color_dim_rgb, + text[col_pos[S_COL_FROM]], + text[col_pos[S_COL_DATE]]); + text[col_pos[S_COL_SUBJECT]] = tmp; + } else { + gchar *tmp = g_markup_printf_escaped(_("%s\nTo: %s, on %s"), + text[col_pos[S_COL_SUBJECT]], + color_dim_rgb, + text[col_pos[S_COL_TO]], + text[col_pos[S_COL_DATE]]); + text[col_pos[S_COL_SUBJECT]] = tmp; + } } } @@ -6071,7 +6080,8 @@ static GtkWidget *summary_ctree_create(SummaryView *summaryview) for (pos = 0; pos < N_SUMMARY_COLS; pos++) { GTK_WIDGET_UNSET_FLAGS(GTK_CLIST(ctree)->column[pos].button, GTK_CAN_FOCUS); - if ((pos == summaryview->col_pos[S_COL_FROM] || + if (((pos == summaryview->col_pos[S_COL_FROM] && !FOLDER_SHOWS_TO_HDR(summaryview->folder_item)) || + (pos == summaryview->col_pos[S_COL_TO] && FOLDER_SHOWS_TO_HDR(summaryview->folder_item)) || pos == summaryview->col_pos[S_COL_DATE]) && vert && prefs_common.two_line_vert) gtk_clist_set_column_visibility -- 2.25.1