month-view: read 12/24 time format setting
The setting will be used when showing the start time of events in the overflow popover.
This commit is contained in:
@@ -93,6 +93,11 @@ typedef struct
|
||||
gint pressed_overflow_indicator;
|
||||
gint hovered_overflow_indicator;
|
||||
|
||||
/**
|
||||
* clock format from GNOME desktop settings
|
||||
*/
|
||||
gboolean use_24h_format;
|
||||
|
||||
/* text direction factors */
|
||||
gint k;
|
||||
|
||||
@@ -1886,3 +1891,20 @@ gcal_month_view_set_first_weekday (GcalMonthView *view,
|
||||
g_free (date);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 *view,
|
||||
gboolean use_24h)
|
||||
{
|
||||
GcalMonthViewPrivate *priv;
|
||||
|
||||
priv = gcal_month_view_get_instance_private (view);
|
||||
priv->use_24h_format = use_24h;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user