diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2011-06-07 11:56:21 +0200 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2011-06-07 11:56:21 +0200 |
commit | 6ddc87c4e0d7375932aa329bab2a657cb5192122 (patch) | |
tree | f3b698ec91d6aa5caae806119f89e7d438f1f49b | |
parent | 54c210f010d4a38b508bdf4a4479fcbe3942fdc4 (diff) | |
download | evolution-data-server-6ddc87c4e0d7375932aa329bab2a657cb5192122.tar.gz |
e-data-cal-view.c: fixed cherry-pick mistake
When cherry-picking from master branch, code using
e_util_utf8_make_valid() was accidentally added to the gnome-3.0. That
function is not available there because the corresponding bug fix in
master has not been backported (was considered too complex).
This patch removes e_util_utf8_make_valid() again.
-rw-r--r-- | calendar/libedata-cal/e-data-cal-view.c | 38 |
1 files changed, 8 insertions, 30 deletions
diff --git a/calendar/libedata-cal/e-data-cal-view.c b/calendar/libedata-cal/e-data-cal-view.c index a940c7a23..4ca6465e0 100644 --- a/calendar/libedata-cal/e-data-cal-view.c +++ b/calendar/libedata-cal/e-data-cal-view.c @@ -269,7 +269,6 @@ notify_remove (EDataCalView *view, ECalComponentId *id) { EDataCalViewPrivate *priv = view->priv; gchar *ids; - gchar *uid, *rid; size_t uid_len, rid_len; send_pending_adds (view); @@ -280,37 +279,16 @@ notify_remove (EDataCalView *view, ECalComponentId *id) } /* store ECalComponentId as <uid>[\n<rid>] (matches D-Bus API) */ - if (id->uid) { - uid = e_util_utf8_make_valid (id->uid); - uid_len = strlen (uid); - } else { - uid = NULL; - uid_len = 0; - } - if (id->rid) { - rid = e_util_utf8_make_valid (id->rid); - rid_len = strlen (rid); - } else { - rid = NULL; - rid_len = 0; - } - if (uid_len && !rid_len) { - /* shortcut */ - ids = uid; - uid = NULL; - } else { - /* concatenate */ - ids = g_malloc (uid_len + rid_len + (rid_len ? 2 : 1)); - if (uid_len) - strcpy (ids, uid); - if (rid_len) { - ids[uid_len] = '\n'; - strcpy (ids + uid_len + 1, rid); - } + uid_len = id->uid ? strlen (id->uid) : 0; + rid_len = id->rid ? strlen (id->rid) : 0; + ids = g_malloc (uid_len + rid_len + (rid_len ? 2 : 1)); + if (uid_len) + strcpy (ids, id->uid); + if (rid_len) { + ids[uid_len] = '\n'; + strcpy (ids + uid_len + 1, id->rid); } g_array_append_val (priv->removes, ids); - g_free (uid); - g_free (rid); g_hash_table_remove (priv->ids, id); |