view: Remove first weekday helpers when unecessary

Not all views need to know the first weekday, and those
who need, it can be stored internally.
This commit is contained in:
Georges Basile Stavracas Neto
2018-01-28 10:20:19 -02:00
parent 30ba757c40
commit 037567209c
10 changed files with 6 additions and 116 deletions
-4
View File
@@ -1579,10 +1579,6 @@ gcal_window_init (GcalWindow *self)
self->views[GCAL_WINDOW_VIEW_MONTH] = self->month_view;
self->views[GCAL_WINDOW_VIEW_YEAR] = self->year_view;
gcal_week_view_set_first_weekday (GCAL_WEEK_VIEW (self->views[GCAL_WINDOW_VIEW_WEEK]), get_first_weekday ());
gcal_month_view_set_first_weekday (GCAL_MONTH_VIEW (self->views[GCAL_WINDOW_VIEW_MONTH]), get_first_weekday ());
gcal_year_view_set_first_weekday (GCAL_YEAR_VIEW (self->views[GCAL_WINDOW_VIEW_YEAR]), get_first_weekday ());
/* refresh timeout, first is fast */
self->refresh_timeout_id = g_timeout_add (FAST_REFRESH_TIMEOUT, (GSourceFunc) refresh_sources, self);