[gnome-calendar/wip/mcrha/eds-libical-glib] Adapt to the latest libical-glib API changes
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/wip/mcrha/eds-libical-glib] Adapt to the latest libical-glib API changes
- Date: Thu, 2 May 2019 12:09:31 +0000 (UTC)
commit 35a4e9c4663ed4e1f247b4067b1c91582333b18f
Author: Milan Crha <mcrha redhat com>
Date: Thu May 2 14:11:19 2019 +0200
Adapt to the latest libical-glib API changes
contrib/evolution/e-cal-data-model.c | 16 ++++++++--------
src/gcal-application.c | 2 +-
src/gcal-event.c | 4 ++--
src/gcal-recurrence.c | 2 +-
src/gcal-shell-search-provider.c | 2 +-
src/gcal-utils.c | 6 +++---
src/gcal-window.c | 6 +++---
src/views/gcal-month-view.c | 4 ++--
src/views/gcal-week-grid.c | 2 +-
src/views/gcal-week-header.c | 2 +-
src/views/gcal-week-view.c | 2 +-
src/views/gcal-year-view.c | 16 ++++++++--------
12 files changed, 32 insertions(+), 32 deletions(-)
---
diff --git a/contrib/evolution/e-cal-data-model.c b/contrib/evolution/e-cal-data-model.c
index 077e3ae8..4e13d7fe 100644
--- a/contrib/evolution/e-cal-data-model.c
+++ b/contrib/evolution/e-cal-data-model.c
@@ -44,7 +44,7 @@ cal_comp_get_instance_times (ECalClient *client,
if (!end_time || i_cal_time_is_null_time (end_time)) {
g_clear_object (&end_time);
- end_time = i_cal_time_new_clone (start_time);
+ end_time = i_cal_time_clone (start_time);
}
if (i_cal_time_get_timezone (start_time)) {
@@ -74,7 +74,7 @@ cal_comp_get_instance_times (ECalClient *client,
}
}
- *out_instance_start = i_cal_time_new_clone (start_time);
+ *out_instance_start = i_cal_time_clone (start_time);
i_cal_time_set_timezone (*out_instance_start, zone);
if (i_cal_time_get_timezone (end_time)) {
@@ -107,7 +107,7 @@ cal_comp_get_instance_times (ECalClient *client,
}
}
- *out_instance_end = i_cal_time_new_clone (end_time);
+ *out_instance_end = i_cal_time_clone (end_time);
i_cal_time_set_timezone (*out_instance_end, zone);
g_clear_object (&start_time);
@@ -279,8 +279,8 @@ component_data_equal (ComponentData *comp_data1,
/* Maybe not so effective compare, but might be still more effective
than updating whole UI with false notifications */
- as_str1 = i_cal_component_as_ical_string_r (icomp1);
- as_str2 = i_cal_component_as_ical_string_r (icomp2);
+ as_str1 = i_cal_component_as_ical_string (icomp1);
+ as_str2 = i_cal_component_as_ical_string (icomp2);
equal = g_strcmp0 (as_str1, as_str2) == 0;
@@ -1183,7 +1183,7 @@ cal_data_model_instance_generated (ICalComponent *icomp,
g_clear_object (&prop);
}
- comp_copy = e_cal_component_new_from_icalcomponent (i_cal_component_new_clone (icomp));
+ comp_copy = e_cal_component_new_from_icalcomponent (i_cal_component_clone (icomp));
g_return_val_if_fail (comp_copy != NULL, FALSE);
tt = i_cal_component_get_dtstart (e_cal_component_get_icalcomponent (comp_copy));
@@ -1373,7 +1373,7 @@ cal_data_model_process_modified_or_added_objects (ECalClientView *view,
/* This component requires an expand of recurrences, which
will be done in a dedicated thread, thus remember it */
to_expand_recurrences = g_slist_prepend (to_expand_recurrences,
- i_cal_component_new_clone (icomp));
+ i_cal_component_clone (icomp));
} else {
/* Single or detached instance, the simple case */
ECalComponent *comp;
@@ -1385,7 +1385,7 @@ cal_data_model_process_modified_or_added_objects (ECalClientView *view,
i_cal_component_get_status (icomp) == I_CAL_STATUS_CANCELLED)
continue;
- comp = e_cal_component_new_from_icalcomponent (i_cal_component_new_clone
(icomp));
+ comp = e_cal_component_new_from_icalcomponent (i_cal_component_clone (icomp));
if (!comp)
continue;
diff --git a/src/gcal-application.c b/src/gcal-application.c
index 4899b110..101150e8 100644
--- a/src/gcal-application.c
+++ b/src/gcal-application.c
@@ -306,7 +306,7 @@ gcal_application_activate (GApplication *application)
tz = gcal_manager_get_system_timezone (self->manager);
- self->initial_date = i_cal_time_current_time_with_zone (tz);
+ self->initial_date = i_cal_time_new_current_with_zone (tz);
i_cal_time_set_timezone (self->initial_date, tz);
}
diff --git a/src/gcal-event.c b/src/gcal-event.c
index 635dfe6e..18892009 100644
--- a/src/gcal-event.c
+++ b/src/gcal-event.c
@@ -357,7 +357,7 @@ gcal_event_set_component_internal (GcalEvent *self,
"Event '%s' has an invalid start date", gcal_event_get_uid (self));
e_cal_component_datetime_free (start);
- start = e_cal_component_datetime_new_take (i_cal_time_today (), NULL);
+ start = e_cal_component_datetime_new_take (i_cal_time_new_today (), NULL);
}
GCAL_TRACE_MSG ("Retrieving start timezone");
@@ -1210,7 +1210,7 @@ gcal_event_add_alarm (GcalEvent *self,
alarm = e_cal_component_alarm_new ();
/* Setup the alarm trigger */
- duration = i_cal_duration_null_duration ();
+ duration = i_cal_duration_new_null_duration ();
i_cal_duration_set_is_neg (duration, TRUE);
i_cal_duration_set_minutes (duration, type);
diff --git a/src/gcal-recurrence.c b/src/gcal-recurrence.c
index d2b3ffb6..c2ab8e6a 100644
--- a/src/gcal-recurrence.c
+++ b/src/gcal-recurrence.c
@@ -310,7 +310,7 @@ gcal_recurrence_to_rrule (GcalRecurrence *recur)
{
ICalTime *until;
- until = i_cal_time_null_time ();
+ until = i_cal_time_new_null_time ();
i_cal_time_set_date (until,
g_date_time_get_year (recur->limit.until),
g_date_time_get_month (recur->limit.until),
diff --git a/src/gcal-shell-search-provider.c b/src/gcal-shell-search-provider.c
index 33b9ee45..c06f1ff9 100644
--- a/src/gcal-shell-search-provider.c
+++ b/src/gcal-shell-search-provider.c
@@ -87,7 +87,7 @@ execute_search (GcalShellSearchProvider *self)
GCAL_RETURN (TRUE);
zone = gcal_manager_get_system_timezone (self->manager);
- date = i_cal_time_current_time_with_zone (zone);
+ date = i_cal_time_new_current_with_zone (zone);
i_cal_time_adjust (date, -7, 0, 0, 0); /* -1 week from today */
range_start = i_cal_time_as_timet_with_zone (date, zone);
diff --git a/src/gcal-utils.c b/src/gcal-utils.c
index cd75cc73..edcbf56f 100644
--- a/src/gcal-utils.c
+++ b/src/gcal-utils.c
@@ -149,7 +149,7 @@ datetime_to_icaltime (GDateTime *dt)
if (!dt)
return NULL;
- idt = i_cal_time_null_time ();
+ idt = i_cal_time_new_null_time ();
i_cal_time_set_date (idt,
g_date_time_get_year (dt),
@@ -646,8 +646,8 @@ get_start_of_week (ICalTime *date)
ICalTime *new_date;
GDateTime *dt;
- new_date = i_cal_time_from_day_of_year (i_cal_time_start_doy_week (date, get_first_weekday () + 1),
- i_cal_time_get_year (date));
+ new_date = i_cal_time_new_from_day_of_year (i_cal_time_start_doy_week (date, get_first_weekday () + 1),
+ i_cal_time_get_year (date));
i_cal_time_set_is_date (new_date, FALSE);
i_cal_time_set_time (new_date, 0, 0, 0);
diff --git a/src/gcal-window.c b/src/gcal-window.c
index 7d422bf5..3036aac0 100644
--- a/src/gcal-window.c
+++ b/src/gcal-window.c
@@ -304,7 +304,7 @@ update_active_date (GcalWindow *window,
previous_date = window->active_date;
window->active_date = new_date;
- tmp_str = i_cal_time_as_ical_string_r (new_date);
+ tmp_str = i_cal_time_as_ical_string (new_date);
g_debug ("Updating active date to %s", tmp_str);
g_free (tmp_str);
@@ -389,7 +389,7 @@ date_updated (GcalWindow *window,
move_today = window->today_button == (GtkWidget*) button;
move_back = window->back_button == (GtkWidget*) button;
- new_date = i_cal_time_new_clone (window->active_date);
+ new_date = i_cal_time_clone (window->active_date);
if (move_today)
{
@@ -1543,7 +1543,7 @@ gcal_window_init (GcalWindow *self)
self,
NULL);
- self->active_date = i_cal_time_null_time ();
+ self->active_date = i_cal_time_new_null_time ();
self->rtl = gtk_widget_get_direction (GTK_WIDGET (self)) == GTK_TEXT_DIR_RTL;
/*
diff --git a/src/views/gcal-month-view.c b/src/views/gcal-month-view.c
index 3b0c6e34..8ca0766f 100644
--- a/src/views/gcal-month-view.c
+++ b/src/views/gcal-month-view.c
@@ -1148,11 +1148,11 @@ gcal_month_view_set_date (GcalView *view,
g_clear_object (&self->date);
- self->date = i_cal_time_new_clone (date);
+ self->date = i_cal_time_clone (date);
self->days_delay = (time_day_of_week (1, i_cal_time_get_month (self->date) - 1, i_cal_time_get_year
(self->date)) - self->first_weekday + 7) % 7;
self->keyboard_cell = self->days_delay + (i_cal_time_get_day (self->date) - 1);
- icalstr = i_cal_time_as_ical_string_r (date);
+ icalstr = i_cal_time_as_ical_string (date);
GCAL_TRACE_MSG ("new date: %s", icalstr);
g_free (icalstr);
diff --git a/src/views/gcal-week-grid.c b/src/views/gcal-week-grid.c
index e0479f33..334a5725 100644
--- a/src/views/gcal-week-grid.c
+++ b/src/views/gcal-week-grid.c
@@ -1264,7 +1264,7 @@ gcal_week_grid_set_date (GcalWeekGrid *self,
ICalTime *date)
{
g_clear_object (&self->active_date);
- self->active_date = i_cal_time_new_clone (date);
+ self->active_date = i_cal_time_clone (date);
gtk_widget_queue_resize (GTK_WIDGET (self));
gtk_widget_queue_draw (GTK_WIDGET (self));
diff --git a/src/views/gcal-week-header.c b/src/views/gcal-week-header.c
index 6c3e2943..37527d3e 100644
--- a/src/views/gcal-week-header.c
+++ b/src/views/gcal-week-header.c
@@ -2016,7 +2016,7 @@ gcal_week_header_set_date (GcalWeekHeader *self,
ICalTime *old_date, *new_date;
old_date = self->active_date;
- new_date = i_cal_time_new_clone (date);
+ new_date = i_cal_time_clone (date);
/*
* If the active date changed, but we're still in the same week,
diff --git a/src/views/gcal-week-view.c b/src/views/gcal-week-view.c
index 134a261e..fe79168c 100644
--- a/src/views/gcal-week-view.c
+++ b/src/views/gcal-week-view.c
@@ -196,7 +196,7 @@ gcal_week_view_set_date (GcalView *view,
GCAL_ENTRY;
g_clear_object (&self->date);
- self->date = i_cal_time_new_clone (date);
+ self->date = i_cal_time_clone (date);
/* Propagate the new date */
gcal_week_grid_set_date (GCAL_WEEK_GRID (self->week_grid), date);
diff --git a/src/views/gcal-year-view.c b/src/views/gcal-year-view.c
index abf9b397..3f52adaa 100644
--- a/src/views/gcal-year-view.c
+++ b/src/views/gcal-year-view.c
@@ -238,14 +238,14 @@ update_selected_dates_from_button_data (GcalYearView *year_view)
g_clear_object (&year_view->start_selected_date);
if (year_view->date)
- year_view->start_selected_date = i_cal_time_new_clone (year_view->date);
+ year_view->start_selected_date = i_cal_time_clone (year_view->date);
else
- year_view->start_selected_date = i_cal_time_new_clone (current_date);
+ year_view->start_selected_date = i_cal_time_clone (current_date);
i_cal_time_set_time (year_view->start_selected_date, 0, 0, 0);
g_clear_object (&year_view->end_selected_date);
- year_view->end_selected_date = i_cal_time_new_clone (year_view->start_selected_date);
+ year_view->end_selected_date = i_cal_time_clone (year_view->start_selected_date);
i_cal_time_set_time (year_view->end_selected_date, 23, 59, 59);
i_cal_time_normalize_inplace (year_view->end_selected_date);
@@ -507,7 +507,7 @@ update_sidebar_headers (GtkListBoxRow *row,
row_header = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
now = g_date_time_new_now_local ();
- date = i_cal_time_new_clone (year_view->start_selected_date);
+ date = i_cal_time_clone (year_view->start_selected_date);
i_cal_time_adjust (date, row_shift, 0, 0, 0);
dt = icaltime_to_datetime (date);
@@ -544,7 +544,7 @@ update_date (GcalYearView *year_view,
needs_reset = TRUE;
g_clear_object (&year_view->date);
- year_view->date = i_cal_time_new_clone (new_date);
+ year_view->date = i_cal_time_clone (new_date);
year_view->first_week_of_year = get_last_week_of_year_dmy (year_view->first_weekday,
1, G_DATE_JANUARY, i_cal_time_get_year
(year_view->date));
@@ -806,7 +806,7 @@ draw_month_grid (GcalYearView *year_view,
days = days_delay + icaltime_days_in_month (month_nr + 1, i_cal_time_get_year (year_view->date));
shown_rows = ceil (days / 7.0);
- today = i_cal_time_today ();
+ today = i_cal_time_new_today ();
i_cal_time_set_date (today, i_cal_time_get_year (year_view->date), month_nr + 1, 1);
i_cal_time_set_time (today, 0, 0, 0);
i_cal_time_set_timezone (today, gcal_manager_get_system_timezone (year_view->manager));
@@ -2026,9 +2026,9 @@ gcal_year_view_init (GcalYearView *self)
self->navigator_grid = g_new0 (GridData, 1);
self->selected_data = g_new0 (ButtonData, 1);
- self->start_selected_date = i_cal_time_null_time ();
+ self->start_selected_date = i_cal_time_new_null_time ();
i_cal_time_set_timezone (self->start_selected_date, e_cal_util_get_system_timezone ());
- self->end_selected_date = i_cal_time_null_time ();
+ self->end_selected_date = i_cal_time_new_null_time ();
i_cal_time_set_timezone (self->end_selected_date, e_cal_util_get_system_timezone ());
/* bind GNOME Shell' show week numbers property to GNOME Calendar's one */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]