Re: [evolution-patches] Patch for #45348, Mail and GAL related



Though I got no reply, I attach a new patch based on 1.4 here. Please review it and give your suggestions.
Thanks,
   Harry

Harry Lu wrote:

Jeff, ettore and GAL developers,
Currently e_strftime () in gal/util/e-util.c doesn't handle the "%P" issue. Do you think I should patch this function to change "%P" to "%p" before calling strftime()? Or any other suggestions?
   Thanks!
      Harry

Jeffrey Stedfast wrote:

This is wrong. The e_*_strftime() functions are supposed to handle this.

Jeff

On Wed, 2003-08-13 at 00:06, Harry Lu wrote:
NotZed and Jeff,
Please review my patch for #45348. It is the same reason with #47461. The reason is that under solaris, strftime() won't accept "%P" as a valid format. I have to change it to "%p". The GUI difference is that now "AM/PM" is always in upper case.
  This patch will need to be checked into 1.4 branch, too.
  I guess it breaks string freeze.
     Thanks!
     Harry

______________________________________________________________________
Index: evolution/mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.2761.2.11
diff -u -r1.2761.2.11 ChangeLog
--- evolution/mail/ChangeLog 5 Aug 2003 21:38:19 -0000 1.2761.2.11
+++ evolution/mail/ChangeLog    13 Aug 2003 03:56:59 -0000
@@ -1,3 +1,10 @@
+2003-08-13  Harry Lu  <harry lu sun com>
+
+    ** For #45348
+
+    * mail-display.c: (mail_display_render): Change "%P" to "%p" so
+    that strftime() can work under solaris.
+
2003-08-05  Not Zed  <NotZed Ximian com>

    ** See bug #47224.  Hook onto clicked rather than button_pressed,
Index: evolution/mail/mail-display.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-display.c,v
retrieving revision 1.282.4.4
diff -u -r1.282.4.4 mail-display.c
--- evolution/mail/mail-display.c 5 Aug 2003 21:38:20 -0000 1.282.4.4
+++ evolution/mail/mail-display.c    13 Aug 2003 03:57:00 -0000
@@ -1872,7 +1872,7 @@
localtime_r (&target_date, &due); - e_utf8_strftime_fix_am_pm (due_date, sizeof (due_date), _("by %B %d, %Y, %l:%M %P"), &due); + e_utf8_strftime_fix_am_pm (due_date, sizeof (due_date), _("by %B %d, %Y, %l:%M %p"), &due);
        } else {
            due_date[0] = '\0';
        }


_______________________________________________
Evolution-patches mailing list
Evolution-patches lists ximian com
http://lists.ximian.com/mailman/listinfo/evolution-patches

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gal/ChangeLog,v
retrieving revision 1.800.2.1
diff -u -r1.800.2.1 ChangeLog
--- ChangeLog	12 Aug 2003 17:07:23 -0000	1.800.2.1
+++ ChangeLog	15 Aug 2003 03:29:34 -0000
@@ -1,3 +1,8 @@
+2003-08-15  Harry Lu  <harry lu sun com>
+
+	* gal/util/e-util.c (e_strftime): Change "%P" to "%p" so
+	that e_strftime() can work under solaris. 
+
 2003-08-12  Mike Kestner  <mkestner ximian com>
 
 	* configure.in : branched and reverted the previous intltool change
Index: gal/util/e-util.c
===================================================================
RCS file: /cvs/gnome/gal/gal/util/e-util.c,v
retrieving revision 1.61
diff -u -r1.61 e-util.c
--- gal/util/e-util.c	9 Jul 2003 15:40:23 -0000	1.61
+++ gal/util/e-util.c	15 Aug 2003 03:29:38 -0000
@@ -743,20 +743,30 @@
 
 size_t e_strftime(char *s, size_t max, const char *fmt, const struct tm *tm)
 {
-#ifdef HAVE_LKSTRFTIME
-	return strftime(s, max, fmt, tm);
-#else
 	char *c, *ffmt, *ff;
 	size_t ret;
 
-	ffmt = g_strdup(fmt);
+	ffmt = g_strdup (fmt);
+	ff = ffmt;
+
+	/* Change %P to %p due to the problem of strftime() on solaris */
+	while ((c = strstr (ff, "%P")) != NULL) {
+		c[1] = 'p';
+		ff = c;
+	}
+
+#ifdef HAVE_LKSTRFTIME
+	ret = strftime (s, max, ffmt, tm);
+	g_free (ffmt);
+	return ret;
+#else
 	ff = ffmt;
 	while ((c = strstr(ff, "%l")) != NULL) {
 		c[1] = 'I';
 		ff = c;
 	}
 
-	ff = fmt;
+	ff = ffmt;
 	while ((c = strstr(ff, "%k")) != NULL) {
 		c[1] = 'H';
 		ff = c;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]