sizerequest: Change critical message

Printing the affected widget leads people to assume that it is to blame
for the error. However, the widget is the object the function is being
called on, not the caller. And the caller is doing it wrong.

Usually the caller is the parent widget, so we could print that one, but
it's only usually, it can be an issue propagating from a grandparent and
it doesn't tell you from where the function is called (allocation or
measuring), so you need a debugger anyway.

So don't put anything there instead.
This commit is contained in:
Benjamin Otte 2021-11-20 16:59:50 +01:00
parent 7b3208092c
commit eefb6a0dd4

View File

@ -494,8 +494,8 @@ gtk_widget_measure (GtkWidget *widget,
gtk_widget_measure (widget, OPPOSITE_ORIENTATION (orientation), -1, &min_opposite_size, NULL, NULL, NULL);
if (for_size < min_opposite_size)
{
g_critical ("gtk_widget_measure: assertion 'for_size >= minimum opposite size' failed for %s %p: %u >= %u",
G_OBJECT_TYPE_NAME (widget), widget, for_size, min_opposite_size);
g_critical ("gtk_widget_measure: assertion 'for_size >= minimum opposite size' failed: %u >= %u",
for_size, min_opposite_size);
for_size = min_opposite_size;
}
}