summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rw-r--r--ChangeLog.pre-2-013
-rw-r--r--ChangeLog.pre-2-1013
-rw-r--r--ChangeLog.pre-2-213
-rw-r--r--ChangeLog.pre-2-413
-rw-r--r--ChangeLog.pre-2-613
-rw-r--r--ChangeLog.pre-2-813
-rw-r--r--gtk/gtkaspectframe.c32
-rw-r--r--gtk/gtkframe.c13
9 files changed, 115 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog
index d9ef79b8bd..ce526e9cf2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Mon Nov 24 1997 Owen Taylor <owt1@cornell.edu>
+ gtk/gtkaspectframe.c:
+ Some minor improvements to rounding in aspectframes.
+ Make sure that child allocation is always >= 0
+ Always trigger size allocation with gtk_widget_queue_resize
+ to prevent calling size_allocate before allocation done.
+
+Mon Nov 24 1997 Owen Taylor <owt1@cornell.edu>
+ gtk/gtkframe.c:
+ Changed tests for drawability to GTK_WIDGET_DRAWABLE
+ Always trigger size allocation with gtk_widget_queue_resize
+ to prevent calling size_allocate before allocation done.
+
Mon Nov 24 1997 Jay Painter <jpaint@serv.net>
gtk-dairiki-971117-2.patch
gtk/gtkaspectframe.c (gtk_aspect_frame_size_allocate): When
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index d9ef79b8bd..ce526e9cf2 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,16 @@
+Mon Nov 24 1997 Owen Taylor <owt1@cornell.edu>
+ gtk/gtkaspectframe.c:
+ Some minor improvements to rounding in aspectframes.
+ Make sure that child allocation is always >= 0
+ Always trigger size allocation with gtk_widget_queue_resize
+ to prevent calling size_allocate before allocation done.
+
+Mon Nov 24 1997 Owen Taylor <owt1@cornell.edu>
+ gtk/gtkframe.c:
+ Changed tests for drawability to GTK_WIDGET_DRAWABLE
+ Always trigger size allocation with gtk_widget_queue_resize
+ to prevent calling size_allocate before allocation done.
+
Mon Nov 24 1997 Jay Painter <jpaint@serv.net>
gtk-dairiki-971117-2.patch
gtk/gtkaspectframe.c (gtk_aspect_frame_size_allocate): When
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index d9ef79b8bd..ce526e9cf2 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,16 @@
+Mon Nov 24 1997 Owen Taylor <owt1@cornell.edu>
+ gtk/gtkaspectframe.c:
+ Some minor improvements to rounding in aspectframes.
+ Make sure that child allocation is always >= 0
+ Always trigger size allocation with gtk_widget_queue_resize
+ to prevent calling size_allocate before allocation done.
+
+Mon Nov 24 1997 Owen Taylor <owt1@cornell.edu>
+ gtk/gtkframe.c:
+ Changed tests for drawability to GTK_WIDGET_DRAWABLE
+ Always trigger size allocation with gtk_widget_queue_resize
+ to prevent calling size_allocate before allocation done.
+
Mon Nov 24 1997 Jay Painter <jpaint@serv.net>
gtk-dairiki-971117-2.patch
gtk/gtkaspectframe.c (gtk_aspect_frame_size_allocate): When
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index d9ef79b8bd..ce526e9cf2 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,16 @@
+Mon Nov 24 1997 Owen Taylor <owt1@cornell.edu>
+ gtk/gtkaspectframe.c:
+ Some minor improvements to rounding in aspectframes.
+ Make sure that child allocation is always >= 0
+ Always trigger size allocation with gtk_widget_queue_resize
+ to prevent calling size_allocate before allocation done.
+
+Mon Nov 24 1997 Owen Taylor <owt1@cornell.edu>
+ gtk/gtkframe.c:
+ Changed tests for drawability to GTK_WIDGET_DRAWABLE
+ Always trigger size allocation with gtk_widget_queue_resize
+ to prevent calling size_allocate before allocation done.
+
Mon Nov 24 1997 Jay Painter <jpaint@serv.net>
gtk-dairiki-971117-2.patch
gtk/gtkaspectframe.c (gtk_aspect_frame_size_allocate): When
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index d9ef79b8bd..ce526e9cf2 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,16 @@
+Mon Nov 24 1997 Owen Taylor <owt1@cornell.edu>
+ gtk/gtkaspectframe.c:
+ Some minor improvements to rounding in aspectframes.
+ Make sure that child allocation is always >= 0
+ Always trigger size allocation with gtk_widget_queue_resize
+ to prevent calling size_allocate before allocation done.
+
+Mon Nov 24 1997 Owen Taylor <owt1@cornell.edu>
+ gtk/gtkframe.c:
+ Changed tests for drawability to GTK_WIDGET_DRAWABLE
+ Always trigger size allocation with gtk_widget_queue_resize
+ to prevent calling size_allocate before allocation done.
+
Mon Nov 24 1997 Jay Painter <jpaint@serv.net>
gtk-dairiki-971117-2.patch
gtk/gtkaspectframe.c (gtk_aspect_frame_size_allocate): When
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index d9ef79b8bd..ce526e9cf2 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,16 @@
+Mon Nov 24 1997 Owen Taylor <owt1@cornell.edu>
+ gtk/gtkaspectframe.c:
+ Some minor improvements to rounding in aspectframes.
+ Make sure that child allocation is always >= 0
+ Always trigger size allocation with gtk_widget_queue_resize
+ to prevent calling size_allocate before allocation done.
+
+Mon Nov 24 1997 Owen Taylor <owt1@cornell.edu>
+ gtk/gtkframe.c:
+ Changed tests for drawability to GTK_WIDGET_DRAWABLE
+ Always trigger size allocation with gtk_widget_queue_resize
+ to prevent calling size_allocate before allocation done.
+
Mon Nov 24 1997 Jay Painter <jpaint@serv.net>
gtk-dairiki-971117-2.patch
gtk/gtkaspectframe.c (gtk_aspect_frame_size_allocate): When
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index d9ef79b8bd..ce526e9cf2 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,16 @@
+Mon Nov 24 1997 Owen Taylor <owt1@cornell.edu>
+ gtk/gtkaspectframe.c:
+ Some minor improvements to rounding in aspectframes.
+ Make sure that child allocation is always >= 0
+ Always trigger size allocation with gtk_widget_queue_resize
+ to prevent calling size_allocate before allocation done.
+
+Mon Nov 24 1997 Owen Taylor <owt1@cornell.edu>
+ gtk/gtkframe.c:
+ Changed tests for drawability to GTK_WIDGET_DRAWABLE
+ Always trigger size allocation with gtk_widget_queue_resize
+ to prevent calling size_allocate before allocation done.
+
Mon Nov 24 1997 Jay Painter <jpaint@serv.net>
gtk-dairiki-971117-2.patch
gtk/gtkaspectframe.c (gtk_aspect_frame_size_allocate): When
diff --git a/gtk/gtkaspectframe.c b/gtk/gtkaspectframe.c
index 16feba5f02..870c0b2f59 100644
--- a/gtk/gtkaspectframe.c
+++ b/gtk/gtkaspectframe.c
@@ -124,22 +124,21 @@ gtk_aspect_frame_set (GtkAspectFrame *aspect_frame,
(aspect_frame->ratio != ratio) ||
(aspect_frame->obey_child != obey_child))
{
- GtkWidget * this = GTK_WIDGET(aspect_frame);
-
+ GtkWidget *widget = GTK_WIDGET(aspect_frame);
+
aspect_frame->xalign = xalign;
aspect_frame->yalign = yalign;
aspect_frame->ratio = ratio;
aspect_frame->obey_child = obey_child;
- if (GTK_WIDGET_MAPPED(this))
- gdk_window_clear_area (this->window,
- this->allocation.x,
- this->allocation.y,
- this->allocation.width,
- this->allocation.height);
+ if (GTK_WIDGET_DRAWABLE(widget))
+ gdk_window_clear_area (widget->window,
+ widget->allocation.x,
+ widget->allocation.y,
+ widget->allocation.width,
+ widget->allocation.height);
- gtk_widget_size_allocate (this, &this->allocation);
- gtk_widget_queue_draw (this);
+ gtk_widget_queue_resize (widget);
}
}
@@ -275,7 +274,7 @@ gtk_aspect_frame_size_allocate (GtkWidget *widget,
frame = GTK_FRAME (widget);
bin = GTK_BIN (widget);
- if (GTK_WIDGET_MAPPED (widget) &&
+ if (GTK_WIDGET_DRAWABLE (widget) &&
((widget->allocation.x != allocation->x) ||
(widget->allocation.y != allocation->y) ||
(widget->allocation.width != allocation->width) ||
@@ -319,14 +318,19 @@ gtk_aspect_frame_size_allocate (GtkWidget *widget,
GTK_CONTAINER (frame)->border_width -
GTK_WIDGET (frame)->style->klass->ythickness);
- if (height > width / ratio)
+ /* make sure we don't allocate a negative width or height,
+ * since that will be cast to a (very big) guint16 */
+ width = MAX (0, width);
+ height = MAX (0, height);
+
+ if (ratio * height > width)
{
child_allocation.width = width;
child_allocation.height = width/ratio + 0.5;
}
- else if (width > height * ratio)
+ else
{
- child_allocation.width = ratio * height + 0.5;
+ child_allocation.width = ratio*height + 0.5;
child_allocation.height = height;
}
diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c
index fe78897432..a3160307eb 100644
--- a/gtk/gtkframe.c
+++ b/gtk/gtkframe.c
@@ -144,8 +144,9 @@ gtk_frame_set_label (GtkFrame *frame,
widget->allocation.width - GTK_CONTAINER (frame)->border_width,
widget->allocation.y + frame->label_height);
- gtk_widget_queue_resize (GTK_WIDGET (frame));
}
+
+ gtk_widget_queue_resize (GTK_WIDGET (frame));
}
void
@@ -164,7 +165,7 @@ gtk_frame_set_label_align (GtkFrame *frame,
frame->label_xalign = xalign;
frame->label_yalign = yalign;
- if (GTK_WIDGET_VISIBLE (frame))
+ if (GTK_WIDGET_DRAWABLE (frame))
{
GtkWidget *widget;
@@ -177,9 +178,8 @@ gtk_frame_set_label_align (GtkFrame *frame,
widget->allocation.width - GTK_CONTAINER (frame)->border_width,
widget->allocation.y + frame->label_height);
- gtk_widget_size_allocate (GTK_WIDGET (frame), &(GTK_WIDGET (frame)->allocation));
- gtk_widget_queue_draw (GTK_WIDGET (frame));
}
+ gtk_widget_queue_resize (GTK_WIDGET (frame));
}
}
@@ -194,16 +194,15 @@ gtk_frame_set_shadow_type (GtkFrame *frame,
{
frame->shadow_type = type;
- if (GTK_WIDGET_MAPPED (frame))
+ if (GTK_WIDGET_DRAWABLE (frame))
{
gdk_window_clear_area (GTK_WIDGET (frame)->window,
GTK_WIDGET (frame)->allocation.x,
GTK_WIDGET (frame)->allocation.y,
GTK_WIDGET (frame)->allocation.width,
GTK_WIDGET (frame)->allocation.height);
- gtk_widget_size_allocate (GTK_WIDGET (frame), &(GTK_WIDGET (frame)->allocation));
- gtk_widget_queue_draw (GTK_WIDGET (frame));
}
+ gtk_widget_queue_resize (GTK_WIDGET (frame));
}
}