[evolution-patches] Same as previous bug, only this hasn't been reported in bugzilla
- From: Philip Van Hoof <spamfrommailing freax org>
- To: Evolution Patches <evolution-patches lists ximian com>
- Cc: Rodrigo Moya <rodrigo novell com>
- Subject: [evolution-patches] Same as previous bug, only this hasn't been reported in bugzilla
- Date: Wed, 02 Mar 2005 13:43:57 +0100
Hi there,
This one is the same fix as for the csv-format.c, only now for rdf-format.c
Shall I commit this?
--
Philip Van Hoof, Software Developer @ Cronos
home: me at freax dot org
gnome: pvanhoof at gnome dot org
work: philip dot vanhoof at cronos dot be
junk: philip dot vanhoof at gmail dot com
http://www.freax.be, http://www.freax.eu.org
|
Index: rdf-format.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/save-calendar/rdf-format.c,v
retrieving revision 1.3
diff -u -r1.3 rdf-format.c
--- rdf-format.c 4 Jan 2005 11:52:21 -0000 1.3
+++ rdf-format.c 2 Mar 2005 12:41:28 -0000
@@ -38,6 +38,8 @@
#include <libecal/e-cal.h>
#include <calendar/gui/e-cal-popup.h>
#include <libgnomevfs/gnome-vfs.h>
+#include <libecal/e-cal-time-util.h>
+#include <libedataserver/e-util.h>
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
@@ -61,18 +63,18 @@
#define CALENDAR_CONFIG_PREFIX "/apps/evolution/calendar"
#define CALENDAR_CONFIG_TIMEZONE CALENDAR_CONFIG_PREFIX "/display/timezone"
-GConfClient *config = NULL;
+static GConfClient *config = NULL;
static gchar *
calendar_config_get_timezone (void)
{
+
gchar *retval = NULL;
if (!config)
config = gconf_client_get_default ();
retval = gconf_client_get_string (config, CALENDAR_CONFIG_TIMEZONE, NULL);
-
if (!retval)
retval = g_strdup ("UTC");
@@ -143,14 +145,17 @@
{
if (time) {
xmlNodePtr cur_node = NULL;
+ struct tm mytm = icaltimetype_to_tm (time);
+ char *str = (char*) malloc (sizeof (char) * 200);
gchar *tmp = NULL;
- gchar *str = g_strdup_printf ("%s%d-%s%d-%s%dT%s%d:%s%d:%s%d",
- (time->year < 10)?"0":"", time->year,
- (time->month < 10)?"0":"", time->month,
- (time->day < 10)?"0":"", time->day,
- (time->hour < 10)?"0":"", time->hour,
- (time->minute < 10)?"0":"", time->minute,
- (time->second < 10)?"0":"", time->second);
+
+ /*
+ * Translator: the %F %T is the thirth argument for a strftime function.
+ * It lets you define the formatting of the date in the rdf-file.
+ * Also check out http://www.w3.org/2002/12/cal/tzd
+ * */
+ e_utf8_strftime (str, 200, _("%FT%T"), &mytm);
+
cur_node = xmlNewChild (node, NULL, tag, str);
/* Not sure about this property */
@@ -158,7 +163,7 @@
xmlSetProp (cur_node, "rdf:datatype", tmp);
g_free (tmp);
- g_free (str);
+ free (str);
}
}
@@ -217,7 +222,7 @@
result = gnome_vfs_open_uri (&handle, uri, GNOME_VFS_OPEN_READ);
if (result == GNOME_VFS_OK)
- doit = e_error_run(gtk_widget_get_toplevel (GTK_WIDGET (target->selector)),
+ doit = e_error_run(GTK_WINDOW(gtk_widget_get_toplevel (GTK_WIDGET (target->selector))),
E_ERROR_ASK_FILE_EXISTS_OVERWRITE, dest_uri, NULL) == GTK_RESPONSE_OK;
if (doit) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]