Commit cd4fbf25 authored by Andreas J. Guelzow 's avatar Andreas J. Guelzow

Update modification times. [#603099]

2009-12-09  Andreas J. Guelzow <aguelzow@pyrshep.ca>

	* gutils.c (gnm_insert_meta_date): new
	* gutils.h (gnm_insert_meta_date): new
	* workbook-view.c (wbv_save_to_output): update modification time
	* workbook.c (workbook_new): update creation date
parent aa5baf34
2009-12-09 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* gutils.c (gnm_insert_meta_date): new
* gutils.h (gnm_insert_meta_date): new
* workbook-view.c (wbv_save_to_output): update modification time
* workbook.c (workbook_new): update creation date
2009-12-06 Jean Brefort <jean.brefort@normalesup.org>
* src/item-bar.c (ib_draw_cell): clip when drawing text. [#603862]
......
......@@ -3,7 +3,8 @@ Gnumeric 1.9.17
Andreas:
* Update EURO and EUROCONVERT with currencies added in 2207 to 2009.
* Export hyperlinks to ODF. [#603533]
* Make EUROCONVERT Excel compatible
* Make EUROCONVERT Excel compatible [#603755]
* Update modification times. [#603099]
Jean:
* Fixed problem with row headers. [#603862]
......
......@@ -385,3 +385,19 @@ gnm_string_add_number (GString *buf, gnm_float d)
}
/* ------------------------------------------------------------------------- */
void
gnm_insert_meta_date (GODoc *doc, char const *name)
{
GValue *value = g_new0 (GValue, 1);
GTimeVal time;
g_get_current_time (&time);
time.tv_usec = 0L;
g_value_init (value, G_TYPE_STRING);
g_value_take_string (value,
g_time_val_to_iso8601 (&time));
gsf_doc_meta_data_insert (go_doc_get_meta_data (doc),
g_strdup (name),
value);
}
......@@ -32,6 +32,10 @@ gboolean gnm_debug_flag (const char *flag);
void gnm_string_add_number (GString *buf, gnm_float d);
/* Some Meta handling functions */
void gnm_insert_meta_date (GODoc *doc, char const *name);
G_END_DECLS
#endif /* _GNM_GUTILS_H_ */
......@@ -53,6 +53,7 @@
#include <goffice/goffice.h>
#include <gsf/gsf.h>
#include <gsf/gsf-meta-names.h>
#include <gsf/gsf-impl-utils.h>
#include <gsf/gsf-output-stdio.h>
#include <gsf/gsf-input.h>
......@@ -966,6 +967,8 @@ wbv_save_to_output (WorkbookView *wbv, GOFileSaver const *fs,
GError const *err;
char const *msg;
/* FIXME: we should be using the true modification time */
gnm_insert_meta_date (GO_DOC (wbv->wb), GSF_META_NAME_DATE_MODIFIED);
go_file_saver_save (fs, io_context, wbv, output);
/* The plugin convention is unclear */
......
......@@ -42,6 +42,7 @@
#include <gsf/gsf-doc-meta-data.h>
#include <gsf/gsf-impl-utils.h>
#include <gsf/gsf-meta-names.h>
#include <glib/gi18n-lib.h>
#include <string.h>
#include <errno.h>
......@@ -311,6 +312,7 @@ workbook_new (void)
g_free (name);
g_free (nameutf8);
} while (!is_unique);
gnm_insert_meta_date (GO_DOC (wb), GSF_META_NAME_DATE_CREATED);
return wb;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment