summaryrefslogtreecommitdiff
path: root/gtk/gtkbox.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2017-06-04 20:13:26 +0200
committerMatthias Clasen <mclasen@redhat.com>2017-07-19 21:27:13 -0400
commit99b00b4d9c9f02984c1cfca0319fcf148dbb0fed (patch)
tree959736007bf10841e0b451768f8e8ce0ef787ac4 /gtk/gtkbox.c
parentab1e8502e7997b1eb1012882f60dcf81e2ad85fb (diff)
downloadgtk+-99b00b4d9c9f02984c1cfca0319fcf148dbb0fed.tar.gz
sizerequest: Assert that min_size >= 0
This should generally be true, so remove the checks from gtkbox.c and move it into gtksizerequest.c
Diffstat (limited to 'gtk/gtkbox.c')
-rw-r--r--gtk/gtkbox.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/gtk/gtkbox.c b/gtk/gtkbox.c
index 312f535782..d71aa48b80 100644
--- a/gtk/gtkbox.c
+++ b/gtk/gtkbox.c
@@ -433,24 +433,6 @@ gtk_box_size_allocate_no_center (GtkWidget *widget,
&sizes[i].minimum_size, &sizes[i].natural_size,
NULL, NULL);
- /* Assert the api is working properly */
- if (sizes[i].minimum_size < 0)
- g_error ("GtkBox child %s minimum %s: %d < 0 for %s %d",
- gtk_widget_get_name (GTK_WIDGET (child->widget)),
- (private->orientation == GTK_ORIENTATION_HORIZONTAL) ? "width" : "height",
- sizes[i].minimum_size,
- (private->orientation == GTK_ORIENTATION_HORIZONTAL) ? "height" : "width",
- (private->orientation == GTK_ORIENTATION_HORIZONTAL) ? allocation->height : allocation->width);
-
- if (sizes[i].natural_size < sizes[i].minimum_size)
- g_error ("GtkBox child %s natural %s: %d < minimum %d for %s %d",
- gtk_widget_get_name (GTK_WIDGET (child->widget)),
- (private->orientation == GTK_ORIENTATION_HORIZONTAL) ? "width" : "height",
- sizes[i].natural_size,
- sizes[i].minimum_size,
- (private->orientation == GTK_ORIENTATION_HORIZONTAL) ? "height" : "width",
- (private->orientation == GTK_ORIENTATION_HORIZONTAL) ? allocation->height : allocation->width);
-
children_minimum_size += sizes[i].minimum_size;
sizes[i].data = child;
@@ -1117,20 +1099,6 @@ gtk_box_compute_size_for_opposing_orientation (GtkBox *box,
&sizes[i].minimum_size, &sizes[i].natural_size,
NULL, NULL);
- /* Assert the api is working properly */
- if (sizes[i].minimum_size < 0)
- g_error ("GtkBox child %s minimum %s: %d < 0",
- gtk_widget_get_name (GTK_WIDGET (child->widget)),
- (private->orientation == GTK_ORIENTATION_HORIZONTAL) ? "width" : "height",
- sizes[i].minimum_size);
-
- if (sizes[i].natural_size < sizes[i].minimum_size)
- g_error ("GtkBox child %s natural %s: %d < minimum %d",
- gtk_widget_get_name (GTK_WIDGET (child->widget)),
- (private->orientation == GTK_ORIENTATION_HORIZONTAL) ? "width" : "height",
- sizes[i].natural_size,
- sizes[i].minimum_size);
-
children_minimum_size += sizes[i].minimum_size;
sizes[i].data = child;