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
This commit is contained in:
Owen W. Taylor 2009-09-30 09:55:02 -04:00
parent 03a45b665c
commit 2cc41c6726

View File

@ -55,9 +55,9 @@ enum
PROP_0, PROP_0,
PROP_LABEL, PROP_LABEL,
PROP_TOGGLE, PROP_TOGGLE_MODE,
PROP_ACTIVE, PROP_CHECKED,
PROP_TRANSITION PROP_TRANSITION_DURATION
}; };
enum enum
@ -337,13 +337,13 @@ st_button_set_property (GObject *gobject,
case PROP_LABEL: case PROP_LABEL:
st_button_set_label (button, g_value_get_string (value)); st_button_set_label (button, g_value_get_string (value));
break; break;
case PROP_TOGGLE: case PROP_TOGGLE_MODE:
st_button_set_toggle_mode (button, g_value_get_boolean (value)); st_button_set_toggle_mode (button, g_value_get_boolean (value));
break; break;
case PROP_ACTIVE: case PROP_CHECKED:
st_button_set_checked (button, g_value_get_boolean (value)); st_button_set_checked (button, g_value_get_boolean (value));
break; break;
case PROP_TRANSITION: case PROP_TRANSITION_DURATION:
priv->transition_duration = g_value_get_int (value); priv->transition_duration = g_value_get_int (value);
break; break;
@ -367,13 +367,13 @@ st_button_get_property (GObject *gobject,
case PROP_LABEL: case PROP_LABEL:
g_value_set_string (value, priv->text); g_value_set_string (value, priv->text);
break; break;
case PROP_TOGGLE: case PROP_TOGGLE_MODE:
g_value_set_boolean (value, priv->is_toggle); g_value_set_boolean (value, priv->is_toggle);
break; break;
case PROP_ACTIVE: case PROP_CHECKED:
g_value_set_boolean (value, priv->is_checked); g_value_set_boolean (value, priv->is_checked);
break; break;
case PROP_TRANSITION: case PROP_TRANSITION_DURATION:
g_value_set_int (value, priv->transition_duration); g_value_set_int (value, priv->transition_duration);
break; break;
@ -476,20 +476,20 @@ st_button_class_init (StButtonClass *klass)
"Toggle Mode", "Toggle Mode",
"Enable or disable toggling", "Enable or disable toggling",
FALSE, G_PARAM_READWRITE); 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", pspec = g_param_spec_boolean ("checked",
"Checked", "Checked",
"Indicates if a toggle button is \"on\"" "Indicates if a toggle button is \"on\""
" or \"off\"", " or \"off\"",
FALSE, G_PARAM_READWRITE); 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", pspec = g_param_spec_int ("transition-duration",
"Transition Duration", "Transition Duration",
"Duration of the state transition effect", "Duration of the state transition effect",
0, G_MAXINT, 120, G_PARAM_READWRITE); 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);
/** /**