diff options
author | Tim Janik <timj@gtk.org> | 2000-02-11 06:39:19 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 2000-02-11 06:39:19 +0000 |
commit | 778cb9ab521caa51d5895c74d2761ba1bd9ecb49 (patch) | |
tree | 0199eb9973a8e3ec6fec29c8e0efa4676d91c79f | |
parent | 3f8d44d715688545d2034ccd4e562414b376169b (diff) | |
download | gdk-pixbuf-778cb9ab521caa51d5895c74d2761ba1bd9ecb49.tar.gz |
had to squeeze some more guint wrap-around bugs before going to bed.
Fri Feb 11 02:19:32 2000 Tim Janik <timj@gtk.org>
* gtk/gtkhpaned.c (gtk_hpaned_size_allocate):
* gtk/gtkvpaned.c (gtk_vpaned_size_allocate):
* gtk/gtkpaned.c (gtk_paned_compute_position): had to squeeze some
more guint wrap-around bugs before going to bed.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-0 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 7 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 7 | ||||
-rw-r--r-- | gtk/gtkhpaned.c | 30 | ||||
-rw-r--r-- | gtk/gtkpaned.c | 5 | ||||
-rw-r--r-- | gtk/gtkvpaned.c | 28 |
10 files changed, 80 insertions, 32 deletions
@@ -1,3 +1,10 @@ +Fri Feb 11 02:19:32 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkhpaned.c (gtk_hpaned_size_allocate): + * gtk/gtkvpaned.c (gtk_vpaned_size_allocate): + * gtk/gtkpaned.c (gtk_paned_compute_position): had to squeeze some + more guint wrap-around bugs before going to bed. + Thu Feb 10 16:16:35 2000 Tim Janik <timj@gtk.org> * gtk/gtkspinbutton.c (gtk_spin_button_size_allocate): guard against diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index f65889417..5bb81c091 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,10 @@ +Fri Feb 11 02:19:32 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkhpaned.c (gtk_hpaned_size_allocate): + * gtk/gtkvpaned.c (gtk_vpaned_size_allocate): + * gtk/gtkpaned.c (gtk_paned_compute_position): had to squeeze some + more guint wrap-around bugs before going to bed. + Thu Feb 10 16:16:35 2000 Tim Janik <timj@gtk.org> * gtk/gtkspinbutton.c (gtk_spin_button_size_allocate): guard against diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index f65889417..5bb81c091 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,10 @@ +Fri Feb 11 02:19:32 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkhpaned.c (gtk_hpaned_size_allocate): + * gtk/gtkvpaned.c (gtk_vpaned_size_allocate): + * gtk/gtkpaned.c (gtk_paned_compute_position): had to squeeze some + more guint wrap-around bugs before going to bed. + Thu Feb 10 16:16:35 2000 Tim Janik <timj@gtk.org> * gtk/gtkspinbutton.c (gtk_spin_button_size_allocate): guard against diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index f65889417..5bb81c091 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,10 @@ +Fri Feb 11 02:19:32 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkhpaned.c (gtk_hpaned_size_allocate): + * gtk/gtkvpaned.c (gtk_vpaned_size_allocate): + * gtk/gtkpaned.c (gtk_paned_compute_position): had to squeeze some + more guint wrap-around bugs before going to bed. + Thu Feb 10 16:16:35 2000 Tim Janik <timj@gtk.org> * gtk/gtkspinbutton.c (gtk_spin_button_size_allocate): guard against diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index f65889417..5bb81c091 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,10 @@ +Fri Feb 11 02:19:32 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkhpaned.c (gtk_hpaned_size_allocate): + * gtk/gtkvpaned.c (gtk_vpaned_size_allocate): + * gtk/gtkpaned.c (gtk_paned_compute_position): had to squeeze some + more guint wrap-around bugs before going to bed. + Thu Feb 10 16:16:35 2000 Tim Janik <timj@gtk.org> * gtk/gtkspinbutton.c (gtk_spin_button_size_allocate): guard against diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index f65889417..5bb81c091 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,10 @@ +Fri Feb 11 02:19:32 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkhpaned.c (gtk_hpaned_size_allocate): + * gtk/gtkvpaned.c (gtk_vpaned_size_allocate): + * gtk/gtkpaned.c (gtk_paned_compute_position): had to squeeze some + more guint wrap-around bugs before going to bed. + Thu Feb 10 16:16:35 2000 Tim Janik <timj@gtk.org> * gtk/gtkspinbutton.c (gtk_spin_button_size_allocate): guard against diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index f65889417..5bb81c091 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,10 @@ +Fri Feb 11 02:19:32 2000 Tim Janik <timj@gtk.org> + + * gtk/gtkhpaned.c (gtk_hpaned_size_allocate): + * gtk/gtkvpaned.c (gtk_vpaned_size_allocate): + * gtk/gtkpaned.c (gtk_paned_compute_position): had to squeeze some + more guint wrap-around bugs before going to bed. + Thu Feb 10 16:16:35 2000 Tim Janik <timj@gtk.org> * gtk/gtkspinbutton.c (gtk_spin_button_size_allocate): guard against diff --git a/gtk/gtkhpaned.c b/gtk/gtkhpaned.c index 0f9df20c3..5a3b49120 100644 --- a/gtk/gtkhpaned.c +++ b/gtk/gtkhpaned.c @@ -144,17 +144,17 @@ gtk_hpaned_size_allocate (GtkWidget *widget, GtkAllocation child1_allocation; GtkAllocation child2_allocation; GdkRectangle old_groove_rectangle; - guint16 border_width; + gint border_width, gutter_size; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_HPANED (widget)); g_return_if_fail (allocation != NULL); widget->allocation = *allocation; - paned = GTK_PANED (widget); border_width = GTK_CONTAINER (paned)->border_width; - + gutter_size = paned->gutter_size; + if (paned->child1) gtk_widget_get_child_requisition (paned->child1, &child1_requisition); else @@ -166,16 +166,16 @@ gtk_hpaned_size_allocate (GtkWidget *widget, child2_requisition.width = 0; gtk_paned_compute_position (paned, - widget->allocation.width - - paned->gutter_size - - 2 * border_width, + MAX (1, (gint) widget->allocation.width + - gutter_size + - 2 * border_width), child1_requisition.width, child2_requisition.width); /* Move the handle before the children so we don't get extra expose events */ - paned->handle_xpos = paned->child1_size + border_width + paned->gutter_size / 2 - paned->handle_size / 2; - paned->handle_ypos = allocation->height - border_width - 2*paned->handle_size; + paned->handle_ypos = (gint) allocation->height - border_width - 2 * paned->handle_size; + paned->handle_xpos = paned->child1_size + border_width + gutter_size / 2 - paned->handle_size / 2; if (GTK_WIDGET_REALIZED (widget)) { @@ -186,15 +186,15 @@ gtk_hpaned_size_allocate (GtkWidget *widget, gdk_window_move (paned->handle, paned->handle_xpos, paned->handle_ypos); } - child1_allocation.height = child2_allocation.height = MAX (1, (gint)allocation->height - border_width * 2); + child1_allocation.height = child2_allocation.height = MAX (1, (gint) allocation->height - border_width * 2); child1_allocation.width = paned->child1_size; - child1_allocation.x = border_width; child1_allocation.y = child2_allocation.y = border_width; + child1_allocation.x = border_width; old_groove_rectangle = paned->groove_rectangle; - paned->groove_rectangle.x = child1_allocation.x - + child1_allocation.width + paned->gutter_size / 2 - 1; + paned->groove_rectangle.x = (child1_allocation.x + + child1_allocation.width + gutter_size / 2 - 1); paned->groove_rectangle.y = 0; paned->groove_rectangle.width = 2; paned->groove_rectangle.height = allocation->height; @@ -217,9 +217,9 @@ gtk_hpaned_size_allocate (GtkWidget *widget, paned->groove_rectangle.height); } - child2_allocation.x = paned->groove_rectangle.x + paned->gutter_size / 2 + 1; - child2_allocation.width = MAX (1, (gint)allocation->width - - child2_allocation.x - border_width); + child2_allocation.x = paned->groove_rectangle.x + gutter_size / 2 + 1; + child2_allocation.width = MAX (1, (gint) allocation->width - + child2_allocation.x - border_width); /* Now allocate the childen, making sure, when resizing not to * overlap the windows */ diff --git a/gtk/gtkpaned.c b/gtk/gtkpaned.c index 3a6929fc0..de38f61ac 100644 --- a/gtk/gtkpaned.c +++ b/gtk/gtkpaned.c @@ -567,12 +567,12 @@ gtk_paned_compute_position (GtkPaned *paned, paned->max_position = allocation; if (!paned->child2_shrink) - paned->max_position -= child2_req; + paned->max_position = MAX (1, paned->max_position - child2_req); if (!paned->position_set) { if (paned->child1_resize && !paned->child2_resize) - paned->child1_size = allocation - child2_req; + paned->child1_size = MAX (1, allocation - child2_req); else if (!paned->child1_resize && paned->child2_resize) paned->child1_size = child1_req; else @@ -597,5 +597,4 @@ gtk_paned_compute_position (GtkPaned *paned, paned->max_position); paned->last_allocation = allocation; - } diff --git a/gtk/gtkvpaned.c b/gtk/gtkvpaned.c index 22dfa5cc1..f5d2209a3 100644 --- a/gtk/gtkvpaned.c +++ b/gtk/gtkvpaned.c @@ -144,16 +144,16 @@ gtk_vpaned_size_allocate (GtkWidget *widget, GtkAllocation child1_allocation; GtkAllocation child2_allocation; GdkRectangle old_groove_rectangle; - guint16 border_width; + gint border_width, gutter_size; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_VPANED (widget)); g_return_if_fail (allocation != NULL); - + widget->allocation = *allocation; - paned = GTK_PANED (widget); border_width = GTK_CONTAINER (widget)->border_width; + gutter_size = paned->gutter_size; if (paned->child1) gtk_widget_get_child_requisition (paned->child1, &child1_requisition); @@ -166,16 +166,16 @@ gtk_vpaned_size_allocate (GtkWidget *widget, child2_requisition.height = 0; gtk_paned_compute_position (paned, - widget->allocation.height - - paned->gutter_size - - 2 * border_width, + MAX (1, (gint) widget->allocation.height + - gutter_size + - 2 * border_width), child1_requisition.height, child2_requisition.height); /* Move the handle before the children so we don't get extra expose events */ - paned->handle_xpos = allocation->width - border_width - 2 * paned->handle_size; - paned->handle_ypos = paned->child1_size + border_width + paned->gutter_size / 2 - paned->handle_size / 2; + paned->handle_xpos = (gint) allocation->width - border_width - 2 * paned->handle_size; + paned->handle_ypos = paned->child1_size + border_width + gutter_size / 2 - paned->handle_size / 2; if (GTK_WIDGET_REALIZED (widget)) { @@ -186,15 +186,15 @@ gtk_vpaned_size_allocate (GtkWidget *widget, gdk_window_move (paned->handle, paned->handle_xpos, paned->handle_ypos); } - child1_allocation.width = child2_allocation.width = MAX (1, (gint)allocation->width - border_width * 2); + child1_allocation.width = child2_allocation.width = MAX (1, (gint) allocation->width - border_width * 2); child1_allocation.height = paned->child1_size; child1_allocation.x = child2_allocation.x = border_width; child1_allocation.y = border_width; old_groove_rectangle = paned->groove_rectangle; - paned->groove_rectangle.y = child1_allocation.y - + child1_allocation.height + paned->gutter_size / 2 - 1; + paned->groove_rectangle.y = (child1_allocation.y + + child1_allocation.height + gutter_size / 2 - 1); paned->groove_rectangle.x = 0; paned->groove_rectangle.height = 2; paned->groove_rectangle.width = allocation->width; @@ -217,9 +217,9 @@ gtk_vpaned_size_allocate (GtkWidget *widget, paned->groove_rectangle.height); } - child2_allocation.y = paned->groove_rectangle.y + paned->gutter_size / 2 + 1; - child2_allocation.height = MAX (1, (gint)allocation->height - - child2_allocation.y - border_width); + child2_allocation.y = paned->groove_rectangle.y + gutter_size / 2 + 1; + child2_allocation.height = MAX (1, (gint) allocation->height - + child2_allocation.y - border_width); /* Now allocate the childen, making sure, when resizing not to * overlap the windows */ |