From fa98d064b855e681d4d61bcd6b7f4ac14f896035 Mon Sep 17 00:00:00 2001 From: Colin Leroy Date: Thu, 17 Mar 2005 16:40:09 +0000 Subject: [PATCH] fix font issues in summaryview --- ChangeLog-gtk2.claws | 8 ++++++++ PATCHSETS | 1 + configure.ac | 2 +- src/prefs_fonts.c | 26 +++----------------------- src/summaryview.c | 12 +++++++++++- 5 files changed, 24 insertions(+), 25 deletions(-) diff --git a/ChangeLog-gtk2.claws b/ChangeLog-gtk2.claws index 91904de0c..b2e3741ee 100644 --- a/ChangeLog-gtk2.claws +++ b/ChangeLog-gtk2.claws @@ -1,3 +1,11 @@ +2005-03-17 [colin] 1.0.3cvs2.3 + + * src/prefs_fonts.c + * src/summaryview.c + Fix font bugs (both lists now officialy share + the same font) + + 2005-03-17 [paul] 1.0.3cvs2.2 * src/gtk/pluginwindow.c diff --git a/PATCHSETS b/PATCHSETS index 998bcbb5c..ce6a2adeb 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -411,3 +411,4 @@ ( cvs diff -u -r 1.396.2.22 -r 1.396.2.23 ChangeLog; cvs diff -u -r 1.2504.2.51 -r 1.2504.2.52 ChangeLog.claws; cvs diff -u -r 1.654.2.444 -r 1.654.2.445 configure.ac; cvs diff -u -r 1.58.2.7 -r 1.58.2.8 po/de.po; cvs diff -u -r 1.60.2.8 -r 1.60.2.9 po/es.po; cvs diff -u -r 1.42.2.8 -r 1.42.2.9 po/fr.po; cvs diff -u -r 1.34.2.7 -r 1.34.2.8 po/it.po; cvs diff -u -r 1.50.2.6 -r 1.50.2.7 po/pt_BR.po; cvs diff -u -r 1.17.2.5 -r 1.17.2.6 po/ru.po; cvs diff -u -r 1.2.2.9 -r 1.2.2.10 po/sk.po; cvs diff -u -r 1.17.2.9 -r 1.17.2.10 po/sr.po; cvs diff -u -r 1.5.2.5 -r 1.5.2.6 po/zh_CN.po; ) > 1.0.3cvs1.1.patchset ( cvs diff -u -r 1.2504.2.52 -r 1.2504.2.53 ChangeLog.claws; cvs diff -u -r 1.654.2.445 -r 1.654.2.446 configure.ac; cvs diff -u -r 1.53.2.8 -r 1.53.2.9 po/POTFILES.in; cvs diff -u -r 1.14.2.15 -r 1.14.2.16 src/plugins/trayicon/trayicon.c; ) > 1.0.3cvs2.1.patchset ( cvs diff -u -r 1.5.2.12 -r 1.5.2.13 src/gtk/pluginwindow.c; ) > 1.0.3cvs2.2.patchset +( cvs diff -u -r 1.4.2.8 -r 1.4.2.9 src/prefs_fonts.c; cvs diff -u -r 1.395.2.58 -r 1.395.2.59 src/summaryview.c; ) > 1.0.3cvs2.3.patchset diff --git a/configure.ac b/configure.ac index 64d0f37b9..6b1891ed3 100644 --- a/configure.ac +++ b/configure.ac @@ -13,7 +13,7 @@ INTERFACE_AGE=0 BINARY_AGE=0 EXTRA_VERSION=2 EXTRA_RELEASE= -EXTRA_GTK2_VERSION=.2 +EXTRA_GTK2_VERSION=.3 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION} diff --git a/src/prefs_fonts.c b/src/prefs_fonts.c index e88b9b82f..c0baf62dd 100644 --- a/src/prefs_fonts.c +++ b/src/prefs_fonts.c @@ -43,7 +43,6 @@ typedef struct _FontsPage GtkWidget *window; /* do not modify */ GtkWidget *entry_folderviewfont; - GtkWidget *entry_summaryviewfont; GtkWidget *entry_messageviewfont; GtkWidget *entry_boldfont; } FontsPage; @@ -55,20 +54,19 @@ void prefs_fonts_create_widget(PrefsPage *_page, GtkWindow *window, GtkWidget *table; GtkWidget *entry_folderviewfont; - GtkWidget *entry_summaryviewfont; GtkWidget *entry_messageviewfont; GtkWidget *entry_boldfont; GtkWidget *tmplabel; GtkWidget *vbox; GtkWidget *hint_label; - table = gtk_table_new(8, 2, FALSE); + table = gtk_table_new(7, 2, FALSE); gtk_widget_show(table); gtk_container_set_border_width(GTK_CONTAINER(table), 8); gtk_table_set_row_spacings(GTK_TABLE(table), 4); gtk_table_set_col_spacings(GTK_TABLE(table), 8); - tmplabel = gtk_label_new (_("Folder List")); + tmplabel = gtk_label_new (_("Folder and Message Lists")); gtk_widget_show (tmplabel); gtk_table_attach (GTK_TABLE (table), tmplabel, 0, 1, 0, 1, (GtkAttachOptions) GTK_FILL, @@ -85,23 +83,6 @@ void prefs_fonts_create_widget(PrefsPage *_page, GtkWindow *window, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); - tmplabel = gtk_label_new (_("Message List")); - gtk_widget_show (tmplabel); - gtk_table_attach (GTK_TABLE (table), tmplabel, 0, 1, 1, 2, - (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_summaryviewfont = gtk_font_button_new_with_font (prefs_common.smallfont); - g_object_set(G_OBJECT(entry_summaryviewfont), - "use-font", TRUE, - NULL); - gtk_widget_show (entry_summaryviewfont); - gtk_table_attach (GTK_TABLE (table), entry_summaryviewfont, 1, 2, 1, 2, - (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), - (GtkAttachOptions) (0), 0, 0); - tmplabel = gtk_label_new (_("Message")); gtk_widget_show (tmplabel); gtk_table_attach (GTK_TABLE (table), tmplabel, 0, 1, 2, 3, @@ -153,7 +134,6 @@ void prefs_fonts_create_widget(PrefsPage *_page, GtkWindow *window, prefs_fonts->window = GTK_WIDGET(window); prefs_fonts->entry_folderviewfont = entry_folderviewfont; - prefs_fonts->entry_summaryviewfont = entry_summaryviewfont; prefs_fonts->entry_messageviewfont = entry_messageviewfont; prefs_fonts->entry_boldfont = entry_boldfont; @@ -170,7 +150,7 @@ void prefs_fonts_save(PrefsPage *_page) g_free(prefs_common.smallfont); prefs_common.smallfont = g_strdup(gtk_font_button_get_font_name - (GTK_FONT_BUTTON(fonts->entry_summaryviewfont))); + (GTK_FONT_BUTTON(fonts->entry_folderviewfont))); g_free(prefs_common.textfont); prefs_common.textfont = g_strdup(gtk_font_button_get_font_name diff --git a/src/summaryview.c b/src/summaryview.c index 3dedb8401..8e42f8f21 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -641,11 +641,21 @@ void summary_init(SummaryView *summaryview) stock_pixmap_gdk(summaryview->ctree, STOCK_PIXMAP_GPG_SIGNED, &gpgsignedxpm, &gpgsignedxpmmask); + font_desc = pango_font_description_from_string(NORMAL_FONT); + gtk_widget_modify_font(summaryview->ctree, font_desc); + pango_font_description_free(font_desc); + if (!bold_style) { bold_style = gtk_style_copy (gtk_widget_get_style(summaryview->ctree)); + font_desc = pango_font_description_from_string(BOLD_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); + (bold_style->font_desc, PANGO_WEIGHT_BOLD); bold_marked_style = gtk_style_copy(bold_style); bold_marked_style->fg[GTK_STATE_NORMAL] = summaryview->color_marked; -- 2.25.1