[gnome-calendar/new-year-view] year-view: fix subscriber callback
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/new-year-view] year-view: fix subscriber callback
- Date: Tue, 20 Jan 2015 15:01:49 +0000 (UTC)
commit 7499cb1437479b51c6550ca7fe8711a291b69a51
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Tue Jan 20 00:34:22 2015 -0500
year-view: fix subscriber callback
GcalYearView::start_selected_date will always be started into something
and comparing against zero no matters what returns will enter in one of
the two categories
Still before 3.16, this code should change.
src/gcal-year-view.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/gcal-year-view.c b/src/gcal-year-view.c
index e04d9a8..59bc7bb 100644
--- a/src/gcal-year-view.c
+++ b/src/gcal-year-view.c
@@ -1057,7 +1057,7 @@ gcal_year_view_component_changed (ECalDataModelSubscriber *subscriber,
GcalYearViewPrivate *priv = GCAL_YEAR_VIEW (subscriber)->priv;
ECalComponentDateTime dtstart, dtend;
- if (priv->update_sidebar_needed || priv->start_selected_date->day == 0)
+ if (priv->update_sidebar_needed)
return;
e_cal_component_get_dtstart (comp, &dtstart);
@@ -1066,6 +1066,7 @@ gcal_year_view_component_changed (ECalDataModelSubscriber *subscriber,
/* FIXME: this implementation clear the sidebar are rebuild it
* it should only add, what's new, and add it sorted in its position */
/* XXX: implement using shift as data and GtkListBox sort_func */
+ /* XXX: comparing against zero is not reliable, but it can only result in TRUE */
if (icaltime_compare_date_only (*(dtstart.value), *(priv->start_selected_date)) >= 0)
priv->update_sidebar_needed = TRUE;
else if (icaltime_compare_date_only (*(dtend.value), *(priv->end_selected_date)) <= 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]