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
+2 -7
View File
@@ -2009,6 +2009,8 @@ gcal_year_view_init (GcalYearView *self)
else if (gtk_widget_get_direction (GTK_WIDGET (self)) == GTK_TEXT_DIR_RTL)
self->k = 1;
self->first_weekday = get_first_weekday ();
self->navigator_grid = g_new0 (GridData, 1);
self->selected_data = g_new0 (ButtonData, 1);
@@ -2096,10 +2098,3 @@ update_weather (GcalYearView *self)
}
}
/* Public API */
void
gcal_year_view_set_first_weekday (GcalYearView *year_view,
gint nr_day)
{
year_view->first_weekday = nr_day;
}