Commit d03752cd authored by Matthias Clasen's avatar Matthias Clasen

GtkSpinButton: Use G_PARAM_EXPLICIT_NOTIFY

parent 83669856
......@@ -353,20 +353,16 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
g_param_spec_double ("climb-rate",
P_("Climb Rate"),
P_("The acceleration rate when you hold down a button"),
0.0,
G_MAXDOUBLE,
0.0,
GTK_PARAM_READWRITE));
0.0, G_MAXDOUBLE, 0.0,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (gobject_class,
PROP_DIGITS,
g_param_spec_uint ("digits",
P_("Digits"),
P_("The number of decimal places to display"),
0,
MAX_DIGITS,
0,
GTK_PARAM_READWRITE));
0, MAX_DIGITS, 0,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (gobject_class,
PROP_SNAP_TO_TICKS,
......@@ -374,7 +370,7 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
P_("Snap to Ticks"),
P_("Whether erroneous values are automatically changed to a spin button's nearest step increment"),
FALSE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (gobject_class,
PROP_NUMERIC,
......@@ -382,7 +378,7 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
P_("Numeric"),
P_("Whether non-numeric characters should be ignored"),
FALSE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (gobject_class,
PROP_WRAP,
......@@ -390,7 +386,7 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
P_("Wrap"),
P_("Whether a spin button should wrap upon reaching its limits"),
FALSE,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (gobject_class,
PROP_UPDATE_POLICY,
......@@ -399,17 +395,15 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
P_("Whether the spin button should update always, or only when the value is legal"),
GTK_TYPE_SPIN_BUTTON_UPDATE_POLICY,
GTK_UPDATE_ALWAYS,
GTK_PARAM_READWRITE));
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_install_property (gobject_class,
PROP_VALUE,
g_param_spec_double ("value",
P_("Value"),
P_("Reads the current value, or sets a new value"),
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
GTK_PARAM_READWRITE));
-G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
g_object_class_override_property (gobject_class,
PROP_ORIENTATION,
......@@ -2489,7 +2483,7 @@ gtk_spin_button_set_value (GtkSpinButton *spin_button,
{
gint return_val = FALSE;
g_signal_emit (spin_button, spinbutton_signals[OUTPUT], 0, &return_val);
if (return_val == FALSE)
if (!return_val)
gtk_spin_button_default_output (spin_button);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment