diff options
author | Radek Doulik <rodo@ximian.com> | 2004-07-13 19:07:19 +0800 |
---|---|---|
committer | Radek Doulik <rodo@src.gnome.org> | 2004-07-13 19:07:19 +0800 |
commit | e5d4f6b7d22530f4642aa98c55029398ee943b5d (patch) | |
tree | 12a0463bd5dfed339e8cde26117bf830243ea478 /calendar/gui/e-cal-model-tasks.c | |
parent | 201b027d54d5738ddb43cb65fbf639e968a99350 (diff) | |
download | gsoc2013-evolution-e5d4f6b7d22530f4642aa98c55029398ee943b5d.tar.gz gsoc2013-evolution-e5d4f6b7d22530f4642aa98c55029398ee943b5d.tar.zst gsoc2013-evolution-e5d4f6b7d22530f4642aa98c55029398ee943b5d.zip |
as below
2004-07-08 Radek Doulik <rodo@ximian.com>
* gui/e-cal-model.c (e_cal_model_date_value_to_string): as below
* gui/e-cal-model-calendar.c (ecmc_value_to_string): as below
* gui/e-cal-model.c (ecm_value_to_string): as below
* gui/e-cal-model-tasks.c (ecmt_value_to_string): dup the string
value, it's free-ed later. instead of returning NULL return
g_strdup ("") as gal does
Fixes #56271
svn path=/trunk/; revision=26634
Diffstat (limited to 'calendar/gui/e-cal-model-tasks.c')
-rw-r--r-- | calendar/gui/e-cal-model-tasks.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/calendar/gui/e-cal-model-tasks.c b/calendar/gui/e-cal-model-tasks.c index 7c0fb08638..463f812c8f 100644 --- a/calendar/gui/e-cal-model-tasks.c +++ b/calendar/gui/e-cal-model-tasks.c @@ -992,8 +992,8 @@ ecmt_value_to_string (ETableModel *etm, int col, const void *value) { ECalModelTasks *model = (ECalModelTasks *) etm; - g_return_val_if_fail (E_IS_CAL_MODEL_TASKS (model), NULL); - g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_TASKS_FIELD_LAST, NULL); + g_return_val_if_fail (E_IS_CAL_MODEL_TASKS (model), g_strdup ("")); + g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_TASKS_FIELD_LAST, g_strdup ("")); if (col < E_CAL_MODEL_FIELD_LAST) return E_TABLE_MODEL_CLASS (parent_class)->value_to_string (etm, col, value); @@ -1009,7 +1009,7 @@ ecmt_value_to_string (ETableModel *etm, int col, const void *value) return e_cal_model_date_value_to_string (E_CAL_MODEL (model), value); case E_CAL_MODEL_TASKS_FIELD_COMPLETE : case E_CAL_MODEL_TASKS_FIELD_OVERDUE : - return value ? _("Yes") : _("No"); + return g_strdup (value ? _("Yes") : _("No")); case E_CAL_MODEL_TASKS_FIELD_PERCENT : if (GPOINTER_TO_INT (value) < 0) return g_strdup ("N/A"); @@ -1017,7 +1017,7 @@ ecmt_value_to_string (ETableModel *etm, int col, const void *value) return g_strdup_printf ("%i%%", GPOINTER_TO_INT (value)); } - return NULL; + return g_strdup (""); } /* ECalModel class methods */ |