2006-08-31 [colin] 2.4.0cvs116
authorColin Leroy <colin@colino.net>
Thu, 31 Aug 2006 19:25:05 +0000 (19:25 +0000)
committerColin Leroy <colin@colino.net>
Thu, 31 Aug 2006 19:25:05 +0000 (19:25 +0000)
* src/folderview.c
Use pref "Always open on select" when going
to next unread folder
* src/gtk/gtksctree.c
Fix link failure to _gtk_clist_create_cell_layout
on certain computers. (Why not mine, I wonder)

ChangeLog
PATCHSETS
configure.ac
src/folderview.c
src/gtk/gtksctree.c

index 1867b24..cacaf4c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-08-31 [colin]     2.4.0cvs116
+
+       * src/folderview.c
+               Use pref "Always open on select" when going
+               to next unread folder
+       * src/gtk/gtksctree.c
+               Fix link failure to _gtk_clist_create_cell_layout
+               on certain computers. (Why not mine, I wonder)
+
 2006-08-31 [colin]     2.4.0cvs115
 
        * src/procmsg.c
index 372b735..6960648 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/plugins/bogofilter/bogofilter.c;  ) > 2.4.0cvs113.patchset
 ( cvs diff -u -r 1.213.2.111 -r 1.213.2.112 src/folder.c;  cvs diff -u -r 1.149.2.55 -r 1.149.2.56 src/inc.c;  cvs diff -u -r 1.28.2.24 -r 1.28.2.25 src/mbox.c;  cvs diff -u -r 1.150.2.76 -r 1.150.2.77 src/procmsg.c;  cvs diff -u -r 1.60.2.34 -r 1.60.2.35 src/procmsg.h;  cvs diff -u -r 1.1.4.47 -r 1.1.4.48 src/etpan/imap-thread.c;  cvs diff -u -r 1.1.2.5 -r 1.1.2.6 src/plugins/bogofilter/bogofilter.c;  ) > 2.4.0cvs114.patchset
 ( cvs diff -u -r 1.207.2.114 -r 1.207.2.115 src/folderview.c;  cvs diff -u -r 1.274.2.140 -r 1.274.2.141 src/mainwindow.c;  cvs diff -u -r 1.39.2.20 -r 1.39.2.21 src/mainwindow.h;  cvs diff -u -r 1.204.2.97 -r 1.204.2.98 src/prefs_common.c;  cvs diff -u -r 1.103.2.58 -r 1.103.2.59 src/prefs_common.h;  cvs diff -u -r 1.150.2.77 -r 1.150.2.78 src/procmsg.c;  cvs diff -u -r 1.5.2.9 -r 1.5.2.10 src/statusbar.c;  cvs diff -u -r 1.395.2.237 -r 1.395.2.238 src/summaryview.c;  cvs diff -u -r 1.96.2.142 -r 1.96.2.143 src/textview.c;  cvs diff -u -r 1.1.4.24 -r 1.1.4.25 src/gtk/gtksctree.c;  cvs diff -u -r 1.1.2.6 -r 1.1.2.7 src/plugins/bogofilter/bogofilter.c;  cvs diff -u -r 1.18.2.39 -r 1.18.2.40 src/plugins/spamassassin/spamassassin.c;  ) > 2.4.0cvs115.patchset
+( cvs diff -u -r 1.207.2.115 -r 1.207.2.116 src/folderview.c;  cvs diff -u -r 1.1.4.25 -r 1.1.4.26 src/gtk/gtksctree.c;  ) > 2.4.0cvs116.patchset
index 408b483..a84fab8 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=4
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=115
+EXTRA_VERSION=116
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 374395e..40ece26 100644 (file)
@@ -878,11 +878,9 @@ void folderview_select_next_unread(FolderView *folderview)
 {
        GtkCTree *ctree = GTK_CTREE(folderview->ctree);
        GtkCTreeNode *node = NULL;
-       SelectOnEntry last_sel = prefs_common.select_on_entry;
        gboolean last_open = prefs_common.always_show_msg;
        
        prefs_common.select_on_entry = SELECTONENTRY_UNM;
-       prefs_common.always_show_msg = TRUE;
 
        if ((node = folderview_find_next_unread(ctree, folderview->opened))
            != NULL) {
@@ -899,7 +897,6 @@ void folderview_select_next_unread(FolderView *folderview)
                folderview_select_node(folderview, node);
 
 out:
-       prefs_common.select_on_entry = last_sel;
        prefs_common.always_show_msg = last_open;
 }
 
index c2e8f93..7c7f065 100644 (file)
@@ -752,6 +752,45 @@ gtk_sctree_draw_lines (GtkCTree     *ctree,
   return offset;
 }
 
+static PangoLayout *
+sc_gtk_clist_create_cell_layout (GtkCList       *clist,
+                              GtkCListRow    *clist_row,
+                              gint            column)
+{
+  PangoLayout *layout;
+  GtkStyle *style;
+  GtkCell *cell;
+  gchar *text;
+  
+  gtk_sctree_get_cell_style (clist, clist_row, GTK_STATE_NORMAL, 0, column, &style,
+                 NULL, NULL);
+
+
+  cell = &clist_row->cell[column];
+  switch (cell->type)
+    {
+    case GTK_CELL_TEXT:
+    case GTK_CELL_PIXTEXT:
+      text = ((cell->type == GTK_CELL_PIXTEXT) ?
+             GTK_CELL_PIXTEXT (*cell)->text :
+             GTK_CELL_TEXT (*cell)->text);
+
+      if (!text)
+       return NULL;
+      
+      layout = gtk_widget_create_pango_layout (GTK_WIDGET (clist),
+                                              ((cell->type == GTK_CELL_PIXTEXT) ?
+                                               GTK_CELL_PIXTEXT (*cell)->text :
+                                               GTK_CELL_TEXT (*cell)->text));
+      pango_layout_set_font_description (layout, style->font_desc);
+      
+      return layout;
+      
+    default:
+      return NULL;
+    }
+}
+
 static void
 gtk_sctree_draw_row (GtkCList     *clist,
          GdkRectangle *area,
@@ -996,7 +1035,7 @@ gtk_sctree_draw_row (GtkCList     *clist,
                              crect->x, crect->y, crect->width, crect->height);
 
 
-         layout = _gtk_clist_create_cell_layout (clist, clist_row, i);
+         layout = sc_gtk_clist_create_cell_layout (clist, clist_row, i);
          if (layout)
            {
              pango_layout_get_pixel_extents (layout, NULL, &logical_rect);