year-view: Mark working days according to locale

Currently, on the year view, Saturday and Sunday are marked
as non working days by default, despite the Locale settings and the
fact that in some Countries Sunday and/or Saturday are workdays.

This patch introduces a new function "is_workday" to check
whether a day is a working day according to the territory part of
Locale.

https://bugzilla.gnome.org/show_bug.cgi?id=746927
This commit is contained in:
Carlo Lobrano
2017-08-22 21:10:07 -03:00
committed by Georges Basile Stavracas Neto
parent e56bbc78a8
commit 66fa49b166
4 changed files with 107 additions and 8 deletions
+14
View File
@@ -54,6 +54,18 @@ typedef enum
GCAL_WINDOW_VIEW_SEARCH,
} GcalWindowViewType;
typedef enum
{
GCAL_WEEK_DAY_INVALID = 0,
GCAL_WEEK_DAY_SUNDAY = 1 << 0,
GCAL_WEEK_DAY_MONDAY = 1 << 1,
GCAL_WEEK_DAY_TUESDAY = 1 << 2,
GCAL_WEEK_DAY_WEDNESDAY = 1 << 3,
GCAL_WEEK_DAY_THURSDAY = 1 << 4,
GCAL_WEEK_DAY_FRIDAY = 1 << 5,
GCAL_WEEK_DAY_SATURDAY = 1 << 6
} GcalWeekDay;
GType icaltime_get_type (void) G_GNUC_CONST;
gint datetime_compare_date (GDateTime *dt1,
@@ -143,4 +155,6 @@ gboolean ask_recurrence_modification_type (GtkWidget
ECalObjModType *modtype,
ESource *source);
gboolean is_workday (guint day);
#endif // __GCAL_UTILS_H__