From d0fcf91106376d94ae97e039cdd1c35d141a6a9b Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 3 Nov 2010 16:35:02 +0100 Subject: Bug #612181 - Show recurring events in italic in date navigator --- calendar/gui/gnome-cal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'calendar/gui/gnome-cal.c') diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 9b9400dd09..3945003a68 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -775,7 +775,7 @@ dn_e_cal_view_objects_added_cb (ECalView *query, GList *objects, gpointer data) tag_calendar_by_comp ( priv->date_navigator, comp, e_cal_view_get_client (query), - NULL, FALSE, TRUE); + NULL, FALSE, TRUE, TRUE); g_object_unref (comp); } } -- cgit v1.2.3 From ca3faa17a9a26479ce39649976264f96cbaf5f4c Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 6 Dec 2010 14:23:20 +0100 Subject: Free/busy meeting view doesn't work due to non-working extension --- calendar/gui/gnome-cal.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'calendar/gui/gnome-cal.c') diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 3945003a68..c27cfcc5e4 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -489,6 +489,9 @@ gnome_calendar_constructed (GObject *object) G_CALLBACK (gnome_calendar_notify_week_start_day_cb), gcal); gnome_calendar_goto_today (gcal); + + if (G_OBJECT_CLASS (gnome_calendar_parent_class)->constructed) + G_OBJECT_CLASS (gnome_calendar_parent_class)->constructed (object); } /* Class initialization function for the gnome calendar */ -- cgit v1.2.3 From a3ba231fcc2746e664a67c85d88eb49a64813989 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 9 Nov 2010 08:48:33 -0500 Subject: Drop backward-compatibility cruft. --- calendar/gui/gnome-cal.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'calendar/gui/gnome-cal.c') diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index c27cfcc5e4..11b1e29ee5 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -68,9 +68,6 @@ #include "e-memo-table.h" #include "e-task-table.h" -/* backward-compatibility cruft */ -#include "e-util/gtk-compat.h" - #define d(x) /* Private part of the GnomeCalendar structure */ -- cgit v1.2.3 From 274697623e2a6749a3b173c28f4832d9e88019e3 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 12 Feb 2011 11:37:05 -0500 Subject: Remove NULL checks for GObject methods. As of GLib 2.28 all GObject virtual methods, including constructed(), are safe to chain up to unconditionally. Remove unnecessary checks. --- calendar/gui/gnome-cal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'calendar/gui/gnome-cal.c') diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 11b1e29ee5..3e478a063a 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -487,8 +487,8 @@ gnome_calendar_constructed (GObject *object) gnome_calendar_goto_today (gcal); - if (G_OBJECT_CLASS (gnome_calendar_parent_class)->constructed) - G_OBJECT_CLASS (gnome_calendar_parent_class)->constructed (object); + /* Chain up to parent's constructed() method. */ + G_OBJECT_CLASS (gnome_calendar_parent_class)->constructed (object); } /* Class initialization function for the gnome calendar */ -- cgit v1.2.3 From ab870b27cd05cc39e4755de9c6d9e02944977c17 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 1 Mar 2011 13:04:09 -0500 Subject: Fix Gtk-Doc comment notation. Seeing lots of what I assume to be doxygen syntax in comment blocks. --- calendar/gui/gnome-cal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'calendar/gui/gnome-cal.c') diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 3e478a063a..e07e9f2545 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1983,8 +1983,8 @@ gnome_calendar_set_selected_time_range (GnomeCalendar *gcal, /** * gnome_calendar_new_task: * @gcal: An Evolution calendar. - * @param dtstart Start time of the task, in same timezone as model. - * @param dtend End time of the task, in same timezone as model. + * @dtstart: Start time of the task, in same timezone as model. + * @dtend: End time of the task, in same timezone as model. * * Opens a task editor dialog for a new task. dtstart or dtend can be NULL. **/ -- cgit v1.2.3 From 578214584caa7805edca09b27e2306dc31d80fb6 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 7 May 2011 12:22:36 -0400 Subject: Whitespace and coding style cleanups. --- calendar/gui/gnome-cal.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'calendar/gui/gnome-cal.c') diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index e07e9f2545..eb7ed6e081 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -128,7 +128,8 @@ struct _GnomeCalendarPrivate { * else it uses the date range set in search bar. */ gboolean lview_select_daten_range; - /* used in update_todo_view, to prevent interleaving when called in separate thread */ + /* Used in update_todo_view, to prevent interleaving when + * called in separate thread. */ GMutex *todo_update_lock; }; @@ -1633,7 +1634,8 @@ gnome_calendar_update_view_times (GnomeCalendar *gcal, gcal, priv->current_view_type, &real_start_time, &end_time, &select_time); - if (priv->current_view_type == GNOME_CAL_LIST_VIEW && !priv->lview_select_daten_range) + if (priv->current_view_type == GNOME_CAL_LIST_VIEW && + !priv->lview_select_daten_range) return; e_cal_model_set_time_range (model, real_start_time, end_time); @@ -2082,7 +2084,8 @@ gnome_calendar_update_date_navigator (GnomeCalendar *gcal) if (!gtk_widget_get_visible (GTK_WIDGET (priv->date_navigator))) return; - if (priv->current_view_type == GNOME_CAL_LIST_VIEW && !priv->lview_select_daten_range) + if (priv->current_view_type == GNOME_CAL_LIST_VIEW && + !priv->lview_select_daten_range) return; model = gnome_calendar_get_model (gcal); -- cgit v1.2.3 From a79844ab0d4d3b62b85fe8da73d08c80d9cdc375 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 13 May 2011 16:55:33 +0200 Subject: Bug #243938 - Clicking on week numbers changes work week to week view --- calendar/gui/gnome-cal.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'calendar/gui/gnome-cal.c') diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index eb7ed6e081..3a4adad829 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1843,6 +1843,11 @@ gnome_calendar_display_view (GnomeCalendar *gcal, gcal->priv->date_navigator->calitem, "preserve_day_when_moving", preserve_day, NULL); + /* keep week days selected as before for a work week view */ + g_object_set (G_OBJECT (gcal->priv->date_navigator->calitem), + "keep_wdays_on_weeknum_click", view_type == GNOME_CAL_WORK_WEEK_VIEW, + NULL); + if (!gcal->priv->base_view_time) start_time = time (NULL); else -- cgit v1.2.3 From 5146ff4c535f443fe25290eb96631e91ad44c8ef Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 21 May 2011 10:02:58 -0400 Subject: Coding style and whitespace cleanup. --- calendar/gui/gnome-cal.c | 55 ++++++++++++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 21 deletions(-) (limited to 'calendar/gui/gnome-cal.c') diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 3a4adad829..ce7734ddcc 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -767,9 +767,9 @@ dn_e_cal_view_objects_added_cb (ECalView *query, GList *objects, gpointer data) ensure_dates_are_in_default_zone (gcal, l->data); comp = e_cal_component_new (); - if (!e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (l->data))) { + if (!e_cal_component_set_icalcomponent ( + comp, icalcomponent_new_clone (l->data))) { g_object_unref (comp); - continue; } @@ -841,6 +841,8 @@ get_times_for_views (GnomeCalendar *gcal, { GnomeCalendarPrivate *priv; ECalModel *model; + EDayView *day_view; + EWeekView *week_view; gint shown, display_start; GDate date; gint week_start_day; @@ -861,12 +863,14 @@ get_times_for_views (GnomeCalendar *gcal, switch (view_type) { case GNOME_CAL_DAY_VIEW: - shown = e_day_view_get_days_shown (E_DAY_VIEW (priv->views[view_type])); + day_view = E_DAY_VIEW (priv->views[view_type]); + shown = e_day_view_get_days_shown (day_view); *start_time = time_day_begin_with_zone (*start_time, timezone); *end_time = time_add_day_with_zone (*start_time, shown, timezone); break; case GNOME_CAL_WORK_WEEK_VIEW: /* FIXME Kind of gross, but it works */ + day_view = E_DAY_VIEW (priv->views[view_type]); time_to_gdate_with_zone (&date, *start_time, timezone); /* The start of the work-week is the first working day after the @@ -878,7 +882,7 @@ get_times_for_views (GnomeCalendar *gcal, /* Find the first working day in the week, 0 (Sun) to 6 (Sat). */ first_day = (week_start_day + 1) % 7; for (i = 0; i < 7; i++) { - if (E_DAY_VIEW (priv->views[view_type])->working_days & (1 << first_day)) { + if (day_view->working_days & (1 << first_day)) { has_working_days = TRUE; break; } @@ -889,7 +893,7 @@ get_times_for_views (GnomeCalendar *gcal, /* Now find the last working day of the week, backwards. */ last_day = week_start_day % 7; for (i = 0; i < 7; i++) { - if (E_DAY_VIEW (priv->views[view_type])->working_days & (1 << last_day)) + if (day_view->working_days & (1 << last_day)) break; last_day = (last_day + 6) % 7; } @@ -917,32 +921,41 @@ get_times_for_views (GnomeCalendar *gcal, *start_time = icaltime_as_timet_with_zone (tt, timezone); *end_time = time_add_day_with_zone (*start_time, days_shown, timezone); - if (select_time && E_DAY_VIEW (priv->views[view_type])->selection_start_day == -1) + if (select_time && day_view->selection_start_day == -1) time (select_time); break; case GNOME_CAL_WEEK_VIEW: - /* FIXME We should be using the same day of the week enum every where */ - display_start = (E_WEEK_VIEW (priv->views[view_type])->display_start_day + 1) % 7; + /* FIXME We should be using the same day + * of the week enum everywhere. */ + week_view = E_WEEK_VIEW (priv->views[view_type]); + display_start = (week_view->display_start_day + 1) % 7; - *start_time = time_week_begin_with_zone (*start_time, display_start, timezone); - *end_time = time_add_week_with_zone (*start_time, 1, timezone); + *start_time = time_week_begin_with_zone ( + *start_time, display_start, timezone); + *end_time = time_add_week_with_zone ( + *start_time, 1, timezone); - if (select_time && E_WEEK_VIEW (priv->views[view_type])->selection_start_day == -1) + if (select_time && week_view->selection_start_day == -1) time (select_time); break; case GNOME_CAL_MONTH_VIEW: - shown = e_week_view_get_weeks_shown (E_WEEK_VIEW (priv->views[view_type])); - /* FIXME We should be using the same day of the week enum every where */ - display_start = (E_WEEK_VIEW (priv->views[view_type])->display_start_day + 1) % 7; + /* FIXME We should be using the same day + * of the week enum everywhere. */ + week_view = E_WEEK_VIEW (priv->views[view_type]); + shown = e_week_view_get_weeks_shown (week_view); + display_start = (week_view->display_start_day + 1) % 7; if (!range_selected && ( - !E_WEEK_VIEW (priv->views[view_type])->multi_week_view || - !E_WEEK_VIEW (priv->views[view_type])->month_scroll_by_week)) - *start_time = time_month_begin_with_zone (*start_time, timezone); - *start_time = time_week_begin_with_zone (*start_time, display_start, timezone); - *end_time = time_add_week_with_zone (*start_time, shown, timezone); - - if (select_time && E_WEEK_VIEW (priv->views[view_type])->selection_start_day == -1) + !week_view->multi_week_view || + !week_view->month_scroll_by_week)) + *start_time = time_month_begin_with_zone ( + *start_time, timezone); + *start_time = time_week_begin_with_zone ( + *start_time, display_start, timezone); + *end_time = time_add_week_with_zone ( + *start_time, shown, timezone); + + if (select_time && week_view->selection_start_day == -1) time (select_time); break; case GNOME_CAL_LIST_VIEW: -- cgit v1.2.3 From 7132d0f0c2b8494b3962792cd77ce3fcb5313687 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 28 May 2011 10:18:56 -0400 Subject: Including directly is rarely needed. --- calendar/gui/gnome-cal.c | 1 - 1 file changed, 1 deletion(-) (limited to 'calendar/gui/gnome-cal.c') diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index ce7734ddcc..789fbcc451 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include -- cgit v1.2.3 From e7954c3f251aabbf95d099159709c8c66dfedc44 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 4 Jun 2011 15:53:10 -0500 Subject: Coding style and whitespace cleanups. --- calendar/gui/gnome-cal.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'calendar/gui/gnome-cal.c') diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 789fbcc451..ffbc449584 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1058,8 +1058,9 @@ free_dn_queries (GnomeCalendar *gcal) for (l = priv->dn_queries; l != NULL; l = l->next) { if (!l->data) continue; - g_signal_handlers_disconnect_matched ((ECalView *) l->data, G_SIGNAL_MATCH_DATA, - 0, 0, NULL, NULL, gcal); + g_signal_handlers_disconnect_matched ( + l->data, G_SIGNAL_MATCH_DATA, + 0, 0, NULL, NULL, gcal); g_object_unref (l->data); } @@ -2262,12 +2263,16 @@ gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than) if (e_cal_util_component_is_instance (m->data) || e_cal_util_component_has_recurrences (m->data)) { gchar *rid = NULL; - struct icaltimetype recur_id = icalcomponent_get_recurrenceid (m->data); + struct icaltimetype recur_id; + + recur_id = icalcomponent_get_recurrenceid (m->data); if (!icaltime_is_null_time (recur_id) ) rid = icaltime_as_ical_string_r (recur_id); - e_cal_remove_object_with_mod (client, uid, rid, CALOBJ_MOD_ALL, &error); + e_cal_remove_object_with_mod ( + client, uid, rid, + CALOBJ_MOD_ALL, &error); g_free (rid); } else { e_cal_remove_object (client, uid, &error); -- cgit v1.2.3 From 84339b3be5a771406fcd5898bbd21dc1c5b98c82 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 14 Jun 2011 08:54:20 +0200 Subject: Do not use deprecated EBook/ECal API --- calendar/gui/gnome-cal.c | 113 ++++++++++++++++++++++------------------------- 1 file changed, 54 insertions(+), 59 deletions(-) (limited to 'calendar/gui/gnome-cal.c') diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index ffbc449584..78721bf214 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -38,7 +38,9 @@ #include #include #include +#include +#include #include #include #include @@ -63,7 +65,6 @@ #include "tag-calendar.h" #include "misc.h" #include "ea-calendar.h" -#include "common/authentication.h" #include "e-memo-table.h" #include "e-task-table.h" @@ -290,7 +291,7 @@ static void view_progress_cb (ECalModel *model, const gchar *message, gint percent, - ECalSourceType type, + ECalClientSourceType type, GnomeCalendar *gcal) { gcal_update_status_message (gcal, message, percent); @@ -298,9 +299,8 @@ view_progress_cb (ECalModel *model, static void view_complete_cb (ECalModel *model, - ECalendarStatus status, - const gchar *error_msg, - ECalSourceType type, + const GError *error, + ECalClientSourceType type, GnomeCalendar *gcal) { gcal_update_status_message (gcal, NULL, -1); @@ -752,11 +752,11 @@ ensure_dates_are_in_default_zone (GnomeCalendar *gcal, /* Callback used when the calendar query reports of an updated object */ static void -dn_e_cal_view_objects_added_cb (ECalView *query, GList *objects, gpointer data) +dn_client_view_objects_added_cb (ECalClientView *view, const GSList *objects, gpointer data) { GnomeCalendar *gcal; GnomeCalendarPrivate *priv; - GList *l; + const GSList *l; gcal = GNOME_CALENDAR (data); priv = gcal->priv; @@ -774,14 +774,14 @@ dn_e_cal_view_objects_added_cb (ECalView *query, GList *objects, gpointer data) tag_calendar_by_comp ( priv->date_navigator, comp, - e_cal_view_get_client (query), + e_cal_client_view_get_client (view), NULL, FALSE, TRUE, TRUE); g_object_unref (comp); } } static void -dn_e_cal_view_objects_modified_cb (ECalView *query, GList *objects, gpointer data) +dn_client_view_objects_modified_cb (ECalClientView *view, const GSList *objects, gpointer data) { GnomeCalendar *gcal; @@ -796,7 +796,7 @@ dn_e_cal_view_objects_modified_cb (ECalView *query, GList *objects, gpointer dat /* Callback used when the calendar query reports of a removed object */ static void -dn_e_cal_view_objects_removed_cb (ECalView *query, GList *ids, gpointer data) +dn_client_view_objects_removed_cb (ECalClientView *view, const GSList *ids, gpointer data) { GnomeCalendar *gcal; @@ -808,17 +808,11 @@ dn_e_cal_view_objects_removed_cb (ECalView *query, GList *ids, gpointer data) /* Callback used when the calendar query is done */ static void -dn_e_cal_view_complete_cb (ECalView *query, - ECalendarStatus status, - const gchar *error_msg, - gpointer data) +dn_client_view_complete_cb (ECalClientView *query, const GError *error, gpointer data) { /* FIXME Better error reporting */ - if (status != E_CALENDAR_STATUS_OK) - g_warning ( - G_STRLOC ": Query did not successfully complete, " - "code: %d (%s)", status, error_msg ? error_msg : - "Unknown error"); + if (error) + g_debug ("%s: Query did not complete successfully: %s", G_STRFUNC, error->message); } ECalendarView * @@ -1009,7 +1003,7 @@ get_date_navigator_range (GnomeCalendar *gcal, time_t *start_time, time_t *end_t /* Adjusts a given query sexp with the time range of the date navigator */ static gchar * -adjust_e_cal_view_sexp (GnomeCalendar *gcal, const gchar *sexp) +adjust_client_view_sexp (GnomeCalendar *gcal, const gchar *sexp) { time_t start_time, end_time; gchar *start, *end; @@ -1058,9 +1052,7 @@ free_dn_queries (GnomeCalendar *gcal) for (l = priv->dn_queries; l != NULL; l = l->next) { if (!l->data) continue; - g_signal_handlers_disconnect_matched ( - l->data, G_SIGNAL_MATCH_DATA, - 0, 0, NULL, NULL, gcal); + g_signal_handlers_disconnect_matched (l->data, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, gcal); g_object_unref (l->data); } @@ -1075,7 +1067,7 @@ update_query_async (struct _date_query_msg *msg) { GnomeCalendar *gcal = msg->gcal; GnomeCalendarPrivate *priv; - ECalView *new_query; + ECalClientView *new_view; gchar *real_sexp; GList *list, *iter; @@ -1086,7 +1078,7 @@ update_query_async (struct _date_query_msg *msg) g_return_if_fail (priv->sexp != NULL); - real_sexp = adjust_e_cal_view_sexp (gcal, priv->sexp); + real_sexp = adjust_client_view_sexp (gcal, priv->sexp); if (!real_sexp) { return; /* No time range is set, so don't start a query */ } @@ -1096,19 +1088,19 @@ update_query_async (struct _date_query_msg *msg) /* create queries for each loaded client */ for (iter = list; iter != NULL; iter = iter->next) { - ECal *client = E_CAL (iter->data); + ECalClient *client = E_CAL_CLIENT (iter->data); GError *error = NULL; gint tries = 0; /* don't create queries for clients not loaded yet */ - if (e_cal_get_load_state (client) != E_CAL_LOAD_LOADED) + if (!e_client_is_opened (E_CLIENT (client))) continue; -try_again: - new_query = NULL; - if (!e_cal_get_query (client, real_sexp, &new_query, &error)) { + try_again: + new_view = NULL; + if (!e_cal_client_get_view_sync (client, real_sexp, &new_view, NULL, &error)) { /* If calendar is busy try again for 3 times. */ - if (error->code == E_CALENDAR_STATUS_BUSY && tries != 10) { + if (g_error_matches (error, E_CLIENT_ERROR, E_CLIENT_ERROR_BUSY) && tries != 10) { tries++; /*TODO chose an optimal value */ g_usleep (500); @@ -1117,24 +1109,28 @@ try_again: goto try_again; } - g_warning (G_STRLOC ": Could not create the query: %s ", error->message); + g_warning (G_STRLOC ": Could not create the view: %s ", error->message); g_clear_error (&error); continue; } - g_signal_connect (new_query, "objects_added", - G_CALLBACK (dn_e_cal_view_objects_added_cb), gcal); - g_signal_connect (new_query, "objects_modified", - G_CALLBACK (dn_e_cal_view_objects_modified_cb), gcal); - g_signal_connect (new_query, "objects_removed", - G_CALLBACK (dn_e_cal_view_objects_removed_cb), gcal); - g_signal_connect (new_query, "view_complete", - G_CALLBACK (dn_e_cal_view_complete_cb), gcal); + g_signal_connect (new_view, "objects-added", + G_CALLBACK (dn_client_view_objects_added_cb), gcal); + g_signal_connect (new_view, "objects-modified", + G_CALLBACK (dn_client_view_objects_modified_cb), gcal); + g_signal_connect (new_view, "objects-removed", + G_CALLBACK (dn_client_view_objects_removed_cb), gcal); + g_signal_connect (new_view, "complete", + G_CALLBACK (dn_client_view_complete_cb), gcal); g_mutex_lock (priv->dn_query_lock); - priv->dn_queries = g_list_append (priv->dn_queries, new_query); - e_cal_view_start (new_query); + priv->dn_queries = g_list_append (priv->dn_queries, new_view); + e_cal_client_view_start (new_view, &error); + if (error) { + g_debug ("%s: Failed to start view: %s", G_STRFUNC, error->message); + g_clear_error (&error); + } g_mutex_unlock (priv->dn_query_lock); } @@ -2221,15 +2217,17 @@ gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than) /* FIXME Confirm expunge */ clients = e_cal_model_get_client_list (gnome_calendar_get_model (gcal)); for (l = clients; l != NULL; l = l->next) { - ECal *client = l->data; - GList *objects, *m; - gboolean read_only; + ECalClient *client = l->data; + GSList *objects, *m; + GError *error = NULL; - if (!e_cal_is_read_only (client, &read_only, NULL) || read_only) + if (e_client_is_readonly (E_CLIENT (client))) continue; - if (!e_cal_get_object_list (client, sexp, &objects, NULL)) { - g_warning (G_STRLOC ": Could not get the objects"); + if (!e_cal_client_get_object_list_sync (client, sexp, &objects, NULL, &error)) { + g_warning (G_STRLOC ": Could not get the objects: %s", error ? error->message : "Unknown error"); + if (error) + g_error_free (error); continue; } @@ -2240,16 +2238,15 @@ gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than) /* FIXME write occur-before and occur-after * sexp funcs so we don't have to use the max * gint */ - if (!e_cal_get_static_capability ( - client, CAL_STATIC_CAPABILITY_RECURRENCES_NO_MASTER)) { + if (!e_cal_client_check_recurrences_no_master (client)) { struct purge_data pd; pd.remove = TRUE; pd.older_than = older_than; - e_cal_generate_instances_for_object (client, m->data, + e_cal_client_generate_instances_for_object (client, m->data, older_than, G_MAXINT32, - (ECalRecurInstanceFn) check_instance_cb, + check_instance_cb, &pd); remove = pd.remove; @@ -2270,23 +2267,21 @@ gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than) if (!icaltime_is_null_time (recur_id) ) rid = icaltime_as_ical_string_r (recur_id); - e_cal_remove_object_with_mod ( - client, uid, rid, - CALOBJ_MOD_ALL, &error); + e_cal_client_remove_object_sync (client, uid, rid, CALOBJ_MOD_ALL, NULL, &error); g_free (rid); } else { - e_cal_remove_object (client, uid, &error); + e_cal_client_remove_object_sync (client, uid, NULL, CALOBJ_MOD_THIS, NULL, &error); } if (error) { - g_warning ("Unable to purge events %s \n", error->message); + g_debug ("%s: Unable to purge events: %s", G_STRFUNC, error->message); g_error_free (error); } } } - g_list_foreach (objects, (GFunc) icalcomponent_free, NULL); - g_list_free (objects); + g_slist_foreach (objects, (GFunc) icalcomponent_free, NULL); + g_slist_free (objects); } g_list_free (clients); -- cgit v1.2.3 From 8894b72f2045388990b5696f3e8db97b9544ccf4 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 27 Jun 2011 15:23:31 +0200 Subject: Keep opening EClient-s till they report busy error --- calendar/gui/gnome-cal.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'calendar/gui/gnome-cal.c') diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 78721bf214..4bb430c018 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1510,12 +1510,6 @@ gnome_calendar_finalize (GObject *object) G_OBJECT_CLASS (gnome_calendar_parent_class)->finalize (object); } -void -gnome_calendar_dispose (GnomeCalendar *gcal) -{ - g_object_run_dispose (G_OBJECT (gcal)); -} - static void notify_selected_time_changed (GnomeCalendar *gcal) { -- cgit v1.2.3 From cbe678c4c58efdb0b0d7960a9c6d33c30a95ce8c Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 2 Aug 2011 15:23:52 +0200 Subject: Bug #655190 - Sluggish performance interacting with calendar/tasks --- calendar/gui/gnome-cal.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'calendar/gui/gnome-cal.c') diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 4bb430c018..03b5b6bfa6 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -131,6 +131,8 @@ struct _GnomeCalendarPrivate { /* Used in update_todo_view, to prevent interleaving when * called in separate thread. */ GMutex *todo_update_lock; + + GCancellable *cancellable; }; enum { @@ -775,7 +777,7 @@ dn_client_view_objects_added_cb (ECalClientView *view, const GSList *objects, gp tag_calendar_by_comp ( priv->date_navigator, comp, e_cal_client_view_get_client (view), - NULL, FALSE, TRUE, TRUE); + NULL, FALSE, TRUE, TRUE, priv->cancellable); g_object_unref (comp); } } @@ -1438,6 +1440,8 @@ gnome_calendar_init (GnomeCalendar *gcal) priv->visible_start = -1; priv->visible_end = -1; priv->updating = FALSE; + + priv->cancellable = g_cancellable_new (); } static void @@ -1492,6 +1496,12 @@ gnome_calendar_do_dispose (GObject *object) priv->update_marcus_bains_line_timeout = 0; } + if (priv->cancellable) { + g_cancellable_cancel (priv->cancellable); + g_object_unref (priv->cancellable); + priv->cancellable = NULL; + } + G_OBJECT_CLASS (gnome_calendar_parent_class)->dispose (object); } @@ -2238,7 +2248,7 @@ gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than) pd.remove = TRUE; pd.older_than = older_than; - e_cal_client_generate_instances_for_object (client, m->data, + e_cal_client_generate_instances_for_object_sync (client, m->data, older_than, G_MAXINT32, check_instance_cb, &pd); -- cgit v1.2.3 From ae9db3ed236b0c734fd12c8dc8c99764626bf0b8 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 1 Jul 2011 00:07:26 -0400 Subject: Coding style and whitespace cleanup. --- calendar/gui/gnome-cal.c | 79 +++++++++++++++++++++++++++++++----------------- 1 file changed, 52 insertions(+), 27 deletions(-) (limited to 'calendar/gui/gnome-cal.c') diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 03b5b6bfa6..aca2d05068 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -754,7 +754,9 @@ ensure_dates_are_in_default_zone (GnomeCalendar *gcal, /* Callback used when the calendar query reports of an updated object */ static void -dn_client_view_objects_added_cb (ECalClientView *view, const GSList *objects, gpointer data) +dn_client_view_objects_added_cb (ECalClientView *view, + const GSList *objects, + gpointer data) { GnomeCalendar *gcal; GnomeCalendarPrivate *priv; @@ -783,7 +785,9 @@ dn_client_view_objects_added_cb (ECalClientView *view, const GSList *objects, gp } static void -dn_client_view_objects_modified_cb (ECalClientView *view, const GSList *objects, gpointer data) +dn_client_view_objects_modified_cb (ECalClientView *view, + const GSList *objects, + gpointer data) { GnomeCalendar *gcal; @@ -791,14 +795,15 @@ dn_client_view_objects_modified_cb (ECalClientView *view, const GSList *objects, /* We have to retag the whole thing: an event may change dates * and the tag_calendar_by_comp() below would not know how to - * untag the old dates. - */ + * untag the old dates. */ gnome_calendar_update_query (gcal); } /* Callback used when the calendar query reports of a removed object */ static void -dn_client_view_objects_removed_cb (ECalClientView *view, const GSList *ids, gpointer data) +dn_client_view_objects_removed_cb (ECalClientView *view, + const GSList *ids, + gpointer data) { GnomeCalendar *gcal; @@ -810,11 +815,15 @@ dn_client_view_objects_removed_cb (ECalClientView *view, const GSList *ids, gpoi /* Callback used when the calendar query is done */ static void -dn_client_view_complete_cb (ECalClientView *query, const GError *error, gpointer data) +dn_client_view_complete_cb (ECalClientView *query, + const GError *error, + gpointer data) { /* FIXME Better error reporting */ - if (error) - g_debug ("%s: Query did not complete successfully: %s", G_STRFUNC, error->message); + if (error != NULL) + g_warning ( + "%s: Query did not complete successfully: %s", + G_STRFUNC, error->message); } ECalendarView * @@ -1054,7 +1063,8 @@ free_dn_queries (GnomeCalendar *gcal) for (l = priv->dn_queries; l != NULL; l = l->next) { if (!l->data) continue; - g_signal_handlers_disconnect_matched (l->data, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, gcal); + g_signal_handlers_disconnect_matched ( + l->data, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, gcal); g_object_unref (l->data); } @@ -1117,20 +1127,26 @@ update_query_async (struct _date_query_msg *msg) continue; } - g_signal_connect (new_view, "objects-added", - G_CALLBACK (dn_client_view_objects_added_cb), gcal); - g_signal_connect (new_view, "objects-modified", - G_CALLBACK (dn_client_view_objects_modified_cb), gcal); - g_signal_connect (new_view, "objects-removed", - G_CALLBACK (dn_client_view_objects_removed_cb), gcal); - g_signal_connect (new_view, "complete", - G_CALLBACK (dn_client_view_complete_cb), gcal); + g_signal_connect ( + new_view, "objects-added", + G_CALLBACK (dn_client_view_objects_added_cb), gcal); + g_signal_connect ( + new_view, "objects-modified", + G_CALLBACK (dn_client_view_objects_modified_cb), gcal); + g_signal_connect ( + new_view, "objects-removed", + G_CALLBACK (dn_client_view_objects_removed_cb), gcal); + g_signal_connect ( + new_view, "complete", + G_CALLBACK (dn_client_view_complete_cb), gcal); g_mutex_lock (priv->dn_query_lock); priv->dn_queries = g_list_append (priv->dn_queries, new_view); e_cal_client_view_start (new_view, &error); - if (error) { - g_debug ("%s: Failed to start view: %s", G_STRFUNC, error->message); + if (error != NULL) { + g_warning ( + "%s: Failed to start view: %s", + G_STRFUNC, error->message); g_clear_error (&error); } g_mutex_unlock (priv->dn_query_lock); @@ -2228,11 +2244,14 @@ gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than) if (e_client_is_readonly (E_CLIENT (client))) continue; - if (!e_cal_client_get_object_list_sync (client, sexp, &objects, NULL, &error)) { - g_warning (G_STRLOC ": Could not get the objects: %s", error ? error->message : "Unknown error"); - if (error) - g_error_free (error); + e_cal_client_get_object_list_sync ( + client, sexp, &objects, NULL, &error); + if (error != NULL) { + g_warning ( + "%s: Could not get the objects: %s", + G_STRFUNC, error->message); + g_error_free (error); continue; } @@ -2271,14 +2290,20 @@ gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than) if (!icaltime_is_null_time (recur_id) ) rid = icaltime_as_ical_string_r (recur_id); - e_cal_client_remove_object_sync (client, uid, rid, CALOBJ_MOD_ALL, NULL, &error); + e_cal_client_remove_object_sync ( + client, uid, rid, + CALOBJ_MOD_ALL, NULL, &error); g_free (rid); } else { - e_cal_client_remove_object_sync (client, uid, NULL, CALOBJ_MOD_THIS, NULL, &error); + e_cal_client_remove_object_sync ( + client, uid, NULL, + CALOBJ_MOD_THIS, NULL, &error); } - if (error) { - g_debug ("%s: Unable to purge events: %s", G_STRFUNC, error->message); + if (error != NULL) { + g_warning ( + "%s: Unable to purge events: %s", + G_STRFUNC, error->message); g_error_free (error); } } -- cgit v1.2.3 From 777c1cbd40eb63365f2c28e38f6a93beb2d1c9d1 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 16 Aug 2011 11:25:56 -0400 Subject: Coding style and whitespace cleanup. --- calendar/gui/gnome-cal.c | 93 ++++++++++++++++++++++++++++-------------------- 1 file changed, 54 insertions(+), 39 deletions(-) (limited to 'calendar/gui/gnome-cal.c') diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index aca2d05068..cf1a12deab 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -99,8 +99,8 @@ struct _GnomeCalendarPrivate { guint update_marcus_bains_line_timeout; /* This is the view currently shown. We use it to keep track of the - positions of the panes. range_selected is TRUE if a range of dates - was selected in the date navigator to show the view. */ + * positions of the panes. range_selected is TRUE if a range of dates + * was selected in the date navigator to show the view. */ ECalendarView *views[GNOME_CAL_LAST_VIEW]; GnomeCalendarViewType current_view_type; GList *notifications; @@ -108,8 +108,8 @@ struct _GnomeCalendarPrivate { gboolean range_selected; /* These are the saved positions of the panes. They are multiples of - calendar month widths & heights in the date navigator, so that they - will work OK after theme changes. */ + * calendar month widths & heights in the date navigator, so that they + * will work OK after theme changes. */ gint hpane_pos; gint hpane_pos_month_view; @@ -117,8 +117,8 @@ struct _GnomeCalendarPrivate { guint day_selected_id; /* The dates currently shown. If they are -1 then we have no dates - shown. We only use these to check if we need to emit a - 'dates-shown-changed' signal.*/ + * shown. We only use these to check if we need to emit a + * 'dates-shown-changed' signal.*/ time_t visible_start; time_t visible_end; gboolean updating; @@ -204,7 +204,9 @@ message_push (Message *msg) G_DEFINE_TYPE (GnomeCalendar, gnome_calendar, G_TYPE_OBJECT) static void -gcal_update_status_message (GnomeCalendar *gcal, const gchar *message, gdouble percent) +gcal_update_status_message (GnomeCalendar *gcal, + const gchar *message, + gdouble percent) { ECalModel *model; @@ -301,9 +303,9 @@ view_progress_cb (ECalModel *model, static void view_complete_cb (ECalModel *model, - const GError *error, - ECalClientSourceType type, - GnomeCalendar *gcal) + const GError *error, + ECalClientSourceType type, + GnomeCalendar *gcal) { gcal_update_status_message (gcal, NULL, -1); } @@ -878,7 +880,7 @@ get_times_for_views (GnomeCalendar *gcal, time_to_gdate_with_zone (&date, *start_time, timezone); /* The start of the work-week is the first working day after the - week start day. */ + * week start day. */ /* Get the weekday corresponding to start_time, 0 (Sun) to 6 (Sat). */ weekday = g_date_get_weekday (&date) % 7; @@ -902,7 +904,7 @@ get_times_for_views (GnomeCalendar *gcal, last_day = (last_day + 6) % 7; } /* Now calculate the days we need to show to include all the - working days in the week. Add 1 to make it inclusive. */ + * working days in the week. Add 1 to make it inclusive. */ days_shown = (last_day + 7 - first_day) % 7 + 1; } else { /* If no working days are set, just use 7. */ @@ -974,7 +976,9 @@ get_times_for_views (GnomeCalendar *gcal, /* Computes the range of time that the date navigator is showing */ static void -get_date_navigator_range (GnomeCalendar *gcal, time_t *start_time, time_t *end_time) +get_date_navigator_range (GnomeCalendar *gcal, + time_t *start_time, + time_t *end_time) { ECalModel *model; gint start_year, start_month, start_day; @@ -1014,7 +1018,8 @@ get_date_navigator_range (GnomeCalendar *gcal, time_t *start_time, time_t *end_t /* Adjusts a given query sexp with the time range of the date navigator */ static gchar * -adjust_client_view_sexp (GnomeCalendar *gcal, const gchar *sexp) +adjust_client_view_sexp (GnomeCalendar *gcal, + const gchar *sexp) { time_t start_time, end_time; gchar *start, *end; @@ -1550,7 +1555,7 @@ notify_selected_time_changed (GnomeCalendar *gcal) static void gnome_calendar_goto_date (GnomeCalendar *gcal, - GnomeCalendarGotoDateType goto_date) + GnomeCalendarGotoDateType goto_date) { ECalModel *model; time_t new_time = 0; @@ -1566,7 +1571,7 @@ gnome_calendar_goto_date (GnomeCalendar *gcal, switch (goto_date) { /* GNOME_CAL_GOTO_TODAY and GNOME_CAL_GOTO_DATE are - currently not used + * currently not used */ case GNOME_CAL_GOTO_TODAY: break; @@ -1625,7 +1630,8 @@ gnome_calendar_goto_date (GnomeCalendar *gcal, } void -gnome_calendar_goto (GnomeCalendar *gcal, time_t new_time) +gnome_calendar_goto (GnomeCalendar *gcal, + time_t new_time) { GnomeCalendarPrivate *priv; gint i; @@ -1676,7 +1682,8 @@ gnome_calendar_update_view_times (GnomeCalendar *gcal, } static void -gnome_calendar_direction (GnomeCalendar *gcal, gint direction) +gnome_calendar_direction (GnomeCalendar *gcal, + gint direction) { ECalModel *model; icaltimezone *timezone; @@ -1724,7 +1731,8 @@ gnome_calendar_previous (GnomeCalendar *gcal) } void -gnome_calendar_dayjump (GnomeCalendar *gcal, time_t time) +gnome_calendar_dayjump (GnomeCalendar *gcal, + time_t time) { ECalModel *model; icaltimezone *timezone; @@ -1866,16 +1874,18 @@ gnome_calendar_display_view (GnomeCalendar *gcal, gnome_calendar_set_range_selected (gcal, range_selected); /* For the week & month views we want the selection in the date - navigator to be rounded to the nearest week when the arrow buttons - are pressed to move to the previous/next month. */ + * navigator to be rounded to the nearest week when the arrow buttons + * are pressed to move to the previous/next month. */ g_object_set ( gcal->priv->date_navigator->calitem, "preserve_day_when_moving", preserve_day, NULL); /* keep week days selected as before for a work week view */ - g_object_set (G_OBJECT (gcal->priv->date_navigator->calitem), - "keep_wdays_on_weeknum_click", view_type == GNOME_CAL_WORK_WEEK_VIEW, - NULL); + g_object_set ( + gcal->priv->date_navigator->calitem, + "keep_wdays_on_weeknum_click", + view_type == GNOME_CAL_WORK_WEEK_VIEW, + NULL); if (!gcal->priv->base_view_time) start_time = time (NULL); @@ -1931,7 +1941,8 @@ gnome_calendar_get_memo_table (GnomeCalendar *gcal) } void -gnome_calendar_set_memo_table (GnomeCalendar *gcal, GtkWidget *memo_table) +gnome_calendar_set_memo_table (GnomeCalendar *gcal, + GtkWidget *memo_table) { g_return_if_fail (GNOME_IS_CALENDAR (gcal)); @@ -1957,7 +1968,8 @@ gnome_calendar_get_task_table (GnomeCalendar *gcal) } void -gnome_calendar_set_task_table (GnomeCalendar *gcal, GtkWidget *task_table) +gnome_calendar_set_task_table (GnomeCalendar *gcal, + GtkWidget *task_table) { g_return_if_fail (GNOME_IS_CALENDAR (gcal)); @@ -2009,7 +2021,7 @@ gnome_calendar_set_range_selected (GnomeCalendar *gcal, void gnome_calendar_set_selected_time_range (GnomeCalendar *gcal, - time_t start_time) + time_t start_time) { gnome_calendar_update_view_times (gcal, start_time); gnome_calendar_update_date_navigator (gcal); @@ -2026,7 +2038,9 @@ gnome_calendar_set_selected_time_range (GnomeCalendar *gcal, **/ #if 0 /* KILL-BONOBO */ void -gnome_calendar_new_task (GnomeCalendar *gcal, time_t *dtstart, time_t *dtend) +gnome_calendar_new_task (GnomeCalendar *gcal, + time_t *dtstart, + time_t *dtend) { GnomeCalendarPrivate *priv; ECal *ecal; @@ -2080,12 +2094,12 @@ gnome_calendar_new_task (GnomeCalendar *gcal, time_t *dtstart, time_t *dtend) #endif /* Returns the selected time range for the current view. Note that this may be - different from the fields in the GnomeCalendar, since the view may clip - this or choose a more appropriate time. */ + * different from the fields in the GnomeCalendar, since the view may clip + * this or choose a more appropriate time. */ void gnome_calendar_get_current_time_range (GnomeCalendar *gcal, - time_t *start_time, - time_t *end_time) + time_t *start_time, + time_t *end_time) { GnomeCalendarViewType view_type; ECalendarView *view; @@ -2097,7 +2111,7 @@ gnome_calendar_get_current_time_range (GnomeCalendar *gcal, } /* This updates the month shown and the days selected in the calendar, if - necessary. */ + * necessary. */ static void gnome_calendar_update_date_navigator (GnomeCalendar *gcal) { @@ -2165,8 +2179,8 @@ gnome_calendar_notify_dates_shown_changed (GnomeCalendar *gcal) return; /* We check if the visible date range has changed, and only emit the - signal if it has. (This makes sure we only change the folder title - bar label in the shell when we need to.) */ + * signal if it has. (This makes sure we only change the folder title + * bar label in the shell when we need to.) */ if (priv->visible_start != start_time || priv->visible_end != end_time) { priv->visible_start = start_time; @@ -2206,9 +2220,9 @@ struct purge_data { static gboolean check_instance_cb (ECalComponent *comp, - time_t instance_start, - time_t instance_end, - gpointer data) + time_t instance_start, + time_t instance_end, + gpointer data) { struct purge_data *pd = data; @@ -2219,7 +2233,8 @@ check_instance_cb (ECalComponent *comp, } void -gnome_calendar_purge (GnomeCalendar *gcal, time_t older_than) +gnome_calendar_purge (GnomeCalendar *gcal, + time_t older_than) { gchar *sexp, *start, *end; GList *clients, *l; -- cgit v1.2.3 From c76f301a7d5c7121cd9216e239708da1dbaa1623 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 26 Sep 2011 12:42:47 +0200 Subject: Bug #659568 - One day delay in calendar view --- calendar/gui/gnome-cal.c | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) (limited to 'calendar/gui/gnome-cal.c') diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index cf1a12deab..654eb1898a 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1016,6 +1016,24 @@ get_date_navigator_range (GnomeCalendar *gcal, *end_time = icaltime_as_timet_with_zone (end_tt, timezone); } +static const gchar * +gcal_get_default_tzloc (GnomeCalendar *gcal) +{ + ECalModel *model; + icaltimezone *timezone; + const gchar *tzloc = NULL; + + g_return_val_if_fail (gcal != NULL, ""); + + model = gnome_calendar_get_model (gcal); + timezone = e_cal_model_get_timezone (model); + + if (timezone && timezone != icaltimezone_get_utc_timezone ()) + tzloc = icaltimezone_get_location (timezone); + + return tzloc ? tzloc : ""; +} + /* Adjusts a given query sexp with the time range of the date navigator */ static gchar * adjust_client_view_sexp (GnomeCalendar *gcal, @@ -1033,15 +1051,12 @@ adjust_client_view_sexp (GnomeCalendar *gcal, end = isodate_from_time_t (end_time); if (sexp) { - new_sexp = g_strdup_printf ("(and (occur-in-time-range? (make-time \"%s\")" - " (make-time \"%s\"))" - " %s)", - start, end, + new_sexp = g_strdup_printf ("(and (occur-in-time-range? (make-time \"%s\") (make-time \"%s\") \"%s\") %s)", + start, end, gcal_get_default_tzloc (gcal), sexp); } else { - new_sexp = g_strdup_printf ("(occur-in-time-range? (make-time \"%s\")" - " (make-time \"%s\"))", - start, end); + new_sexp = g_strdup_printf ("(occur-in-time-range? (make-time \"%s\") (make-time \"%s\") \"%s\")", + start, end, gcal_get_default_tzloc (gcal)); } g_free (start); @@ -1366,10 +1381,8 @@ update_memo_view (GnomeCalendar *gcal) g_free (priv->memo_sexp); priv->memo_sexp = g_strdup_printf ( - "(and (or (not (has-start?)) " - "(occur-in-time-range? (make-time \"%s\")" - " (make-time \"%s\"))) %s)", - iso_start, iso_end, + "(and (or (not (has-start?)) (occur-in-time-range? (make-time \"%s\") (make-time \"%s\") \"%s\")) %s)", + iso_start, iso_end, gcal_get_default_tzloc (gcal), priv->sexp ? priv->sexp : ""); e_cal_model_set_search_query (model, priv->memo_sexp); @@ -2243,9 +2256,8 @@ gnome_calendar_purge (GnomeCalendar *gcal, start = isodate_from_time_t (0); end = isodate_from_time_t (older_than); - sexp = g_strdup_printf ("(occur-in-time-range? (make-time \"%s\")" - " (make-time \"%s\"))", - start, end); + sexp = g_strdup_printf ("(occur-in-time-range? (make-time \"%s\") (make-time \"%s\") \"%s\")", + start, end, gcal_get_default_tzloc (gcal)); gcal_update_status_message (gcal, _("Purging"), -1); -- cgit v1.2.3 From 90ffcfd8ce2aeb5159d5c6f8a44601b89ea0ba05 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Mon, 10 Oct 2011 17:40:06 +0200 Subject: Last bits of calendar-config migrated to GSettings --- calendar/gui/gnome-cal.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'calendar/gui/gnome-cal.c') diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 66c90fb1c2..6fd51534b5 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -103,7 +103,6 @@ struct _GnomeCalendarPrivate { * was selected in the date navigator to show the view. */ ECalendarView *views[GNOME_CAL_LAST_VIEW]; GnomeCalendarViewType current_view_type; - GList *notifications; gboolean range_selected; @@ -1508,11 +1507,6 @@ gnome_calendar_do_dispose (GObject *object) } } - for (l = priv->notifications; l; l = l->next) - calendar_config_remove_notification (GPOINTER_TO_UINT (l->data)); - g_list_free (priv->notifications); - priv->notifications = NULL; - free_dn_queries (gcal); if (priv->sexp) { -- cgit v1.2.3 From c75f58d01bb7bbe139cd73a85894dc5f50185816 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 18 Nov 2011 09:58:44 -0500 Subject: Fix compiler warnings. --- calendar/gui/gnome-cal.c | 1 - 1 file changed, 1 deletion(-) (limited to 'calendar/gui/gnome-cal.c') diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c index 6fd51534b5..aa0aebf08a 100644 --- a/calendar/gui/gnome-cal.c +++ b/calendar/gui/gnome-cal.c @@ -1480,7 +1480,6 @@ gnome_calendar_init (GnomeCalendar *gcal) static void gnome_calendar_do_dispose (GObject *object) { - GList *l; GnomeCalendar *gcal; GnomeCalendarPrivate *priv; gint ii; -- cgit v1.2.3