aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2004-05-07 22:03:51 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-05-07 22:03:51 +0800
commit1f5bf3a71fdf568c6b3c7b8f5bb548635cafd41a (patch)
tree3d25c56933de80772252c5777ee0ea9fb49bce23 /calendar/gui
parent4e919deeff40049f3ca1dda409d21ea84f7700bd (diff)
downloadgsoc2013-evolution-1f5bf3a71fdf568c6b3c7b8f5bb548635cafd41a.tar.gz
gsoc2013-evolution-1f5bf3a71fdf568c6b3c7b8f5bb548635cafd41a.tar.zst
gsoc2013-evolution-1f5bf3a71fdf568c6b3c7b8f5bb548635cafd41a.zip
fix comment and check
2004-05-07 JP Rosevear <jpr@ximian.com> * gui/e-cal-model.c (ecm_is_cell_editable): fix comment and check * gui/e-cal-model-tasks.c (ecmt_set_value_at): set a parent field properly (ecmt_is_cell_editable): fix comment and check svn path=/trunk/; revision=25823
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/e-cal-model-tasks.c9
-rw-r--r--calendar/gui/e-cal-model.c4
2 files changed, 7 insertions, 6 deletions
diff --git a/calendar/gui/e-cal-model-tasks.c b/calendar/gui/e-cal-model-tasks.c
index 8128c40d76..5067e2557d 100644
--- a/calendar/gui/e-cal-model-tasks.c
+++ b/calendar/gui/e-cal-model-tasks.c
@@ -758,6 +758,11 @@ ecmt_set_value_at (ETableModel *etm, int col, int row, const void *value)
g_return_if_fail (col >= 0 && col < E_CAL_MODEL_TASKS_FIELD_LAST);
g_return_if_fail (row >= 0 && row < e_table_model_row_count (etm));
+ if (col < E_CAL_MODEL_FIELD_LAST) {
+ E_TABLE_MODEL_CLASS (parent_class)->set_value_at (etm, col, row, value);
+ return;
+ }
+
comp_data = e_cal_model_get_component_at (E_CAL_MODEL (model), row);
if (!comp_data)
return;
@@ -808,9 +813,7 @@ ecmt_is_cell_editable (ETableModel *etm, int col, int row)
priv = model->priv;
g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_TASKS_FIELD_LAST, FALSE);
-
- /* FIXME: We can't check this as 'click-to-add' passes row 0. */
- /* g_return_val_if_fail (row >= 0 && row < e_table_model_get_row_count (etm), FALSE); */
+ g_return_val_if_fail (row >= -1 && row < e_table_model_get_row_count (etm), FALSE);
if (col < E_CAL_MODEL_FIELD_LAST)
return E_TABLE_MODEL_CLASS (parent_class)->is_cell_editable (etm, col, row);
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index 25a866db3a..ca3ca1e863 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -671,9 +671,7 @@ ecm_is_cell_editable (ETableModel *etm, int col, int row)
priv = model->priv;
g_return_val_if_fail (col >= 0 && col <= E_CAL_MODEL_FIELD_LAST, FALSE);
-
- /* FIXME: We can't check this as 'click-to-add' passes row 0. */
- /*g_return_val_if_fail (row >= 0 && row < priv->objects->len, FALSE);*/
+ g_return_val_if_fail (row >= -1 && row < priv->objects->len, FALSE);
switch (col) {
case E_CAL_MODEL_FIELD_CATEGORIES :