diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-01-25 11:12:54 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-01-25 20:41:55 +0800 |
commit | bd5c704df902461748d07df496897669fc626e45 (patch) | |
tree | 2d3933c508e8d663233e1b56d232f085769dba6d /calendar | |
parent | e741ec3076ef6776611f8dc3f125011f9da62256 (diff) | |
download | gsoc2013-evolution-bd5c704df902461748d07df496897669fc626e45.tar.gz gsoc2013-evolution-bd5c704df902461748d07df496897669fc626e45.tar.zst gsoc2013-evolution-bd5c704df902461748d07df496897669fc626e45.zip |
Remove a couple silly ECalModel functions.
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/gui/e-cal-model.c | 24 | ||||
-rw-r--r-- | calendar/gui/e-cal-model.h | 3 | ||||
-rw-r--r-- | calendar/gui/e-day-view.c | 6 | ||||
-rw-r--r-- | calendar/gui/e-task-table.c | 2 | ||||
-rw-r--r-- | calendar/gui/e-week-view.c | 6 | ||||
-rw-r--r-- | calendar/gui/print.c | 4 |
6 files changed, 10 insertions, 35 deletions
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index 015aa61cec..58ca63e1cf 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -291,7 +291,7 @@ cal_model_finalize (GObject *object) g_warning ("comp_data is null\n"); continue; } - e_cal_model_free_component_data (comp_data); + g_object_unref (comp_data); } g_ptr_array_free (priv->objects, FALSE); @@ -2764,28 +2764,6 @@ e_cal_model_component_get_type (void) } /** - * e_cal_model_copy_component_data - */ -ECalModelComponent * -e_cal_model_copy_component_data (ECalModelComponent *comp_data) -{ - g_return_val_if_fail (comp_data != NULL, NULL); - - return g_object_ref (comp_data); -} - -/** - * e_cal_model_free_component_data - */ -void -e_cal_model_free_component_data (ECalModelComponent *comp_data) -{ - g_return_if_fail (comp_data != NULL); - - g_object_unref (comp_data); -} - -/** * e_cal_model_generate_instances * * cb function is not called with cb_data, but with ECalModelGenerateInstancesData which contains cb_data diff --git a/calendar/gui/e-cal-model.h b/calendar/gui/e-cal-model.h index a5228eb9da..2d30f1877f 100644 --- a/calendar/gui/e-cal-model.h +++ b/calendar/gui/e-cal-model.h @@ -235,9 +235,6 @@ ECalModelComponent * const ECalComponentId *id); gchar * e_cal_model_date_value_to_string(ECalModel *model, gconstpointer value); -ECalModelComponent * - e_cal_model_copy_component_data (ECalModelComponent *comp_data); -void e_cal_model_free_component_data (ECalModelComponent *comp_data); void e_cal_model_generate_instances (ECalModel *model, time_t start, time_t end, diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index 3a276a5aef..5b9d68b9ed 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -2074,7 +2074,7 @@ e_day_view_remove_event_cb (EDayView *day_view, if (event->canvas_item) gtk_object_destroy (GTK_OBJECT (event->canvas_item)); - e_cal_model_free_component_data (event->comp_data); + g_object_unref (event->comp_data); event->comp_data = NULL; if (day == E_DAY_VIEW_LONG_EVENT) { @@ -4466,7 +4466,7 @@ e_day_view_free_event_array (EDayView *day_view, if (event->canvas_item) gtk_object_destroy (GTK_OBJECT (event->canvas_item)); - e_cal_model_free_component_data (event->comp_data); + g_object_unref (event->comp_data); } g_array_set_size (array, 0); @@ -4506,7 +4506,7 @@ e_day_view_add_event (ECalComponent *comp, e_calendar_view_get_timezone (E_CALENDAR_VIEW (add_event_data->day_view))); if (add_event_data->comp_data) { - event.comp_data = e_cal_model_copy_component_data (add_event_data->comp_data); + event.comp_data = g_object_ref (add_event_data->comp_data); } else { event.comp_data = g_object_new (E_TYPE_CAL_MODEL_COMPONENT, NULL); diff --git a/calendar/gui/e-task-table.c b/calendar/gui/e-task-table.c index b39af94db0..ede56b7b89 100644 --- a/calendar/gui/e-task-table.c +++ b/calendar/gui/e-task-table.c @@ -1620,7 +1620,7 @@ hide_completed_rows (ECalModel *model, changed = TRUE; if (g_ptr_array_remove (comp_objects, comp_data)) - e_cal_model_free_component_data (comp_data); + g_object_unref (comp_data); } e_cal_component_free_id (id); g_object_unref (comp); diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index a85ed63b82..2c44d26458 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -2165,7 +2165,7 @@ e_week_view_remove_event_cb (EWeekView *week_view, if (week_view->popup_event_num == event_num) week_view->popup_event_num = -1; - e_cal_model_free_component_data (event->comp_data); + g_object_unref (event->comp_data); event->comp_data = NULL; if (week_view->spans) { @@ -2603,7 +2603,7 @@ e_week_view_free_events (EWeekView *week_view) for (event_num = 0; event_num < week_view->events->len; event_num++) { event = &g_array_index (week_view->events, EWeekViewEvent, event_num); - e_cal_model_free_component_data (event->comp_data); + g_object_unref (event->comp_data); } g_array_set_size (week_view->events, 0); @@ -2672,7 +2672,7 @@ e_week_view_add_event (ECalComponent *comp, e_calendar_view_get_timezone (E_CALENDAR_VIEW (add_event_data->week_view))); if (add_event_data->comp_data) { - event.comp_data = e_cal_model_copy_component_data (add_event_data->comp_data); + event.comp_data = g_object_ref (add_event_data->comp_data); } else { event.comp_data = g_object_new (E_TYPE_CAL_MODEL_COMPONENT, NULL); diff --git a/calendar/gui/print.c b/calendar/gui/print.c index 1781788a57..3c7706d67b 100644 --- a/calendar/gui/print.c +++ b/calendar/gui/print.c @@ -1735,7 +1735,7 @@ print_week_summary_cb (ECalComponent *comp, start_tt = icaltime_from_timet_with_zone (start, FALSE, zone); end_tt = icaltime_from_timet_with_zone (end, FALSE, zone); - event.comp_data = e_cal_model_copy_component_data (mdata->comp_data); + event.comp_data = g_object_ref (mdata->comp_data); event.start = start; event.end = end; @@ -1846,7 +1846,7 @@ print_week_summary (GtkPrintContext *context, GnomeCalendar *gcal, /* Free everything. */ for (event_num = 0; event_num < psi.events->len; event_num++) { event = &g_array_index (psi.events, EWeekViewEvent, event_num); - e_cal_model_free_component_data (event->comp_data); + g_object_unref (event->comp_data); } g_array_free (psi.events, TRUE); g_array_free (spans, TRUE); |