]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/win_gtk.c
don't require multimon.h any more now (patch 1446030); enable wxUSE_DISPLAY by default
[wxWidgets.git] / src / gtk / win_gtk.c
index 71ee98747c9c3d7fa85f2667c2ec7f006b097533..85c77d7c025afbf24cb92515faadadea7a3de586 100644 (file)
@@ -13,7 +13,7 @@
 #define XCheckIfEvent XCHECKIFEVENT
 #endif
 
-#include "wx/defs.h"
+#include "wx/platform.h"
 #include "wx/gtk/win_gtk.h"
 #include "gtk/gtksignal.h"
 #include "gtk/gtkprivate.h"
@@ -306,7 +306,7 @@ gtk_pizza_put (GtkPizza   *pizza,
 
     gtk_widget_set_parent (widget, GTK_WIDGET (pizza));
 
-    gtk_widget_set_usize (widget, width, height);
+    gtk_widget_set_size_request (widget, width, height);
 }
 
 void
@@ -370,7 +370,7 @@ gtk_pizza_resize (GtkPizza    *pizza,
             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);
@@ -394,6 +394,16 @@ gtk_pizza_set_size (GtkPizza   *pizza,
     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)
     {
@@ -412,7 +422,7 @@ gtk_pizza_set_size (GtkPizza   *pizza,
             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);