[evolution-data-server/gnome-3-0] e-data-cal-view.c: fixed cherry-pick mistake
- From: Patrick Ohly <pohly src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-0] e-data-cal-view.c: fixed cherry-pick mistake
- Date: Tue, 7 Jun 2011 09:59:35 +0000 (UTC)
commit 6ddc87c4e0d7375932aa329bab2a657cb5192122
Author: Patrick Ohly <patrick ohly intel com>
Date: Tue Jun 7 11:56:21 2011 +0200
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.
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 a940c7a..4ca6465 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]