From 8fd2980373bf083425cea455e7523068fec648d4 Mon Sep 17 00:00:00 2001 From: Joshua Sled Date: Sat, 3 Dec 2005 16:15:11 +0000 Subject: [PATCH] Bug#303180: don't use a hardcoded font for the dense cal... get both from the gtk style. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12082 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 5 +++++ GNOME2_STATUS | 4 ---- src/gnome-utils/gnc-dense-cal.c | 9 +++++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 324e2762ea..2d17131bd6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-12-03 Joshua Sled + + * gnc-dense-cal.c (gnc_dense_cal_init): Don't use a hardcoded + font; get both fonts from the style. + 2005-11-30 David Hampton * src/register/register-gnome/gnucash-header.c: diff --git a/GNOME2_STATUS b/GNOME2_STATUS index e95d8e1db8..aefb243143 100644 --- a/GNOME2_STATUS +++ b/GNOME2_STATUS @@ -205,10 +205,6 @@ Resources the first split causes everything else entered so far to be reset when tabbing to the second split. - - Font hard-coded (dense-cal), especially broken for non-ISO8859-1 locales. - - - http://bugzilla.gnome.org/show_bug.cgi?id=303180 - ======================================== ENHANCEMENTS ======================================== diff --git a/src/gnome-utils/gnc-dense-cal.c b/src/gnome-utils/gnc-dense-cal.c index 581b6547c2..848910add5 100644 --- a/src/gnome-utils/gnc-dense-cal.c +++ b/src/gnome-utils/gnc-dense-cal.c @@ -82,7 +82,6 @@ static const gchar* MONTH_THIS_COLOR = "lavender"; static const gchar* MONTH_THAT_COLOR = "SlateGray1"; static const gchar* MARK_COLOR = "Yellow"; -static const gchar* LABEL_FONT_NAME = "-adobe-helvetica-bold-r-normal--*-100-*-*-p-*-iso8859-1"; static const gchar* MARKS_LOST_SIGNAL_NAME = "marks_lost"; @@ -320,15 +319,17 @@ gnc_dense_cal_init (GncDenseCal *dcal) gint lbearing, rbearing, width, ascent, descent; GtkStyle *style; - dcal->monthLabelFont = gdk_font_load( LABEL_FONT_NAME ); - g_assert( dcal->monthLabelFont ); - /* FIXME GNOME 2 port (rework the complete font code) */ style = gtk_widget_get_style(GTK_WIDGET(dcal)); + dcal->dayLabelFont = gtk_style_get_font(style); gdk_font_ref( dcal->dayLabelFont ); g_assert( dcal->dayLabelFont ); + dcal->monthLabelFont = gtk_style_get_font(style); + g_assert(dcal->monthLabelFont); + gdk_font_ref(dcal->monthLabelFont); + maxWidth = maxHeight = maxAscent = maxLBearing = 0; for ( i=0; i<12; i++ ) { gint w, h;