[gnome-shell/shell-toolkit] StButton: Fix property enumeration names
- From: Owen Taylor <otaylor src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell/shell-toolkit] StButton: Fix property enumeration names
- Date: Wed, 30 Sep 2009 14:23:24 +0000 (UTC)
commit c2706add36e092c69861c7ad9e3b5d053483ad46
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Wed Sep 30 09:55:02 2009 -0400
StButton: Fix property enumeration names
Property enumeration names should correspond exactly to the property names;
in particular the ACTIVE vs :checked disparity was confusing reading the
code.
http://bugzilla.moblin.org/show_bug.cgi?id=6504
src/st/st-button.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/src/st/st-button.c b/src/st/st-button.c
index 4c8b7f2..a479e23 100644
--- a/src/st/st-button.c
+++ b/src/st/st-button.c
@@ -55,9 +55,9 @@ enum
PROP_0,
PROP_LABEL,
- PROP_TOGGLE,
- PROP_ACTIVE,
- PROP_TRANSITION
+ PROP_TOGGLE_MODE,
+ PROP_CHECKED,
+ PROP_TRANSITION_DURATION
};
enum
@@ -337,13 +337,13 @@ st_button_set_property (GObject *gobject,
case PROP_LABEL:
st_button_set_label (button, g_value_get_string (value));
break;
- case PROP_TOGGLE:
+ case PROP_TOGGLE_MODE:
st_button_set_toggle_mode (button, g_value_get_boolean (value));
break;
- case PROP_ACTIVE:
+ case PROP_CHECKED:
st_button_set_checked (button, g_value_get_boolean (value));
break;
- case PROP_TRANSITION:
+ case PROP_TRANSITION_DURATION:
priv->transition_duration = g_value_get_int (value);
break;
@@ -367,13 +367,13 @@ st_button_get_property (GObject *gobject,
case PROP_LABEL:
g_value_set_string (value, priv->text);
break;
- case PROP_TOGGLE:
+ case PROP_TOGGLE_MODE:
g_value_set_boolean (value, priv->is_toggle);
break;
- case PROP_ACTIVE:
+ case PROP_CHECKED:
g_value_set_boolean (value, priv->is_checked);
break;
- case PROP_TRANSITION:
+ case PROP_TRANSITION_DURATION:
g_value_set_int (value, priv->transition_duration);
break;
@@ -476,20 +476,20 @@ st_button_class_init (StButtonClass *klass)
"Toggle Mode",
"Enable or disable toggling",
FALSE, G_PARAM_READWRITE);
- g_object_class_install_property (gobject_class, PROP_TOGGLE, pspec);
+ g_object_class_install_property (gobject_class, PROP_TOGGLE_MODE, pspec);
pspec = g_param_spec_boolean ("checked",
"Checked",
"Indicates if a toggle button is \"on\""
" or \"off\"",
FALSE, G_PARAM_READWRITE);
- g_object_class_install_property (gobject_class, PROP_ACTIVE, pspec);
+ g_object_class_install_property (gobject_class, PROP_CHECKED, pspec);
pspec = g_param_spec_int ("transition-duration",
"Transition Duration",
"Duration of the state transition effect",
0, G_MAXINT, 120, G_PARAM_READWRITE);
- g_object_class_install_property (gobject_class, PROP_TRANSITION, pspec);
+ g_object_class_install_property (gobject_class, PROP_TRANSITION_DURATION, pspec);
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]