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.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.c')
-rw-r--r-- | calendar/gui/e-cal-model.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index e315323472..c2d4fc57ad 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -894,7 +894,7 @@ ecm_value_is_empty (ETableModel *etm, int col, const void *value) static char * ecm_value_to_string (ETableModel *etm, int col, const void *value) { - g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_FIELD_LAST, NULL); + g_return_val_if_fail (col >= 0 && col < E_CAL_MODEL_FIELD_LAST, g_strdup ("")); switch (col) { case E_CAL_MODEL_FIELD_CATEGORIES : @@ -906,19 +906,19 @@ ecm_value_to_string (ETableModel *etm, int col, const void *value) return e_cal_model_date_value_to_string (E_CAL_MODEL (etm), value); case E_CAL_MODEL_FIELD_ICON : if (GPOINTER_TO_INT (value) == 0) - return _("Normal"); + return g_strdup (_("Normal")); else if (GPOINTER_TO_INT (value) == 1) - return _("Recurring"); + return g_strdup (_("Recurring")); else - return _("Assigned"); + return g_strdup (_("Assigned")); case E_CAL_MODEL_FIELD_HAS_ALARMS : - return value ? _("Yes") : _("No"); + return g_strdup (value ? _("Yes") : _("No")); case E_CAL_MODEL_FIELD_COLOR : case E_CAL_MODEL_FIELD_COMPONENT : - return NULL; + return g_strdup (""); } - return NULL; + return g_strdup (""); } /* ECalModel class methods */ @@ -1787,7 +1787,7 @@ e_cal_model_date_value_to_string (ECalModel *model, const void *value) struct tm tmp_tm; char buffer[64]; - g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL); + g_return_val_if_fail (E_IS_CAL_MODEL (model), g_strdup ("")); priv = model->priv; |