[Gnucash-changes] r12082 - gnucash/trunk - Bug#303180: don't use a hardcoded font for the dense cal... get both from the gtk style.

Joshua Sled jsled at cvs.gnucash.org
Sat Dec 3 11:15:11 EST 2005


Author: jsled
Date: 2005-12-03 11:15:11 -0500 (Sat, 03 Dec 2005)
New Revision: 12082
Trac: http://svn.gnucash.org/trac/changeset/12082

Modified:
   gnucash/trunk/ChangeLog
   gnucash/trunk/GNOME2_STATUS
   gnucash/trunk/src/gnome-utils/gnc-dense-cal.c
Log:
Bug#303180: don't use a hardcoded font for the dense cal... get both from the gtk style.


Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2005-12-03 16:12:21 UTC (rev 12081)
+++ gnucash/trunk/ChangeLog	2005-12-03 16:15:11 UTC (rev 12082)
@@ -1,3 +1,8 @@
+2005-12-03  Joshua Sled  <jsled at asynchronous.org>
+
+	* 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  <hampton at employees.org>
 
 	* src/register/register-gnome/gnucash-header.c:

Modified: gnucash/trunk/GNOME2_STATUS
===================================================================
--- gnucash/trunk/GNOME2_STATUS	2005-12-03 16:12:21 UTC (rev 12081)
+++ gnucash/trunk/GNOME2_STATUS	2005-12-03 16:15:11 UTC (rev 12082)
@@ -205,10 +205,6 @@
     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
 ========================================

Modified: gnucash/trunk/src/gnome-utils/gnc-dense-cal.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-dense-cal.c	2005-12-03 16:12:21 UTC (rev 12081)
+++ gnucash/trunk/src/gnome-utils/gnc-dense-cal.c	2005-12-03 16:15:11 UTC (rev 12082)
@@ -82,7 +82,6 @@
 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 @@
                 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;



More information about the gnucash-changes mailing list