From 36fcd68e24be361612776f7b23a08f36dfe9ee72 Mon Sep 17 00:00:00 2001 From: Mikael Hallendal Date: Wed, 20 Jun 2001 15:56:15 +0000 Subject: send the value to e_table_model_set_value_at as a string as in 2001-06-20 Mikael Hallendal * e-cell-spin-button.c (e_cell_spin_button_step): send the value to e_table_model_set_value_at as a string as in e_cell_number. (e_cell_spin_button_step_float): send the value to e_table_model_set_value_at as a string as in e_cell_number_float. svn path=/trunk/; revision=10336 --- widgets/table/e-cell-spin-button.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/widgets/table/e-cell-spin-button.c b/widgets/table/e-cell-spin-button.c index ae28af3885..a7ea5ef9b7 100644 --- a/widgets/table/e-cell-spin-button.c +++ b/widgets/table/e-cell-spin-button.c @@ -592,6 +592,7 @@ e_cell_spin_button_step (ECellSpinButton *ecsb, ETableModel *etm; gint value; gint new_value; + gchar *str_value; g_return_if_fail (ecsb != NULL); g_return_if_fail (M_IS_CELL_SPIN_BUTTON (ecsb)); @@ -616,7 +617,11 @@ e_cell_spin_button_step (ECellSpinButton *ecsb, break; }; - e_table_model_set_value_at (etm, col, row, GINT_TO_POINTER(new_value)); + str_value = g_strdup_printf ("%d", new_value); + + e_table_model_set_value_at (etm, col, row, str_value); + + g_free (str_value); } void @@ -631,6 +636,7 @@ e_cell_spin_button_step_float (ECellSpinButton *ecsb, ETableModel *etm; gfloat value; gfloat new_value; + gchar *str_value; g_return_if_fail (ecsb != NULL); g_return_if_fail (M_IS_CELL_SPIN_BUTTON (ecsb)); @@ -653,8 +659,12 @@ e_cell_spin_button_step_float (ECellSpinButton *ecsb, default: break; }; + + str_value = g_strdup_printf ("%f", new_value); - e_table_model_set_value_at (etm, col, row, &new_value); + e_table_model_set_value_at (etm, col, row, str_value); + + g_free (str_value); } E_MAKE_TYPE (e_cell_spin_button, "ECellSpinButton", ECellSpinButton, -- cgit