diff options
author | Owen Taylor <otaylor@redhat.com> | 1999-02-01 21:55:49 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1999-02-01 21:55:49 +0000 |
commit | 78ab1ea3fcb1311863967dba02c0707db3842562 (patch) | |
tree | b958cd1c86dbce7b0b341ad4cc46d8a3cedf76c8 | |
parent | a512f0b8419e248b557e5d4bc44017dcb26d2a19 (diff) | |
download | gdk-pixbuf-78ab1ea3fcb1311863967dba02c0707db3842562.tar.gz |
Fixed problem with uints resulting in huge child allocations.
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.
-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 27fad1595..4a070c104 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 27fad1595..4a070c104 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 27fad1595..4a070c104 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 27fad1595..4a070c104 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 27fad1595..4a070c104 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 27fad1595..4a070c104 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 bf42d863e..c888625fc 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; |