2013-02-22 [colin] 3.9.0cvs100
authorColin Leroy <colin@colino.net>
Fri, 22 Feb 2013 11:23:43 +0000 (11:23 +0000)
committerColin Leroy <colin@colino.net>
Fri, 22 Feb 2013 11:23:43 +0000 (11:23 +0000)
* AUTHORS
* src/gtk/authors.h
* src/summaryview.c
Fix bug #2702, "Support splitting subject line for small screen
layout". Patch by Ben Deering.

AUTHORS
ChangeLog
PATCHSETS
configure.ac
src/gtk/authors.h
src/summaryview.c

diff --git a/AUTHORS b/AUTHORS
index 57b979c..f0f5e19 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -294,3 +294,4 @@ contributors (in addition to the above; based on Changelog)
        Igor Mammedov
        Abhay S. Kushwaha
        Christian Hesse
+       Ben Deering
index 0945fed..ce4b230 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-02-22 [colin]     3.9.0cvs100
+
+       * AUTHORS
+       * src/gtk/authors.h
+       * src/summaryview.c
+               Fix bug #2702, "Support splitting subject line for small screen
+               layout". Patch by Ben Deering.
+
 2013-02-21 [paul]      3.9.0cvs99
 
        * configure.ac
index 58088c2..7ce893b 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/plugins/att_remover/claws.def;  cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/plugins/fetchinfo/claws.def;  cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/plugins/spam_report/claws.def;  ) > 3.9.0cvs97.patchset
 ( cvs diff -u -r 1.115.2.268 -r 1.115.2.269 src/main.c;  ) > 3.9.0cvs98.patchset
 ( cvs diff -u -r 1.654.2.4675 -r 1.654.2.4676 configure.ac;  ) > 3.9.0cvs99.patchset
+( cvs diff -u -r 1.100.2.89 -r 1.100.2.90 AUTHORS;  cvs diff -u -r 1.1.2.84 -r 1.1.2.85 src/gtk/authors.h;  cvs diff -u -r 1.395.2.461 -r 1.395.2.462 src/summaryview.c;  ) > 3.9.0cvs100.patchset
index 7b148ee..e25da22 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=9
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=99
+EXTRA_VERSION=100
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 1448e28..42183fe 100644 (file)
@@ -105,6 +105,7 @@ static char *CONTRIBS_LIST[] = {
 "Christian Cornelssen",
 "George Danchev",
 "Matthieu Dazy",
+"Ben Deering",
 "Pierric Descamps",
 "Frank Dietrich",
 "Tim Dijkstra",
index b1a4f33..f73de12 100644 (file)
@@ -1019,7 +1019,7 @@ static void summary_switch_from_to(SummaryView *summaryview, FolderItem *item)
        SummaryColumnState *col_state = summaryview->col_state;
        GtkCMCTree *ctree = GTK_CMCTREE(summaryview->ctree);
        
-       if (!item || (prefs_common.layout_mode == VERTICAL_LAYOUT && prefs_common.two_line_vert) )
+       if (!item || ((prefs_common.layout_mode == VERTICAL_LAYOUT || prefs_common.layout_mode == SMALL_LAYOUT) && prefs_common.two_line_vert) )
                return;
        if (FOLDER_SHOWS_TO_HDR(item))
                show_to = TRUE;
@@ -3051,6 +3051,7 @@ static gboolean summary_insert_gnode_func(GtkCMCTree *ctree, guint depth, GNode
        const gchar *msgid = msginfo->msgid;
        GHashTable *msgid_table = summaryview->msgid_table;
        gboolean vert = (prefs_common.layout_mode == VERTICAL_LAYOUT);
+       gboolean small = (prefs_common.layout_mode == SMALL_LAYOUT);
 
        summary_set_header(summaryview, text, msginfo);
 
@@ -3076,7 +3077,7 @@ static gboolean summary_insert_gnode_func(GtkCMCTree *ctree, guint depth, GNode
        if (summaryview->col_state[summaryview->col_pos[S_COL_TAGS]].visible)
                SET_TEXT(S_COL_TAGS);
 
-       if (vert && prefs_common.two_line_vert)
+       if ((vert || small) && prefs_common.two_line_vert)
                g_free(text[summaryview->col_pos[S_COL_SUBJECT]]);
 
 #undef SET_TEXT
@@ -3100,7 +3101,7 @@ static void summary_set_ctree_from_list(SummaryView *summaryview,
        GHashTable *subject_table = NULL;
        GSList * cur;
        gboolean vert = (prefs_common.layout_mode == VERTICAL_LAYOUT);
-
+       gboolean small = (prefs_common.layout_mode == SMALL_LAYOUT);
        START_TIMING("");
        
        if (!mlist) return;
@@ -3160,7 +3161,7 @@ static void summary_set_ctree_from_list(SummaryView *summaryview,
                                (ctree, NULL, node, text, 2,
                                 NULL, NULL,
                                 FALSE, FALSE);
-                       if (vert && prefs_common.two_line_vert)
+                       if ((vert || small) && prefs_common.two_line_vert)
                                g_free(text[summaryview->col_pos[S_COL_SUBJECT]]);
 
                        GTKUT_CTREE_NODE_SET_ROW_DATA(node, msginfo);
@@ -3259,6 +3260,7 @@ static inline void summary_set_header(SummaryView *summaryview, gchar *text[],
        gchar *from_text = NULL, *to_text = NULL, *tags_text = NULL;
        gboolean should_swap = FALSE;
        gboolean vert = (prefs_common.layout_mode == VERTICAL_LAYOUT);
+       gboolean small = (prefs_common.layout_mode == SMALL_LAYOUT);
        static const gchar *color_dim_rgb = NULL;
        if (!color_dim_rgb)
                color_dim_rgb = gdk_color_to_string(&summaryview->color_dim);
@@ -3302,7 +3304,7 @@ static inline void summary_set_header(SummaryView *summaryview, gchar *text[],
 
        /* slow! */
        if (summaryview->col_state[summaryview->col_pos[S_COL_DATE]].visible || 
-           (vert && prefs_common.two_line_vert)) {
+           ((vert || small) && prefs_common.two_line_vert)) {
                if (msginfo->date_t && msginfo->date_t > 0) {
                        procheader_date_get_localtime(date_modified,
                                                      sizeof(date_modified),
@@ -3395,7 +3397,7 @@ static inline void summary_set_header(SummaryView *summaryview, gchar *text[],
 #endif
                text[col_pos[S_COL_SUBJECT]] = msginfo->subject ? msginfo->subject :
                        _("(No Subject)");
-       if (vert && prefs_common.two_line_vert) {
+       if ((vert || small) && prefs_common.two_line_vert) {
                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]],
@@ -4364,7 +4366,6 @@ void summary_delete(SummaryView *summaryview)
        AlertValue aval;
        MsgInfo *msginfo;
        gboolean froze = FALSE;
-       gboolean show = FALSE;
 
        if (!item) return;
 
@@ -4414,11 +4415,7 @@ void summary_delete(SummaryView *summaryview)
        if (!node)
                node = summary_find_prev_msg(summaryview, sel_last);
 
-       show = (prefs_common.always_show_msg == OPENMSG_ALWAYS) ||
-               ((prefs_common.always_show_msg == OPENMSG_WHEN_VIEW_VISIBLE &&
-                               messageview_is_visible(summaryview->messageview)));
-
-       summary_select_node(summaryview, node, show, TRUE);
+       summary_select_node(summaryview, node, prefs_common.always_show_msg, TRUE);
        
        if (prefs_common.immediate_exec || folder_has_parent_of_type(item, F_TRASH)) {
                summary_execute(summaryview);
@@ -6355,7 +6352,7 @@ static gboolean tooltip_cb (GtkWidget  *widget,
        MsgInfo *info = NULL;
        GdkRectangle rect;
        gboolean vert = (prefs_common.layout_mode == VERTICAL_LAYOUT);
-
+       gboolean small = (prefs_common.layout_mode == SMALL_LAYOUT);
        if (!prefs_common.show_tooltips)
                return FALSE;
 
@@ -6393,10 +6390,10 @@ static gboolean tooltip_cb (GtkWidget  *widget,
        formatted = g_strdup(text);
        g_strstrip(formatted);
 
-       if (!vert)      
-               gtk_tooltip_set_text (tooltip, formatted);
-       else if (prefs_common.two_line_vert)
+       if ((vert || small) && prefs_common.two_line_vert)
                gtk_tooltip_set_markup (tooltip, formatted);
+       else 
+                       gtk_tooltip_set_text (tooltip, formatted);
        g_free(formatted);
        
        rect.x = x - 2;
@@ -6417,7 +6414,7 @@ static GtkWidget *summary_ctree_create(SummaryView *summaryview)
        SummaryColumnType type;
        gint pos;
        gboolean vert = (prefs_common.layout_mode == VERTICAL_LAYOUT);
-
+       gboolean small = (prefs_common.layout_mode == SMALL_LAYOUT);
        memset(titles, 0, sizeof(titles));
 
        col_state = prefs_summary_column_get_config();
@@ -6493,7 +6490,7 @@ static GtkWidget *summary_ctree_create(SummaryView *summaryview)
                                       FALSE);
                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 &&
+                    pos == summaryview->col_pos[S_COL_DATE]) && (vert || small) &&
                            prefs_common.two_line_vert)
                        gtk_cmclist_set_column_visibility
                                (GTK_CMCLIST(ctree), pos, FALSE);
@@ -6502,7 +6499,7 @@ static GtkWidget *summary_ctree_create(SummaryView *summaryview)
                                (GTK_CMCLIST(ctree), pos, col_state[pos].visible);
        }
        if (prefs_common.two_line_vert)
-               gtk_sctree_set_use_markup(GTK_SCTREE(ctree), summaryview->col_pos[S_COL_SUBJECT], vert);
+               gtk_sctree_set_use_markup(GTK_SCTREE(ctree), summaryview->col_pos[S_COL_SUBJECT], vert||small);
 
        /* connect signal to the buttons for sorting */
 #define CLIST_BUTTON_SIGNAL_CONNECT(col, func) \
@@ -6625,7 +6622,7 @@ void summary_set_column_order(SummaryView *summaryview)
        else
                summary_redisplay_msg(summaryview);
 
-       if (prefs_common.layout_mode == VERTICAL_LAYOUT &&
+       if ((prefs_common.layout_mode == SMALL_LAYOUT || prefs_common.layout_mode == VERTICAL_LAYOUT) &&
            prefs_common.two_line_vert) {
                gtk_cmclist_set_row_height(GTK_CMCLIST(summaryview->ctree), 2*normal_row_height + 2);           
        } else {