diff options
author | Claudio Saavedra <csaavedra@igalia.com> | 2010-06-03 19:37:24 +0300 |
---|---|---|
committer | Claudio Saavedra <csaavedra@igalia.com> | 2010-06-03 19:37:24 +0300 |
commit | e9ebc450273733169d58be0b0ba36cae08e9d437 (patch) | |
tree | 92cc5cffbbbe986497be83654480673f519aeeea | |
parent | ab6747ad31843aff24592a439726c6d3d8611b63 (diff) |
Use a stock string for the date and time buttons
-rw-r--r-- | hildon/hildon-date-button.c | 21 | ||||
-rw-r--r-- | hildon/hildon-time-button.c | 21 |
2 files changed, 38 insertions, 4 deletions
diff --git a/hildon/hildon-date-button.c b/hildon/hildon-date-button.c index a27b996..a12f3b6 100644 --- a/hildon/hildon-date-button.c +++ b/hildon/hildon-date-button.c @@ -16,6 +16,7 @@ #include <libintl.h> +#include "hildon-stock.h" #include "hildon-date-button.h" #include "hildon-date-selector.h" #include "hildon-touch-selector.h" @@ -73,12 +74,28 @@ hildon_date_button_set_property (GObject * object, guint property_id, } #endif +static GObject * +hildon_date_button_constructor (GType type, + guint n_construct_params, + GObjectConstructParam *construct_params) +{ + GObject *object; + + object = G_OBJECT_CLASS (hildon_date_button_parent_class)->constructor (type, + n_construct_params, + construct_params); + gtk_button_set_use_stock (GTK_BUTTON (object), TRUE); + + return object; +} + static void hildon_date_button_class_init (HildonDateButtonClass * klass) { -#if 0 GObjectClass *object_class = G_OBJECT_CLASS (klass); + object_class->constructor = hildon_date_button_constructor; +#if 0 g_type_class_add_private (klass, sizeof (HildonDateButtonPrivate)); object_class->get_property = hildon_date_button_get_property; @@ -103,7 +120,7 @@ hildon_date_button_new_full (HildonSizeType size, GtkWidget *selector) { return g_object_new (HILDON_TYPE_DATE_BUTTON, - "title", _("wdgt_ti_date"), + "title", HILDON_STOCK_DATE, "arrangement", arrangement, "size", size, "touch-selector", selector, 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), |