diff options
author | Mikael Hallendal <micke@codefactory.se> | 2001-06-20 23:56:15 +0800 |
---|---|---|
committer | Mikael Hallendal <hallski@src.gnome.org> | 2001-06-20 23:56:15 +0800 |
commit | 36fcd68e24be361612776f7b23a08f36dfe9ee72 (patch) | |
tree | 0864774ac99e5fa98cb1dbc03fc4d766b4db64c1 /widgets | |
parent | 2860ff9732606baff5fcb4583ad2acff874c2d8a (diff) | |
download | gsoc2013-evolution-36fcd68e24be361612776f7b23a08f36dfe9ee72.tar.gz gsoc2013-evolution-36fcd68e24be361612776f7b23a08f36dfe9ee72.tar.zst gsoc2013-evolution-36fcd68e24be361612776f7b23a08f36dfe9ee72.zip |
send the value to e_table_model_set_value_at as a string as in
2001-06-20 Mikael Hallendal <micke@codefactory.se>
* 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
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/table/e-cell-spin-button.c | 14 |
1 files 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, |