project: Make time format a first-class citizen

The current code deals with 12/24h clock formats almost like
a workaround of the issue. This commit adds proper support to
different clock formats.
This commit is contained in:
Georges Basile Stavracas Neto
2018-01-28 02:30:55 -02:00
parent 79987734cd
commit b936759e5c
19 changed files with 199 additions and 164 deletions
-18
View File
@@ -111,11 +111,6 @@ struct _GcalMonthView
GDateTime *start_mark_cell;
GDateTime *end_mark_cell;
/*
* clock format from GNOME desktop settings
*/
gboolean use_24h_format;
/* Storage for the accumulated scrolling */
gdouble scroll_value;
guint update_grid_id;
@@ -2246,16 +2241,3 @@ gcal_month_view_set_first_weekday (GcalMonthView *self,
update_weekday_labels (self);
}
/**
* gcal_month_view_set_use_24h_format:
* @view:
* @use_24h:
*
* Whether the view will show time using 24h or 12h format
*/
void
gcal_month_view_set_use_24h_format (GcalMonthView *self,
gboolean use_24h)
{
self->use_24h_format = use_24h;
}