diff options
-rw-r--r-- | ChangeLog | 16 | ||||
-rw-r--r-- | ChangeLog.pre-2-0 | 16 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 16 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 16 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 16 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 16 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 16 | ||||
-rw-r--r-- | gtk/gtkoptionmenu.c | 10 |
8 files changed, 82 insertions, 40 deletions
@@ -1,11 +1,17 @@ +Mon Feb 1 15:14:56 1999 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkoptionmenu.c (gtk_option_menu_size_allocate): + Fixed problem with uints resulting in huge child + allocations. + Mon Feb 1 14:54:28 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtklabel.c (gtk_label_expose): Cast uints - to ints in geometry calculations. This should - prevent FP exceptions on FreeBSD when quantities - become negative. [ Actually, this is probably - a workaround with a gcc bug with handling of - bitfields, according to Ben Jackson <ben@ben.com> ] + to ints in geometry calculations. This should + prevent FP exceptions on FreeBSD when quantities + become negative. [ Actually, this is probably + a workaround with a gcc bug with handling of + bitfields, according to Ben Jackson <ben@ben.com> ] Mon Feb 1 13:35:14 GMT 1999 Tony Gale <gale@gtk.org> diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 27fad15951..4a070c104e 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,11 +1,17 @@ +Mon Feb 1 15:14:56 1999 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkoptionmenu.c (gtk_option_menu_size_allocate): + Fixed problem with uints resulting in huge child + allocations. + Mon Feb 1 14:54:28 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtklabel.c (gtk_label_expose): Cast uints - to ints in geometry calculations. This should - prevent FP exceptions on FreeBSD when quantities - become negative. [ Actually, this is probably - a workaround with a gcc bug with handling of - bitfields, according to Ben Jackson <ben@ben.com> ] + to ints in geometry calculations. This should + prevent FP exceptions on FreeBSD when quantities + become negative. [ Actually, this is probably + a workaround with a gcc bug with handling of + bitfields, according to Ben Jackson <ben@ben.com> ] Mon Feb 1 13:35:14 GMT 1999 Tony Gale <gale@gtk.org> diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 27fad15951..4a070c104e 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,11 +1,17 @@ +Mon Feb 1 15:14:56 1999 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkoptionmenu.c (gtk_option_menu_size_allocate): + Fixed problem with uints resulting in huge child + allocations. + Mon Feb 1 14:54:28 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtklabel.c (gtk_label_expose): Cast uints - to ints in geometry calculations. This should - prevent FP exceptions on FreeBSD when quantities - become negative. [ Actually, this is probably - a workaround with a gcc bug with handling of - bitfields, according to Ben Jackson <ben@ben.com> ] + to ints in geometry calculations. This should + prevent FP exceptions on FreeBSD when quantities + become negative. [ Actually, this is probably + a workaround with a gcc bug with handling of + bitfields, according to Ben Jackson <ben@ben.com> ] Mon Feb 1 13:35:14 GMT 1999 Tony Gale <gale@gtk.org> diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 27fad15951..4a070c104e 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,11 +1,17 @@ +Mon Feb 1 15:14:56 1999 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkoptionmenu.c (gtk_option_menu_size_allocate): + Fixed problem with uints resulting in huge child + allocations. + Mon Feb 1 14:54:28 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtklabel.c (gtk_label_expose): Cast uints - to ints in geometry calculations. This should - prevent FP exceptions on FreeBSD when quantities - become negative. [ Actually, this is probably - a workaround with a gcc bug with handling of - bitfields, according to Ben Jackson <ben@ben.com> ] + to ints in geometry calculations. This should + prevent FP exceptions on FreeBSD when quantities + become negative. [ Actually, this is probably + a workaround with a gcc bug with handling of + bitfields, according to Ben Jackson <ben@ben.com> ] Mon Feb 1 13:35:14 GMT 1999 Tony Gale <gale@gtk.org> diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 27fad15951..4a070c104e 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,11 +1,17 @@ +Mon Feb 1 15:14:56 1999 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkoptionmenu.c (gtk_option_menu_size_allocate): + Fixed problem with uints resulting in huge child + allocations. + Mon Feb 1 14:54:28 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtklabel.c (gtk_label_expose): Cast uints - to ints in geometry calculations. This should - prevent FP exceptions on FreeBSD when quantities - become negative. [ Actually, this is probably - a workaround with a gcc bug with handling of - bitfields, according to Ben Jackson <ben@ben.com> ] + to ints in geometry calculations. This should + prevent FP exceptions on FreeBSD when quantities + become negative. [ Actually, this is probably + a workaround with a gcc bug with handling of + bitfields, according to Ben Jackson <ben@ben.com> ] Mon Feb 1 13:35:14 GMT 1999 Tony Gale <gale@gtk.org> diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 27fad15951..4a070c104e 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,11 +1,17 @@ +Mon Feb 1 15:14:56 1999 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkoptionmenu.c (gtk_option_menu_size_allocate): + Fixed problem with uints resulting in huge child + allocations. + Mon Feb 1 14:54:28 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtklabel.c (gtk_label_expose): Cast uints - to ints in geometry calculations. This should - prevent FP exceptions on FreeBSD when quantities - become negative. [ Actually, this is probably - a workaround with a gcc bug with handling of - bitfields, according to Ben Jackson <ben@ben.com> ] + to ints in geometry calculations. This should + prevent FP exceptions on FreeBSD when quantities + become negative. [ Actually, this is probably + a workaround with a gcc bug with handling of + bitfields, according to Ben Jackson <ben@ben.com> ] Mon Feb 1 13:35:14 GMT 1999 Tony Gale <gale@gtk.org> diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 27fad15951..4a070c104e 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,11 +1,17 @@ +Mon Feb 1 15:14:56 1999 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkoptionmenu.c (gtk_option_menu_size_allocate): + Fixed problem with uints resulting in huge child + allocations. + Mon Feb 1 14:54:28 1999 Owen Taylor <otaylor@redhat.com> * gtk/gtklabel.c (gtk_label_expose): Cast uints - to ints in geometry calculations. This should - prevent FP exceptions on FreeBSD when quantities - become negative. [ Actually, this is probably - a workaround with a gcc bug with handling of - bitfields, according to Ben Jackson <ben@ben.com> ] + to ints in geometry calculations. This should + prevent FP exceptions on FreeBSD when quantities + become negative. [ Actually, this is probably + a workaround with a gcc bug with handling of + bitfields, according to Ben Jackson <ben@ben.com> ] Mon Feb 1 13:35:14 GMT 1999 Tony Gale <gale@gtk.org> diff --git a/gtk/gtkoptionmenu.c b/gtk/gtkoptionmenu.c index bf42d863e8..c888625fca 100644 --- a/gtk/gtkoptionmenu.c +++ b/gtk/gtkoptionmenu.c @@ -307,11 +307,11 @@ gtk_option_menu_size_allocate (GtkWidget *widget, GTK_WIDGET (widget)->style->klass->xthickness) + 1; child_allocation.y = (GTK_CONTAINER (widget)->border_width + GTK_WIDGET (widget)->style->klass->ythickness) + 1; - child_allocation.width = (allocation->width - child_allocation.x * 2 - - OPTION_INDICATOR_WIDTH - OPTION_INDICATOR_SPACING * 5 - - CHILD_LEFT_SPACING - CHILD_RIGHT_SPACING) - 2; - child_allocation.height = (allocation->height - child_allocation.y * 2 - - CHILD_TOP_SPACING - CHILD_BOTTOM_SPACING) - 2; + child_allocation.width = MAX (1, (gint)allocation->width - child_allocation.x * 2 - + OPTION_INDICATOR_WIDTH - OPTION_INDICATOR_SPACING * 5 - + CHILD_LEFT_SPACING - CHILD_RIGHT_SPACING - 2); + child_allocation.height = MAX (1, (gint)allocation->height - child_allocation.y * 2 - + CHILD_TOP_SPACING - CHILD_BOTTOM_SPACING - 2); child_allocation.x += CHILD_LEFT_SPACING; child_allocation.y += CHILD_RIGHT_SPACING; |