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:
Erick Pérez Castellanos
2014-12-20 09:10:00 -05:00
parent 5051ba600f
commit 9badd9f502
3 changed files with 29 additions and 8 deletions
+22
View File
@@ -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;
}