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
-41
View File
@@ -49,13 +49,6 @@ struct _GcalWeekView
GtkWidget *scrolled_window;
GtkWidget *week_grid;
/*
* first day of the week according to user locale, being
* 0 for Sunday, 1 for Monday and so on
*/
gint first_weekday;
GcalTimeFormat time_format;
/* property */
@@ -646,37 +639,3 @@ gcal_week_view_init (GcalWeekView *self)
g_object_bind_property (self, "weather-service", self->header, "weather-service", G_BINDING_DEFAULT);
}
/* Public API */
/**
* gcal_week_view_new:
*
* Create a week-view widget
*
* Returns: (transfer full):
**/
GtkWidget*
gcal_week_view_new (void)
{
return g_object_new (GCAL_TYPE_WEEK_VIEW, NULL);
}
/**
* gcal_week_view_set_first_weekday:
* @view:
* @day_nr:
*
* Set the first day of the week according to the locale, being
* 0 for Sunday, 1 for Monday and so on.
**/
void
gcal_week_view_set_first_weekday (GcalWeekView *self,
gint day_nr)
{
g_return_if_fail (GCAL_IS_WEEK_VIEW (self));
self->first_weekday = day_nr;
gcal_week_header_set_first_weekday (GCAL_WEEK_HEADER (self->header), self->first_weekday);
gcal_week_grid_set_first_weekday (GCAL_WEEK_GRID (self->week_grid), self->first_weekday);
}