X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e0429715e2948e3ab453d843f84c7ee76db7e3e0..c2a4fabb14e744242aee559efc2c16d2546f23bc:/src/gtk/win_gtk.c diff --git a/src/gtk/win_gtk.c b/src/gtk/win_gtk.c index 4f396aafd1..cc12038063 100644 --- a/src/gtk/win_gtk.c +++ b/src/gtk/win_gtk.c @@ -14,7 +14,7 @@ #endif #include "wx/platform.h" -#include "wx/gtk/win_gtk.h" +#include "wx/gtk/private/win_gtk.h" #ifdef __cplusplus extern "C" { @@ -22,7 +22,6 @@ extern "C" { typedef struct _GtkPizzaChild GtkPizzaChild; typedef struct _GtkPizzaClass GtkPizzaClass; -typedef struct _GtkPizzaAdjData GtkPizzaAdjData; struct _GtkPizzaClass { @@ -40,12 +39,6 @@ struct _GtkPizzaChild gint y; }; -struct _GtkPizzaAdjData -{ - gint dx; - gint dy; -}; - static void gtk_pizza_class_init (GtkPizzaClass *klass); static void gtk_pizza_init (GtkPizza *pizza); @@ -253,7 +246,7 @@ void gtk_pizza_set_xoffset (GtkPizza *pizza, gint xoffset) g_return_if_fail (GTK_IS_PIZZA (pizza)); pizza->m_xoffset = xoffset; - // do something + /* do something */ } void gtk_pizza_set_yoffset (GtkPizza *pizza, gint yoffset) @@ -262,7 +255,7 @@ void gtk_pizza_set_yoffset (GtkPizza *pizza, gint yoffset) g_return_if_fail (GTK_IS_PIZZA (pizza)); pizza->m_xoffset = yoffset; - // do something + /* do something */ } gint gtk_pizza_get_rtl_offset (GtkPizza *pizza) @@ -316,8 +309,6 @@ gtk_pizza_put (GtkPizza *pizza, gtk_widget_set_parent (widget, GTK_WIDGET (pizza)); gtk_widget_set_size_request( widget, width, height ); - if (GTK_WIDGET_REALIZED (pizza)) - gtk_pizza_allocate_child (pizza, child_info); } void @@ -743,17 +734,11 @@ gtk_pizza_scroll (GtkPizza *pizza, gint dx, gint dy) if (pizza->bin_window) gdk_window_scroll( pizza->bin_window, -dx, -dy ); - - tmp_list = pizza->children; - while (tmp_list) + + for (tmp_list = pizza->children; tmp_list; tmp_list = tmp_list->next) { GtkPizzaChild *child = tmp_list->data; - tmp_list = tmp_list->next; - - GtkAllocation alloc = child->widget->allocation; - alloc.x -= dx; - alloc.y -= dy; - gtk_widget_size_allocate( child->widget, &alloc ); + gtk_widget_queue_resize(child->widget); } }