Outstanding patches, #58680 and #58681



The first bug seems to be a simple typo: the second argument to
compute_double_length
should probably be spin_button->digits in both calls.
Ok to commit the following patch ?
Index: gtk/gtkspinbutton.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkspinbutton.c,v
retrieving revision 1.69
diff -u -3 -p -u -r1.69 gtkspinbutton.c
--- gtk/gtkspinbutton.c	2001/07/18 23:39:23	1.69
+++ gtk/gtkspinbutton.c	2001/08/07 12:38:32
@@ -583,7 +583,7 @@ gtk_spin_button_size_request (GtkWidget
       w = MIN (string_len, 10) * PANGO_PIXELS
(metrics.approximate_digit_width);
       width = MAX (width, w);
       string_len = compute_double_length (spin_button->adjustment->lower,
-					  spin_button->adjustment->step_increment);
+					  spin_button->digits);
       w = MIN (string_len, 10) * PANGO_PIXELS
(metrics.approximate_digit_width);
       width = MAX (width, w);


While being here, there is another bug related to spin buttons:
Is there any reason to restrict the width of the spinbutton entry field
to 10 places, but on the other hand allow digits to go up to 20 ?
If this is just historical baggage, here is a patch to remove it.Ok to
commit this patch ?Index: gtk/gtkspinbutton.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkspinbutton.c,v
retrieving revision 1.69
diff -u -3 -p -u -r1.69 gtkspinbutton.c
--- gtk/gtkspinbutton.c	2001/07/18 23:39:23	1.69
+++ gtk/gtkspinbutton.c	2001/08/07 12:26:40
@@ -580,11 +580,11 @@ gtk_spin_button_size_request (GtkWidget

       string_len = compute_double_length (spin_button->adjustment->upper,
                                           spin_button->digits);
-      w = MIN (string_len, 10) * PANGO_PIXELS
(metrics.approximate_digit_width);
+      w = string_len * PANGO_PIXELS (metrics.approximate_digit_width);
       width = MAX (width, w);
       string_len = compute_double_length (spin_button->adjustment->lower,
 					  spin_button->adjustment->step_increment);
-      w = MIN (string_len, 10) * PANGO_PIXELS
(metrics.approximate_digit_width);
+      w = string_len * PANGO_PIXELS (metrics.approximate_digit_width);
       width = MAX (width, w);

       requisition->width = width + ARROW_SIZE + 2 *
widget->style->xthickness;








[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]