r15140 - gnucash/branches/2.0 - Make gnc-dense-cal:month_name to use g_date_strftime instead of

Derek Atkins warlord at cvs.gnucash.org
Fri Nov 24 14:54:03 EST 2006


Author: warlord
Date: 2006-11-24 14:54:02 -0500 (Fri, 24 Nov 2006)
New Revision: 15140
Trac: http://svn.gnucash.org/trac/changeset/15140

Modified:
   gnucash/branches/2.0/
   gnucash/branches/2.0/ChangeLog
   gnucash/branches/2.0/src/gnome-utils/gnc-dense-cal.c
Log:
	Make gnc-dense-cal:month_name to use g_date_strftime instead of
	strftime so that it returns a clean UTF-8 string.

Merge from r15080
Approved by jsled




Property changes on: gnucash/branches/2.0
___________________________________________________________________
Name: svk:merge
   - 3889ce50-311e-0410-a464-f059747ec5d1:/local/gnucash/branches/2.0:697
d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/branches/2.0:13617
d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/trunk:13282
   + 3889ce50-311e-0410-a464-f059747ec5d1:/local/gnucash/branches/2.0:697
d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/branches/2.0:13623
d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/trunk:13282

Modified: gnucash/branches/2.0/ChangeLog
===================================================================
--- gnucash/branches/2.0/ChangeLog	2006-11-24 18:44:07 UTC (rev 15139)
+++ gnucash/branches/2.0/ChangeLog	2006-11-24 19:54:02 UTC (rev 15140)
@@ -20,6 +20,11 @@
 	* src/report/standard-reports/account-piecharts.scm: Fix some
 	scheme inexact errors.  Fixes 347462.
 
+2006-11-03  Andreas Köhler  <andi5.py at gmx.net>
+
+	Make gnc-dense-cal:month_name to use g_date_strftime instead of
+	strftime so that it returns a clean UTF-8 string.
+
 2006-10-10  Chris Shoemaker <chris.shoemaker at cox.net>
 
 	Ensure that the blank transaction is marked as the pending

Modified: gnucash/branches/2.0/src/gnome-utils/gnc-dense-cal.c
===================================================================
--- gnucash/branches/2.0/src/gnome-utils/gnc-dense-cal.c	2006-11-24 18:44:07 UTC (rev 15139)
+++ gnucash/branches/2.0/src/gnome-utils/gnc-dense-cal.c	2006-11-24 19:54:02 UTC (rev 15140)
@@ -166,15 +166,16 @@
  * locale. (i18n'd version of the above static character array.) */
 static const gchar *month_name(int mon) 
 {
-    static gchar buf[MONTH_NAME_BUFSIZE];
-    struct tm my_tm;
-    int i;
+        static gchar buf[MONTH_NAME_BUFSIZE];
+        GDate *date;
 
-    memset( buf, 0, MONTH_NAME_BUFSIZE );
-    memset( &my_tm, 0, sizeof( struct tm ) );
-    my_tm.tm_mon = mon;
-    i = strftime (buf, MONTH_NAME_BUFSIZE-1, "%b", &my_tm);
-    return buf;
+        memset(buf, 0, MONTH_NAME_BUFSIZE);
+        date = g_date_new();
+        g_date_set_month(date, mon);
+        g_date_strftime(buf, MONTH_NAME_BUFSIZE-1, "%b", date);
+        g_date_free(date);
+
+        return buf;
 }
 /* FIXME: i18n 
    static const gchar *dayLabels[7] = {



More information about the gnucash-changes mailing list