evolution r35081 - in trunk/calendar: . gui gui/dialogs
- From: pchen svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r35081 - in trunk/calendar: . gui gui/dialogs
- Date: Sun, 24 Feb 2008 18:34:06 +0000 (GMT)
Author: pchen
Date: Sun Feb 24 18:34:05 2008
New Revision: 35081
URL: http://svn.gnome.org/viewvc/evolution?rev=35081&view=rev
Log:
2008-02-24 Chenthill Palanisamy <pchenthill novell com>
Fixes#516408
* gui/dialogs/e-send-options-utils.c
(e_sendoptions_utils_fill_component):
* gui/e-cal-model.c (search_by_id_and_client):
* gui/e-calendar-table.c (copy_row_cb),
(e_calendar_table_copy_clipboard):
* gui/e-calendar-view.c (e_calendar_view_copy_clipboard),
(icalcomp_contains_category):
* gui/e-day-view.c (model_rows_deleted_cb),
(e_day_view_find_event_from_uid),
(e_day_view_reshape_day_events),
(e_day_view_on_drag_data_get):
* gui/e-itip-control.c (update_item):
* gui/e-memo-table.c (copy_row_cb),
* (e_memo_table_copy_clipboard):
* gui/e-memos.c (obtain_list_of_components):
* gui/e-tasks.c (obtain_list_of_components):
* gui/e-week-view.c (model_rows_deleted_cb),
(e_week_view_reshape_events), (e_week_view_find_event_from_uid):
* gui/gnome-cal.c (gnome_calendar_purge):
* gui/itip-utils.c (comp_limit_attendees), (itip_send_comp),
(reply_to_calendar_comp), (itip_publish_comp): Free the memory
returned by libical
Modified:
trunk/calendar/ChangeLog
trunk/calendar/gui/dialogs/e-send-options-utils.c
trunk/calendar/gui/e-cal-model.c
trunk/calendar/gui/e-calendar-table.c
trunk/calendar/gui/e-calendar-view.c
trunk/calendar/gui/e-day-view.c
trunk/calendar/gui/e-itip-control.c
trunk/calendar/gui/e-memo-table.c
trunk/calendar/gui/e-memos.c
trunk/calendar/gui/e-tasks.c
trunk/calendar/gui/e-week-view.c
trunk/calendar/gui/gnome-cal.c
trunk/calendar/gui/itip-utils.c
Modified: trunk/calendar/gui/dialogs/e-send-options-utils.c
==============================================================================
--- trunk/calendar/gui/dialogs/e-send-options-utils.c (original)
+++ trunk/calendar/gui/dialogs/e-send-options-utils.c Sun Feb 24 18:34:05 2008
@@ -183,9 +183,14 @@
if (gopts->delay_enabled) {
struct icaltimetype temp;
+ char *str;
+
icaltimezone *zone = calendar_config_get_icaltimezone ();
temp = icaltime_from_timet_with_zone (gopts->delay_until, FALSE, zone);
- prop = icalproperty_new_x (icaltime_as_ical_string (temp));
+
+ str = icaltime_as_ical_string (temp);
+ prop = icalproperty_new_x (str);
+ g_free (str);
icalproperty_set_x_name (prop, "X-EVOLUTION-OPTIONS-DELAY");
icalcomponent_add_property (icalcomp, prop);
}
Modified: trunk/calendar/gui/e-cal-model.c
==============================================================================
--- trunk/calendar/gui/e-cal-model.c (original)
+++ trunk/calendar/gui/e-cal-model.c Sun Feb 24 18:34:05 2008
@@ -1297,7 +1297,8 @@
ECalModelComponent *comp_data = g_ptr_array_index (priv->objects, i);
if (comp_data) {
- const char *uid, *rid;
+ const char *uid;
+ char *rid = NULL;
gboolean has_rid = (id->rid && *id->rid);
uid = icalcomponent_get_uid (comp_data->icalcomp);
@@ -1306,11 +1307,15 @@
if (uid && *uid) {
if ((!client || comp_data->client == client) && !strcmp (id->uid, uid)) {
if (has_rid) {
- if (!(rid && *rid && !strcmp (rid, id->rid)))
+ if (!(rid && *rid && !strcmp (rid, id->rid))) {
+ g_free (rid);
continue;
+ }
}
+ g_free (rid);
return comp_data;
}
+ g_free (rid);
}
}
}
Modified: trunk/calendar/gui/e-calendar-table.c
==============================================================================
--- trunk/calendar/gui/e-calendar-table.c (original)
+++ trunk/calendar/gui/e-calendar-table.c Sun Feb 24 18:34:05 2008
@@ -881,6 +881,7 @@
icalcomponent_new_clone (child));
icalcomponent_free (child);
}
+ g_free (child);
}
/**
@@ -917,6 +918,7 @@
/* free memory */
icalcomponent_free (cal_table->tmp_vcal);
+ g_free (comp_str);
cal_table->tmp_vcal = NULL;
}
Modified: trunk/calendar/gui/e-calendar-view.c
==============================================================================
--- trunk/calendar/gui/e-calendar-view.c (original)
+++ trunk/calendar/gui/e-calendar-view.c Sun Feb 24 18:34:05 2008
@@ -771,6 +771,7 @@
/* free memory */
icalcomponent_free (vcal_comp);
+ g_free (comp_str);
g_list_free (selected);
}
@@ -2297,11 +2298,13 @@
for (property = icalcomponent_get_first_property (icalcomp, ICAL_CATEGORIES_PROPERTY);
property != NULL;
property = icalcomponent_get_next_property (icalcomp, ICAL_CATEGORIES_PROPERTY)) {
- const char *value = icalproperty_get_value_as_string (property);
+ char *value = icalproperty_get_value_as_string (property);
if (value && strcmp (category, value) == 0){
+ g_free (value);
return TRUE;
}
+ g_free (value);
}
return FALSE;
Modified: trunk/calendar/gui/e-day-view.c
==============================================================================
--- trunk/calendar/gui/e-day-view.c (original)
+++ trunk/calendar/gui/e-day-view.c Sun Feb 24 18:34:05 2008
@@ -619,7 +619,8 @@
for (i = row + count; i > row; i--) {
gint day, event_num;
- const char *uid, *rid = NULL;
+ const char *uid = NULL;
+ char *rid = NULL;
ECalModelComponent *comp_data;
comp_data = e_cal_model_get_component_at (E_CAL_MODEL (etm), i - 1);
@@ -637,6 +638,7 @@
if (e_day_view_find_event_from_uid (day_view, comp_data->client, uid, rid, &day, &event_num))
e_day_view_remove_event_cb (day_view, day, event_num, NULL);
+ g_free (rid);
}
gtk_widget_queue_draw (day_view->top_canvas);
@@ -2641,7 +2643,8 @@
{
EDayViewEvent *event;
gint day, event_num;
- const char *u, *r;
+ const char *u;
+ char *r = NULL;
if (!uid)
return FALSE;
@@ -2661,8 +2664,11 @@
r = icaltime_as_ical_string (icalcomponent_get_recurrenceid (event->comp_data->icalcomp));
if (!r || !*r)
continue;
- if (strcmp (rid, r) != 0)
+ if (strcmp (rid, r) != 0) {
+ g_free (r);
continue;
+ }
+ g_free (r);
}
*day_return = day;
@@ -5815,13 +5821,17 @@
e_day_view_reshape_day_event (day_view, day, event_num);
event = &g_array_index (day_view->events[day], EDayViewEvent, event_num);
current_comp_string = icalcomponent_as_ical_string (event->comp_data->icalcomp);
- if (day_view->last_edited_comp_string == NULL)
+ if (day_view->last_edited_comp_string == NULL) {
+ g_free (current_comp_string);
continue;
+ }
+
if (strncmp (current_comp_string, day_view->last_edited_comp_string,50) == 0) {
e_canvas_item_grab_focus (event->canvas_item, TRUE);
g_free (day_view->last_edited_comp_string);
day_view-> last_edited_comp_string = NULL;
}
+ g_free (current_comp_string);
}
}
@@ -8951,6 +8961,7 @@
}
icalcomponent_free (vcal);
+ g_free (comp_str);
}
}
Modified: trunk/calendar/gui/e-itip-control.c
==============================================================================
--- trunk/calendar/gui/e-itip-control.c (original)
+++ trunk/calendar/gui/e-itip-control.c Sun Feb 24 18:34:05 2008
@@ -1914,6 +1914,7 @@
{
EItipControlPrivate *priv;
struct icaltimetype stamp;
+ char *str;
icalproperty *prop;
icalcomponent *clone;
GtkWidget *dialog;
@@ -1931,7 +1932,9 @@
* and you then look at it in Outlook).
*/
stamp = icaltime_current_time_with_zone (icaltimezone_get_utc_timezone ());
- prop = icalproperty_new_x (icaltime_as_ical_string (stamp));
+ str = icaltime_as_ical_string (stamp);
+ prop = icalproperty_new_x (str);
+ g_free (str);
icalproperty_set_x_name (prop, "X-MICROSOFT-CDO-REPLYTIME");
icalcomponent_add_property (priv->ical_comp, prop);
Modified: trunk/calendar/gui/e-memo-table.c
==============================================================================
--- trunk/calendar/gui/e-memo-table.c (original)
+++ trunk/calendar/gui/e-memo-table.c Sun Feb 24 18:34:05 2008
@@ -555,6 +555,7 @@
icalcomponent_new_clone (child));
icalcomponent_free (child);
}
+ g_free (comp_str);
}
static void
@@ -610,6 +611,7 @@
/* free memory */
icalcomponent_free (memo_table->tmp_vcal);
+ g_free (comp_str);
memo_table->tmp_vcal = NULL;
}
Modified: trunk/calendar/gui/e-memos.c
==============================================================================
--- trunk/calendar/gui/e-memos.c (original)
+++ trunk/calendar/gui/e-memos.c Sun Feb 24 18:34:05 2008
@@ -423,6 +423,7 @@
}
icalcomponent_free (vcal);
+ g_free (comp_str);
}
}
Modified: trunk/calendar/gui/e-tasks.c
==============================================================================
--- trunk/calendar/gui/e-tasks.c (original)
+++ trunk/calendar/gui/e-tasks.c Sun Feb 24 18:34:05 2008
@@ -520,6 +520,7 @@
}
icalcomponent_free (vcal);
+ g_free (comp_str);
}
}
Modified: trunk/calendar/gui/e-week-view.c
==============================================================================
--- trunk/calendar/gui/e-week-view.c (original)
+++ trunk/calendar/gui/e-week-view.c Sun Feb 24 18:34:05 2008
@@ -396,7 +396,8 @@
for (i = row + count; i > row; i--) {
gint event_num;
- const char *uid, *rid = NULL;
+ const char *uid;
+ char *rid = NULL;
ECalModelComponent *comp_data;
comp_data = e_cal_model_get_component_at (E_CAL_MODEL (etm), i - 1);
@@ -414,6 +415,7 @@
if (e_week_view_find_event_from_uid (week_view, comp_data->client, uid, rid, &event_num))
e_week_view_remove_event_cb (week_view, event_num, NULL);
+ g_free (rid);
}
gtk_widget_queue_draw (week_view->main_canvas);
@@ -2535,6 +2537,7 @@
g_free (week_view->last_edited_comp_string);
week_view->last_edited_comp_string = NULL;
}
+ g_free (current_comp_string);
}
}
@@ -3663,7 +3666,8 @@
num_events = week_view->events->len;
for (event_num = 0; event_num < num_events; event_num++) {
- const char *u, *r;
+ const char *u;
+ char *r = NULL;
event = &g_array_index (week_view->events, EWeekViewEvent,
event_num);
@@ -3677,8 +3681,11 @@
r = icaltime_as_ical_string (icalcomponent_get_recurrenceid (event->comp_data->icalcomp));
if (!r || !*r)
continue;
- if (strcmp (rid, r) != 0)
+ if (strcmp (rid, r) != 0) {
+ g_free (r);
continue;
+ }
+ g_free (r);
}
*event_num_return = event_num;
Modified: trunk/calendar/gui/gnome-cal.c
==============================================================================
--- trunk/calendar/gui/gnome-cal.c (original)
+++ trunk/calendar/gui/gnome-cal.c Sun Feb 24 18:34:05 2008
@@ -3819,13 +3819,14 @@
GError *error = NULL;
if (e_cal_util_component_is_instance (m->data) || e_cal_util_component_has_recurrences (m->data)) {
- const char *rid = NULL;
+ char *rid = NULL;
struct icaltimetype recur_id = icalcomponent_get_recurrenceid (m->data);
if (!icaltime_is_null_time (recur_id) )
rid = icaltime_as_ical_string (recur_id);
e_cal_remove_object_with_mod (client, uid, rid, CALOBJ_MOD_ALL, &error);
+ g_free (rid);
} else {
e_cal_remove_object (client, uid, &error);
}
Modified: trunk/calendar/gui/itip-utils.c
==============================================================================
--- trunk/calendar/gui/itip-utils.c (original)
+++ trunk/calendar/gui/itip-utils.c Sun Feb 24 18:34:05 2008
@@ -884,7 +884,7 @@
prop != NULL;
prop = icalcomponent_get_next_property (icomp, ICAL_ATTENDEE_PROPERTY))
{
- const char *attendee;
+ char *attendee;
char *attendee_text;
icalparameter *param;
const char *attendee_sentby;
@@ -901,6 +901,7 @@
continue;
attendee_text = g_strdup (itip_strip_mailto (attendee));
+ g_free (attendee);
attendee_text = g_strstrip (attendee_text);
found = match = e_account_list_find(itip_addresses_get(), E_ACCOUNT_FIND_ID_ADDRESS, attendee_text) != NULL;
@@ -1228,7 +1229,7 @@
CORBA_char *subject = NULL, *body = NULL, *content_type = NULL;
CORBA_char *from = NULL, *filename = NULL, *description = NULL;
GNOME_Evolution_Composer_AttachmentData *attach_data = NULL;
- char *ical_string;
+ char *ical_string = NULL;
CORBA_Environment ev;
gboolean retval = FALSE;
@@ -1388,6 +1389,7 @@
CORBA_free (attach_data->_buffer);
CORBA_free (attach_data);
}
+ g_free (ical_string);
return retval;
}
@@ -1406,7 +1408,7 @@
CORBA_char *subject = NULL, *content_type = NULL;
char tmp [256];
CORBA_char *from = NULL;
- char *ical_string;
+ char *ical_string = NULL;
CORBA_Environment ev;
gboolean retval = FALSE;
@@ -1591,7 +1593,7 @@
CORBA_free (subject);
if (content_type != NULL)
CORBA_free (content_type);
-
+ g_free (ical_string);
return retval;
}
@@ -1749,7 +1751,7 @@
SoupSession *session;
SoupMessage *msg;
SoupURI *real_uri;
- char *ical_string;
+ char *ical_string = NULL;
toplevel = e_cal_util_new_top_level ();
icalcomponent_set_method (toplevel, ICAL_METHOD_PUBLISH);
@@ -1761,7 +1763,6 @@
icomp = comp_fb_normalize (icalcomp);
icalcomponent_add_component (toplevel, icomp);
- ical_string = icalcomponent_as_ical_string (toplevel);
/* Publish the component */
session = soup_session_async_new ();
@@ -1784,7 +1785,9 @@
g_object_unref (session);
return FALSE;
}
+
soup_message_set_flags (msg, SOUP_MESSAGE_NO_REDIRECT);
+ ical_string = icalcomponent_as_ical_string (toplevel);
soup_message_set_request (msg, "text/calendar", SOUP_MEMORY_TEMPORARY,
ical_string, strlen (ical_string));
@@ -1796,11 +1799,13 @@
msg->reason_phrase);
g_object_unref (msg);
g_object_unref (session);
+ g_free (ical_string);
return FALSE;
}
g_object_unref (msg);
g_object_unref (session);
+ g_free (ical_string);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]