2008-04-25 [colin] 3.4.0cvs13
authorColin Leroy <colin@colino.net>
Fri, 25 Apr 2008 15:47:53 +0000 (15:47 +0000)
committerColin Leroy <colin@colino.net>
Fri, 25 Apr 2008 15:47:53 +0000 (15:47 +0000)
* src/summaryview.c
Fix bug 1586, '3-pane vertical layout now and then
still shows sender column'

ChangeLog
PATCHSETS
configure.ac
src/summaryview.c

index 683872b..c1280e7 100644 (file)
--- 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
index e6941f8..38f52cc 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( 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
index c418798..8b60cf9 100644 (file)
@@ -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=
 
index 94408b9..1638bf0 100644 (file)
@@ -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\n<span color='%s' style='italic'>From: %s, on %s</span>"),
-                               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\n<span color='%s' style='italic'>From: %s, on %s</span>"),
+                                       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\n<span color='%s' style='italic'>To: %s, on %s</span>"),
+                                       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