date-selector: add gcal_date_selector_use_24h_format function
Will be used later on in order to avoid retrieving this value multiple times with GSettings.
This commit is contained in:
committed by
Erick Pérez Castellanos
parent
07e052ef9c
commit
9b5670a416
@@ -446,6 +446,21 @@ gcal_date_selector_new (void)
|
|||||||
return g_object_new (GCAL_TYPE_DATE_SELECTOR, NULL);
|
return g_object_new (GCAL_TYPE_DATE_SELECTOR, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gcal_date_selector_use_24h_format (GcalDateSelector *selector,
|
||||||
|
gboolean use_24h_format)
|
||||||
|
{
|
||||||
|
GcalDateSelectorPrivate *priv;
|
||||||
|
|
||||||
|
g_return_if_fail (GCAL_IS_DATE_SELECTOR (selector));
|
||||||
|
priv = gcal_date_selector_get_instance_private (selector);
|
||||||
|
|
||||||
|
priv->format_24h = use_24h_format;
|
||||||
|
|
||||||
|
/* update values */
|
||||||
|
gcal_date_selector_set_date (selector, priv->day, priv->month, priv->year);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gcal_date_selector_set_date (GcalDateSelector *selector,
|
gcal_date_selector_set_date (GcalDateSelector *selector,
|
||||||
gint day,
|
gint day,
|
||||||
|
|||||||
@@ -54,6 +54,9 @@ GType gcal_date_selector_get_type (void);
|
|||||||
|
|
||||||
GtkWidget* gcal_date_selector_new (void);
|
GtkWidget* gcal_date_selector_new (void);
|
||||||
|
|
||||||
|
void gcal_date_selector_use_24h_format (GcalDateSelector *selector,
|
||||||
|
gboolean use_24h_format);
|
||||||
|
|
||||||
void gcal_date_selector_set_date (GcalDateSelector *selector,
|
void gcal_date_selector_set_date (GcalDateSelector *selector,
|
||||||
gint day,
|
gint day,
|
||||||
gint month,
|
gint month,
|
||||||
|
|||||||
Reference in New Issue
Block a user