gnumeric r16441 - in trunk: . src
- From: mortenw svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r16441 - in trunk: . src
- Date: Thu, 6 Mar 2008 21:03:42 +0000 (GMT)
Author: mortenw
Date: Thu Mar 6 21:03:42 2008
New Revision: 16441
URL: http://svn.gnome.org/viewvc/gnumeric?rev=16441&view=rev
Log:
2008-03-06 Morten Welinder <terra gnome org>
* src/wbc-gtk-actions.c (insert_date_time_common): Fix the time
cases.
Modified:
trunk/ChangeLog
trunk/NEWS
trunk/src/wbc-gtk-actions.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Thu Mar 6 21:03:42 2008
@@ -51,6 +51,7 @@
* Fix mstyle problem. [#519451]
* Fix auto-fill problem. [#519680]
* Fix corrupted-gnumeric-bug. [#519761]
+ * Fix insert-time problem.
Uwe Steinmann:
* Paradox DB export.
Modified: trunk/src/wbc-gtk-actions.c
==============================================================================
--- trunk/src/wbc-gtk-actions.c (original)
+++ trunk/src/wbc-gtk-actions.c Thu Mar 6 21:03:42 2008
@@ -581,22 +581,26 @@
sv->edit_pos.row);
GODateConventions const *date_conv =
workbook_date_conv (sheet->workbook);
- GnmValue *v = value_new_int (
- datetime_timet_to_serial (time (NULL), date_conv));
+ time_t now = time (NULL);
+ gnm_float d;
+ GnmValue *v;
GOFormat *vfmt;
char *txt;
switch (what) {
case 1:
+ d = datetime_timet_to_serial_raw (now, date_conv);
vfmt = go_format_default_time ();
go_format_ref (vfmt);
break;
case 2:
+ d = datetime_timet_to_serial (now, date_conv);
vfmt = gnm_format_for_date_editing (cell);
break;
case 3: {
GString *fstr;
+ d = datetime_timet_to_serial_raw (now, date_conv);
vfmt = gnm_format_for_date_editing (cell);
fstr = g_string_new (go_format_as_XL (vfmt));
go_format_unref (vfmt);
@@ -611,6 +615,7 @@
g_assert_not_reached ();
}
+ v = value_new_float (d);
txt = format_value (vfmt, v, NULL, -1, date_conv);
wb_control_edit_line_set (wbc, txt);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]