week-header: use stack-allocated structure
Using stack allocated structure for certain variable in the draw(). Also disabling the week-grid for now.
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
bffaa3bd76
commit
9ff7d79d7d
@@ -58,6 +58,8 @@ struct _GcalWeekView
|
||||
{
|
||||
GtkBox parent;
|
||||
|
||||
GtkWidget *header;
|
||||
|
||||
/*
|
||||
* first day of the week according to user locale, being
|
||||
* 0 for Sunday, 1 for Monday and so on
|
||||
@@ -283,6 +285,8 @@ gcal_week_view_class_init (GcalWeekViewClass *klass)
|
||||
|
||||
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/calendar/week-view.ui");
|
||||
|
||||
gtk_widget_class_bind_template_child (widget_class, GcalWeekView, header);
|
||||
|
||||
gtk_widget_class_set_css_name (widget_class, "calendar-view");
|
||||
}
|
||||
|
||||
@@ -521,5 +525,7 @@ gcal_week_view_set_current_date (GcalWeekView *self,
|
||||
{
|
||||
g_return_if_fail (GCAL_IS_WEEK_VIEW (self));
|
||||
|
||||
gcal_week_header_set_current_date (GCAL_WEEK_HEADER (self->header), current_date);
|
||||
|
||||
self->current_date = current_date;
|
||||
}
|
||||
Reference in New Issue
Block a user