/* ///////////////////////////////////////////////////////////////////////////
-// Name: win_gtk.c
+// Name: src/gtk/win_gtk.c
// Purpose: Native GTK+ widget for wxWidgets, based on GtkLayout and
// GtkFixed. It makes use of the gravity window property and
// therefore does not work with GTK 1.0.
#define XCheckIfEvent XCHECKIFEVENT
#endif
-#include "wx/setup.h"
+#include "wx/platform.h"
#include "wx/gtk/win_gtk.h"
#include "gtk/gtksignal.h"
#include "gtk/gtkprivate.h"
gtk_widget_set_parent (widget, GTK_WIDGET (pizza));
- gtk_widget_set_usize (widget, width, height);
+ gtk_widget_set_size_request (widget, width, height);
}
void
child->width = width;
child->height = height;
- gtk_widget_set_usize (widget, width, height);
+ gtk_widget_set_size_request (widget, width, height);
if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (pizza))
gtk_widget_queue_resize (widget);
g_return_if_fail (GTK_IS_PIZZA (pizza));
g_return_if_fail (widget != NULL);
+#ifndef WX_WARN_ILLEGAL_SETSIZE
+ /* this really shouldn't happen -- but it does, a lot, right now and we
+ can't pass negative values to gtk_widget_set_size_request() without getting
+ a warning printed out, so filter them out here */
+ if ( width < 0 )
+ width = 0;
+ if ( height < 0 )
+ height = 0;
+#endif
+
children = pizza->children;
while (children)
{
child->width = width;
child->height = height;
- gtk_widget_set_usize (widget, width, height);
+ gtk_widget_set_size_request (widget, width, height);
if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (pizza))
gtk_widget_queue_resize (widget);
#ifdef __cplusplus
}
#endif /* __cplusplus */
-