mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-14 06:10:21 +00:00
GtkSpinButton: Use G_PARAM_EXPLICIT_NOTIFY
This commit is contained in:
parent
83669856b2
commit
d03752cdcc
@ -353,20 +353,16 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
|
|||||||
g_param_spec_double ("climb-rate",
|
g_param_spec_double ("climb-rate",
|
||||||
P_("Climb Rate"),
|
P_("Climb Rate"),
|
||||||
P_("The acceleration rate when you hold down a button"),
|
P_("The acceleration rate when you hold down a button"),
|
||||||
0.0,
|
0.0, G_MAXDOUBLE, 0.0,
|
||||||
G_MAXDOUBLE,
|
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||||
0.0,
|
|
||||||
GTK_PARAM_READWRITE));
|
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
PROP_DIGITS,
|
PROP_DIGITS,
|
||||||
g_param_spec_uint ("digits",
|
g_param_spec_uint ("digits",
|
||||||
P_("Digits"),
|
P_("Digits"),
|
||||||
P_("The number of decimal places to display"),
|
P_("The number of decimal places to display"),
|
||||||
0,
|
0, MAX_DIGITS, 0,
|
||||||
MAX_DIGITS,
|
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||||
0,
|
|
||||||
GTK_PARAM_READWRITE));
|
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
PROP_SNAP_TO_TICKS,
|
PROP_SNAP_TO_TICKS,
|
||||||
@ -374,7 +370,7 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
|
|||||||
P_("Snap to Ticks"),
|
P_("Snap to Ticks"),
|
||||||
P_("Whether erroneous values are automatically changed to a spin button's nearest step increment"),
|
P_("Whether erroneous values are automatically changed to a spin button's nearest step increment"),
|
||||||
FALSE,
|
FALSE,
|
||||||
GTK_PARAM_READWRITE));
|
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
PROP_NUMERIC,
|
PROP_NUMERIC,
|
||||||
@ -382,7 +378,7 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
|
|||||||
P_("Numeric"),
|
P_("Numeric"),
|
||||||
P_("Whether non-numeric characters should be ignored"),
|
P_("Whether non-numeric characters should be ignored"),
|
||||||
FALSE,
|
FALSE,
|
||||||
GTK_PARAM_READWRITE));
|
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
PROP_WRAP,
|
PROP_WRAP,
|
||||||
@ -390,7 +386,7 @@ gtk_spin_button_class_init (GtkSpinButtonClass *class)
|
|||||||
P_("Wrap"),
|
P_("Wrap"),
|
||||||
P_("Whether a spin button should wrap upon reaching its limits"),
|
P_("Whether a spin button should wrap upon reaching its limits"),
|
||||||
FALSE,
|
FALSE,
|
||||||
GTK_PARAM_READWRITE));
|
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
PROP_UPDATE_POLICY,
|
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"),
|
P_("Whether the spin button should update always, or only when the value is legal"),
|
||||||
GTK_TYPE_SPIN_BUTTON_UPDATE_POLICY,
|
GTK_TYPE_SPIN_BUTTON_UPDATE_POLICY,
|
||||||
GTK_UPDATE_ALWAYS,
|
GTK_UPDATE_ALWAYS,
|
||||||
GTK_PARAM_READWRITE));
|
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class,
|
g_object_class_install_property (gobject_class,
|
||||||
PROP_VALUE,
|
PROP_VALUE,
|
||||||
g_param_spec_double ("value",
|
g_param_spec_double ("value",
|
||||||
P_("Value"),
|
P_("Value"),
|
||||||
P_("Reads the current value, or sets a new value"),
|
P_("Reads the current value, or sets a new value"),
|
||||||
-G_MAXDOUBLE,
|
-G_MAXDOUBLE, G_MAXDOUBLE, 0.0,
|
||||||
G_MAXDOUBLE,
|
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||||
0.0,
|
|
||||||
GTK_PARAM_READWRITE));
|
|
||||||
|
|
||||||
g_object_class_override_property (gobject_class,
|
g_object_class_override_property (gobject_class,
|
||||||
PROP_ORIENTATION,
|
PROP_ORIENTATION,
|
||||||
@ -2489,7 +2483,7 @@ gtk_spin_button_set_value (GtkSpinButton *spin_button,
|
|||||||
{
|
{
|
||||||
gint return_val = FALSE;
|
gint return_val = FALSE;
|
||||||
g_signal_emit (spin_button, spinbutton_signals[OUTPUT], 0, &return_val);
|
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);
|
gtk_spin_button_default_output (spin_button);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user