+2005-08-31 [paul] 1.9.13cvs74
+
+ * src/compose.c
+ * src/folderview.c
+ * src/headerview.c
+ * src/headerview.h
+ * src/mainwindow.c
+ * src/prefs_common.c
+ * src/prefs_common.h
+ * src/prefs_fonts.c
+ * src/summaryview.c
+ * src/textview.c
+ * src/common/defs.h
+ remove obsolete BOLD_FONT setting
+ fix font update in headerview and textview
+ headers after prefs change
+ Patch By Colin
+
2005-08-31 [paul]
1.9.14-rc4 released
( cvs diff -u -r 1.100.2.23 -r 1.100.2.24 AUTHORS; cvs diff -u -r 1.25.2.9 -r 1.25.2.10 src/matcher_parser_parse.y; cvs diff -u -r 1.1.4.18 -r 1.1.4.19 src/etpan/imap-thread.c; ) > 1.9.13cvs71.patchset
( cvs diff -u -r 1.207.2.58 -r 1.207.2.59 src/folderview.c; cvs diff -u -r 1.274.2.56 -r 1.274.2.57 src/mainwindow.c; cvs diff -u -r 1.83.2.37 -r 1.83.2.38 src/mimeview.c; cvs diff -u -r 1.2.2.14 -r 1.2.2.15 src/gtk/filesel.c; cvs diff -u -r 1.1.4.4 -r 1.1.4.5 src/gtk/filesel.h; ) > 1.9.13cvs72.patchset
( cvs diff -u -r 1.395.2.117 -r 1.395.2.118 src/summaryview.c; ) > 1.9.13cvs73.patchset
+( cvs diff -u -r 1.382.2.157 -r 1.382.2.158 src/compose.c; cvs diff -u -r 1.207.2.59 -r 1.207.2.60 src/folderview.c; cvs diff -u -r 1.8.2.8 -r 1.8.2.9 src/headerview.c; cvs diff -u -r 1.2 -r 1.3 src/headerview.h; cvs diff -u -r 1.274.2.57 -r 1.274.2.58 src/mainwindow.c; cvs diff -u -r 1.204.2.55 -r 1.204.2.56 src/prefs_common.c; cvs diff -u -r 1.103.2.27 -r 1.103.2.28 src/prefs_common.h; cvs diff -u -r 1.4.2.11 -r 1.4.2.12 src/prefs_fonts.c; cvs diff -u -r 1.395.2.118 -r 1.395.2.119 src/summaryview.c; cvs diff -u -r 1.96.2.72 -r 1.96.2.73 src/textview.c; cvs diff -u -r 1.9.2.15 -r 1.9.2.16 src/common/defs.h; ) > 1.9.13cvs74.patchset
MICRO_VERSION=13
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=73
+EXTRA_VERSION=74
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
#define MAX_HISTORY_SIZE 16
#define NORMAL_FONT prefs_common.normalfont
-#define BOLD_FONT prefs_common.boldfont
#define SMALL_FONT prefs_common.smallfont
#define DEFAULT_PIXMAP_THEME "INTERNAL_DEFAULT"
(prefs_common.color_new, &bold_color);
bold_style = gtk_style_copy(gtk_widget_get_style
(GTK_WIDGET(entry)));
- if (BOLD_FONT)
- font_desc = pango_font_description_from_string
- (BOLD_FONT);
- if (font_desc) {
- if (bold_style->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);
bold_style->fg[GTK_STATE_NORMAL] = bold_color;
}
gtk_widget_set_style(GTK_WIDGET(entry), bold_style);
if (!bold_style) {
PangoFontDescription *font_desc;
bold_style = gtk_style_copy(gtk_widget_get_style(ctree));
- font_desc = pango_font_description_from_string(BOLD_FONT);
- if (font_desc) {
- if (bold_style->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);
bold_color_style = gtk_style_copy(bold_style);
return headerview;
}
-void headerview_init(HeaderView *headerview)
+void headerview_set_font(HeaderView *headerview)
{
- static PangoFontDescription *boldfont = NULL;
-
+ PangoFontDescription *boldfont = NULL;
+ PangoFontDescription *normalfont = NULL;
+
if (!boldfont) {
- boldfont = pango_font_description_from_string(BOLD_FONT);
+ normalfont = pango_font_description_from_string(NORMAL_FONT);
+ boldfont = pango_font_description_from_string(NORMAL_FONT);
pango_font_description_set_weight(boldfont, PANGO_WEIGHT_BOLD);
}
gtk_widget_modify_font(headerview->to_header_label, boldfont);
gtk_widget_modify_font(headerview->ng_header_label, boldfont);
gtk_widget_modify_font(headerview->subject_header_label, boldfont);
+ pango_font_description_free(boldfont);
+
+ gtk_widget_modify_font(headerview->from_body_label, normalfont);
+ gtk_widget_modify_font(headerview->to_body_label, normalfont);
+ gtk_widget_modify_font(headerview->ng_body_label, normalfont);
+ gtk_widget_modify_font(headerview->subject_body_label, normalfont);
+ pango_font_description_free(normalfont);
}
+}
+void headerview_init(HeaderView *headerview)
+{
+ headerview_set_font(headerview);
headerview_clear(headerview);
headerview_set_visibility(headerview, prefs_common.display_header_pane);
void headerview_set_visibility (HeaderView *headerview,
gboolean visibility);
void headerview_destroy (HeaderView *headerview);
-
+void headerview_set_font (HeaderView *headerview);
#endif /* __HEADERVIEW_H__ */
mainwin->offline_pixmap = pixmap;
}
+ headerview_set_font(mainwin->messageview->headerview);
headerview_set_visibility(mainwin->messageview->headerview,
prefs_common.display_header_pane);
-
textview_reflect_prefs(mainwin->messageview->mimeview->textview);
folderview_reflect_prefs();
summary_reflect_prefs();
{"small_font_gtk2", "Sans 9",
&prefs_common.smallfont, P_STRING, NULL, NULL, NULL},
{"bold_font_gtk2", "Sans Bold 9",
- &prefs_common.boldfont, P_STRING, NULL, NULL, NULL},
- {"normal_font_gtk2", "Sans 9",
&prefs_common.normalfont, P_STRING, NULL, NULL, NULL},
/* image viewer */
gchar *widgetfont;
gchar *textfont;
gchar *normalfont;
- gchar *boldfont;
gchar *smallfont;
gchar *titlefont;
GtkWidget *entry_folderviewfont;
GtkWidget *entry_messageviewfont;
- GtkWidget *entry_boldfont;
} FontsPage;
void prefs_fonts_create_widget(PrefsPage *_page, GtkWindow *window,
GtkWidget *table;
GtkWidget *entry_folderviewfont;
GtkWidget *entry_messageviewfont;
- GtkWidget *entry_boldfont;
GtkWidget *tmplabel;
GtkWidget *vbox;
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
- tmplabel = gtk_label_new (_("Bold"));
- gtk_widget_show (tmplabel);
- gtk_table_attach (GTK_TABLE (table), tmplabel, 0, 1, 3, 4,
- (GtkAttachOptions) GTK_FILL,
- (GtkAttachOptions) (0), 0, 0);
- gtk_label_set_justify(GTK_LABEL(tmplabel), GTK_JUSTIFY_RIGHT);
- gtk_misc_set_alignment(GTK_MISC(tmplabel), 1, 0.5);
-
- entry_boldfont = gtk_font_button_new_with_font (prefs_common.boldfont);
- g_object_set(G_OBJECT(entry_boldfont),
- "use-font", TRUE,
- NULL);
- gtk_widget_show (entry_boldfont);
- gtk_table_attach (GTK_TABLE (table), entry_boldfont, 1, 2, 3, 4,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
-
vbox = gtk_vbox_new(FALSE, VSPACING_NARROW);
gtk_widget_show(vbox);
gtk_table_attach (GTK_TABLE (table), vbox, 0, 4, 4, 5,
prefs_fonts->window = GTK_WIDGET(window);
prefs_fonts->entry_folderviewfont = entry_folderviewfont;
prefs_fonts->entry_messageviewfont = entry_messageviewfont;
- prefs_fonts->entry_boldfont = entry_boldfont;
prefs_fonts->page.widget = table;
}
prefs_common.textfont = g_strdup(gtk_font_button_get_font_name
(GTK_FONT_BUTTON(fonts->entry_messageviewfont)));
- g_free(prefs_common.boldfont);
- prefs_common.boldfont = g_strdup(gtk_font_button_get_font_name
- (GTK_FONT_BUTTON(fonts->entry_boldfont)));
-
main_window_reflect_prefs_all();
}
if (!bold_style) {
bold_style = gtk_style_copy
(gtk_widget_get_style(summaryview->ctree));
- font_desc = pango_font_description_from_string(BOLD_FONT);
+ 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;
if (!bold_font_desc) {
bold_font_desc = pango_font_description_from_string
- (BOLD_FONT);
+ (NORMAL_FONT);
pango_font_description_set_weight
(bold_font_desc, PANGO_WEIGHT_BOLD);
}
textview->show_all_headers = all_headers;
}
+#define CHANGE_TAG_FONT(tagname, font) { \
+ tag = gtk_text_tag_table_lookup(tags, tagname); \
+ if (tag) \
+ g_object_set(G_OBJECT(tag), "font-desc", font, NULL); \
+}
+
void textview_set_font(TextView *textview, const gchar *codeset)
{
+ GtkTextTag *tag;
+ GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview->text));
+ GtkTextTagTable *tags = gtk_text_buffer_get_tag_table(buffer);
+
+ if (NORMAL_FONT) {
+ PangoFontDescription *font_desc, *bold_font_desc;
+ font_desc = pango_font_description_from_string
+ (NORMAL_FONT);
+ bold_font_desc = pango_font_description_from_string
+ (NORMAL_FONT);
+ if (font_desc) {
+ gtk_widget_modify_font(textview->text, font_desc);
+ pango_font_description_free(font_desc);
+ CHANGE_TAG_FONT("header", font_desc);
+ }
+ if (bold_font_desc) {
+ pango_font_description_set_weight
+ (bold_font_desc, PANGO_WEIGHT_BOLD);
+ CHANGE_TAG_FONT("header_title", bold_font_desc);
+ pango_font_description_free(bold_font_desc);
+ }
+ }
+
if (prefs_common.textfont) {
- PangoFontDescription *font_desc = NULL;
+ PangoFontDescription *font_desc;
font_desc = pango_font_description_from_string
(prefs_common.textfont);