Fix bold font not being derived from normal font, but from system font
[claws.git] / src / folderview.c
index 457affbfbdf36cf2aac0138f8b1621e6cce51861..4f0be44889a37043d934c002cfc326f4d7b82ea2 100644 (file)
@@ -681,14 +681,18 @@ void folderview_init(FolderView *folderview)
                gtkut_convert_int_to_gdk_color(prefs_common.color_new, &gdk_color);
                normal_color_style = gtk_style_copy(normal_style);
                normal_color_style->fg[GTK_STATE_NORMAL] = gdk_color;
-
-               gtk_widget_set_style(ctree, normal_style);
        }
 
        if (!bold_style) {
                gtkut_convert_int_to_gdk_color(prefs_common.color_new, &gdk_color);
                bold_style = gtk_style_copy(gtk_widget_get_style(ctree));
                if (prefs_common.derive_from_normal_font || !BOLD_FONT) {
+                       PangoFontDescription *font_desc;
+                       font_desc = pango_font_description_from_string(NORMAL_FONT);
+                       if (font_desc) {
+                               pango_font_description_free(bold_style->font_desc);
+                               bold_style->font_desc = font_desc;
+                       }
                        pango_font_description_set_weight
                                (bold_style->font_desc, PANGO_WEIGHT_BOLD);
                } else {
@@ -880,7 +884,7 @@ static GtkCMCTreeNode *folderview_find_next_with_flag(GtkCMCTree *ctree,
 
        for (; node != NULL; node = gtkut_ctree_node_next(ctree, node)) {
                item = gtk_cmctree_node_get_row_data(ctree, node);
-               if (item->stype == F_TRASH)
+               if (item->stype == F_TRASH || item->stype == F_DRAFT)
                        continue;
                switch (flag) {
                case MSG_UNREAD:
@@ -2711,6 +2715,8 @@ static gboolean folderview_update_folder(gpointer source, gpointer userdata)
                        if (folderview->opened == node)
                                folderview->opened = NULL;
                }
+       } else if (hookdata->update_flags & FOLDER_MOVE_FOLDERITEM) {
+               /* do nothing, it's done by the ADD and REMOVE) */
        } else if (hookdata->update_flags & (FOLDER_TREE_CHANGED | FOLDER_ADD_FOLDER | FOLDER_REMOVE_FOLDER))
                folderview_set(folderview);