From e9ebc450273733169d58be0b0ba36cae08e9d437 Mon Sep 17 00:00:00 2001 From: Claudio Saavedra Date: Thu, 3 Jun 2010 19:37:24 +0300 Subject: Use a stock string for the date and time buttons --- hildon/hildon-time-button.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'hildon/hildon-time-button.c') diff --git a/hildon/hildon-time-button.c b/hildon/hildon-time-button.c index 86f13f2..d5ba727 100644 --- a/hildon/hildon-time-button.c +++ b/hildon/hildon-time-button.c @@ -31,6 +31,7 @@ #include "hildon-touch-selector.h" #include "hildon-picker-button.h" #include "hildon-time-button.h" +#include "hildon-stock.h" #define _(String) \ dgettext("hildon-libs", String) @@ -72,12 +73,28 @@ hildon_time_button_set_property (GObject * object, guint property_id, } #endif +static GObject * +hildon_time_button_constructor (GType type, + guint n_construct_params, + GObjectConstructParam *construct_params) +{ + GObject *object; + + object = G_OBJECT_CLASS (hildon_time_button_parent_class)->constructor (type, + n_construct_params, + construct_params); + gtk_button_set_use_stock (GTK_BUTTON (object), TRUE); + + return object; +} + static void hildon_time_button_class_init (HildonTimeButtonClass * klass) { -#if 0 GObjectClass *object_class = G_OBJECT_CLASS (klass); + object_class->constructor = hildon_time_button_constructor; +#if 0 g_type_class_add_private (klass, sizeof (HildonTimeButtonPrivate)); object_class->get_property = hildon_time_button_get_property; @@ -128,7 +145,7 @@ hildon_time_button_new_step (HildonSizeType size, guint minutes_step) { return g_object_new (HILDON_TYPE_TIME_BUTTON, - "title", _("wdgt_ti_time"), + "title", HILDON_STOCK_TIME, "arrangement", arrangement, "size", size, "touch-selector", hildon_time_selector_new_step (minutes_step), -- cgit v1.2.3-18-g5258