+Tue Jan 29 20:38:04 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkscale.[ch]: Revert the last changes to make the
+ number of digits only effect drawing, instead, don't
+ round unless we are in the 'draw_value' mode -- this
+ is the behavior of GTK+-1.2, and keeps the behavior that
+ if the user sees a displayed value, it is the correct value.
+
Tue Jan 29 19:51:05 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkenums.h: Deprecate GtkPreviewType,
Wed Jan 23 14:44:12 2002 Owen Taylor <otaylor@redhat.com>
- * gtk/gtkspinbutton.c (EPSILON): Decreate value since
+ * gtk/gtkspinbutton.c (EPSILON): Decrease value since
we now use doubles.
Tue Jan 22 16:58:37 2002 Jonathan Blandford <jrb@redhat.com>
+Tue Jan 29 20:38:04 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkscale.[ch]: Revert the last changes to make the
+ number of digits only effect drawing, instead, don't
+ round unless we are in the 'draw_value' mode -- this
+ is the behavior of GTK+-1.2, and keeps the behavior that
+ if the user sees a displayed value, it is the correct value.
+
Tue Jan 29 19:51:05 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkenums.h: Deprecate GtkPreviewType,
Wed Jan 23 14:44:12 2002 Owen Taylor <otaylor@redhat.com>
- * gtk/gtkspinbutton.c (EPSILON): Decreate value since
+ * gtk/gtkspinbutton.c (EPSILON): Decrease value since
we now use doubles.
Tue Jan 22 16:58:37 2002 Jonathan Blandford <jrb@redhat.com>
+Tue Jan 29 20:38:04 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkscale.[ch]: Revert the last changes to make the
+ number of digits only effect drawing, instead, don't
+ round unless we are in the 'draw_value' mode -- this
+ is the behavior of GTK+-1.2, and keeps the behavior that
+ if the user sees a displayed value, it is the correct value.
+
Tue Jan 29 19:51:05 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkenums.h: Deprecate GtkPreviewType,
Wed Jan 23 14:44:12 2002 Owen Taylor <otaylor@redhat.com>
- * gtk/gtkspinbutton.c (EPSILON): Decreate value since
+ * gtk/gtkspinbutton.c (EPSILON): Decrease value since
we now use doubles.
Tue Jan 22 16:58:37 2002 Jonathan Blandford <jrb@redhat.com>
+Tue Jan 29 20:38:04 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkscale.[ch]: Revert the last changes to make the
+ number of digits only effect drawing, instead, don't
+ round unless we are in the 'draw_value' mode -- this
+ is the behavior of GTK+-1.2, and keeps the behavior that
+ if the user sees a displayed value, it is the correct value.
+
Tue Jan 29 19:51:05 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkenums.h: Deprecate GtkPreviewType,
Wed Jan 23 14:44:12 2002 Owen Taylor <otaylor@redhat.com>
- * gtk/gtkspinbutton.c (EPSILON): Decreate value since
+ * gtk/gtkspinbutton.c (EPSILON): Decrease value since
we now use doubles.
Tue Jan 22 16:58:37 2002 Jonathan Blandford <jrb@redhat.com>
+Tue Jan 29 20:38:04 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkscale.[ch]: Revert the last changes to make the
+ number of digits only effect drawing, instead, don't
+ round unless we are in the 'draw_value' mode -- this
+ is the behavior of GTK+-1.2, and keeps the behavior that
+ if the user sees a displayed value, it is the correct value.
+
Tue Jan 29 19:51:05 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkenums.h: Deprecate GtkPreviewType,
Wed Jan 23 14:44:12 2002 Owen Taylor <otaylor@redhat.com>
- * gtk/gtkspinbutton.c (EPSILON): Decreate value since
+ * gtk/gtkspinbutton.c (EPSILON): Decrease value since
we now use doubles.
Tue Jan 22 16:58:37 2002 Jonathan Blandford <jrb@redhat.com>
+Tue Jan 29 20:38:04 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkscale.[ch]: Revert the last changes to make the
+ number of digits only effect drawing, instead, don't
+ round unless we are in the 'draw_value' mode -- this
+ is the behavior of GTK+-1.2, and keeps the behavior that
+ if the user sees a displayed value, it is the correct value.
+
Tue Jan 29 19:51:05 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkenums.h: Deprecate GtkPreviewType,
Wed Jan 23 14:44:12 2002 Owen Taylor <otaylor@redhat.com>
- * gtk/gtkspinbutton.c (EPSILON): Decreate value since
+ * gtk/gtkspinbutton.c (EPSILON): Decrease value since
we now use doubles.
Tue Jan 22 16:58:37 2002 Jonathan Blandford <jrb@redhat.com>
+Tue Jan 29 20:38:04 2002 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkscale.[ch]: Revert the last changes to make the
+ number of digits only effect drawing, instead, don't
+ round unless we are in the 'draw_value' mode -- this
+ is the behavior of GTK+-1.2, and keeps the behavior that
+ if the user sees a displayed value, it is the correct value.
+
Tue Jan 29 19:51:05 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkenums.h: Deprecate GtkPreviewType,
Wed Jan 23 14:44:12 2002 Owen Taylor <otaylor@redhat.com>
- * gtk/gtkspinbutton.c (EPSILON): Decreate value since
+ * gtk/gtkspinbutton.c (EPSILON): Decrease value since
we now use doubles.
Tue Jan 22 16:58:37 2002 Jonathan Blandford <jrb@redhat.com>
switch (prop_id)
{
case PROP_DIGITS:
- g_value_set_int (value, scale->draw_digits);
+ g_value_set_int (value, scale->digits);
break;
case PROP_DRAW_VALUE:
g_value_set_boolean (value, scale->draw_value);
range->has_stepper_b = FALSE;
range->has_stepper_c = FALSE;
range->has_stepper_d = FALSE;
-
- scale->draw_digits = 1;
+
scale->draw_value = TRUE;
scale->value_pos = GTK_POS_TOP;
+ scale->digits = 1;
+ range->round_digits = scale->digits;
}
void
range = GTK_RANGE (scale);
- digits = CLAMP (digits, -1, MAX_DIGITS);
+ digits = CLAMP (digits, -1, 16);
- if (scale->draw_digits != digits)
+ if (scale->digits != digits)
{
- scale->draw_digits = digits;
+ scale->digits = digits;
+ if (scale->draw_value)
+ range->round_digits = digits;
gtk_widget_queue_resize (GTK_WIDGET (scale));
{
g_return_val_if_fail (GTK_IS_SCALE (scale), -1);
- return scale->draw_digits;
+ return scale->digits;
}
void
if (scale->draw_value != draw_value)
{
scale->draw_value = draw_value;
+ if (draw_value)
+ GTK_RANGE (scale)->round_digits = scale->digits;
+ else
+ GTK_RANGE (scale)->round_digits = -1;
gtk_widget_queue_resize (GTK_WIDGET (scale));
if (fmt)
return fmt;
else
- return g_strdup_printf ("%0.*f", scale->draw_digits,
+ return g_strdup_printf ("%0.*f", scale->digits,
value);
}
{
GtkRange range;
- gint draw_digits;
+ gint digits;
guint draw_value : 1;
guint value_pos : 2;
};