[gnome-builder] credits: expose duration property
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] credits: expose duration property
- Date: Fri, 21 Nov 2014 02:59:50 +0000 (UTC)
commit 2605cd1a45b678fd36a9964f90863b2944416dcd
Author: Christian Hergert <christian hergert me>
Date: Thu Nov 20 18:59:30 2014 -0800
credits: expose duration property
src/credits/gb-credits-widget.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/src/credits/gb-credits-widget.c b/src/credits/gb-credits-widget.c
index 7eb60f2..df7deb9 100644
--- a/src/credits/gb-credits-widget.c
+++ b/src/credits/gb-credits-widget.c
@@ -228,6 +228,10 @@ gb_credits_widget_get_property (GObject *object,
switch (prop_id)
{
+ case PROP_DURATION:
+ g_value_set_uint (value, gb_credits_widget_get_duration (self));
+ break;
+
case PROP_PROGRESS:
g_value_set_double (value, gb_credits_widget_get_progress (self));
break;
@@ -247,6 +251,10 @@ gb_credits_widget_set_property (GObject *object,
switch (prop_id)
{
+ case PROP_DURATION:
+ gb_credits_widget_set_duration (self, g_value_get_uint (value));
+ break;
+
case PROP_PROGRESS:
gb_credits_widget_set_progress (self, g_value_get_double (value));
break;
@@ -270,6 +278,17 @@ gb_credits_widget_class_init (GbCreditsWidgetClass *klass)
overlay_class->get_child_position = gb_credits_widget_get_child_position;
+ gParamSpecs [PROP_DURATION] =
+ g_param_spec_uint ("duration",
+ _("Duration"),
+ _("The duration of the animation in millseconds."),
+ 0,
+ G_MAXUINT,
+ 20000,
+ (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ g_object_class_install_property (object_class, PROP_DURATION,
+ gParamSpecs [PROP_DURATION]);
+
gParamSpecs [PROP_PROGRESS] =
g_param_spec_double ("progress",
_("Progress"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]