From 8cee9c66a758abba8fecd2a9215d6cce202dd032 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Sat, 17 Oct 2009 18:55:14 +0200 Subject: [PATCH] Build with GSEAL_ENABLE and #undef it where accessors are missing --- libgimp/gimpbrushselectbutton.c | 15 +++++++++------ libgimp/gimpgradientselectbutton.c | 2 +- libgimp/gimpprogressbar.c | 16 +++++++++------- libgimp/gimpui.c | 4 +++- libgimp/gimpzoompreview.c | 2 ++ 5 files changed, 24 insertions(+), 15 deletions(-) diff --git a/libgimp/gimpbrushselectbutton.c b/libgimp/gimpbrushselectbutton.c index 770aced60e..4743407dc8 100644 --- a/libgimp/gimpbrushselectbutton.c +++ b/libgimp/gimpbrushselectbutton.c @@ -734,20 +734,23 @@ gimp_brush_select_preview_update (GtkWidget *preview, const guchar *mask_data) { GimpPreviewArea *area = GIMP_PREVIEW_AREA (preview); + GtkAllocation allocation; gint x, y; gint width, height; - width = MIN (brush_width, preview->allocation.width); - height = MIN (brush_height, preview->allocation.height); + gtk_widget_get_allocation (preview, &allocation); - x = ((preview->allocation.width - width) / 2); - y = ((preview->allocation.height - height) / 2); + width = MIN (brush_width, allocation.width); + height = MIN (brush_height, allocation.height); + + x = ((allocation.width - width) / 2); + y = ((allocation.height - height) / 2); if (x || y) gimp_preview_area_fill (area, 0, 0, - preview->allocation.width, - preview->allocation.height, + allocation.width, + allocation.height, 0xFF, 0xFF, 0xFF); gimp_brush_select_preview_draw (area, diff --git a/libgimp/gimpgradientselectbutton.c b/libgimp/gimpgradientselectbutton.c index e8750b3650..3c8d439499 100644 --- a/libgimp/gimpgradientselectbutton.c +++ b/libgimp/gimpgradientselectbutton.c @@ -531,7 +531,7 @@ gimp_gradient_select_preview_expose (GtkWidget *widget, guchar *buf = ((y / GIMP_CHECK_SIZE_SM) & 1) ? odd : even; gdk_draw_rgb_image_dithalign (gtk_widget_get_window (widget), - style->fg_gc[widget->state], + style->fg_gc[gtk_widget_get_state (widget)], event->area.x, y, event->area.width, 1, GDK_RGB_DITHER_MAX, diff --git a/libgimp/gimpprogressbar.c b/libgimp/gimpprogressbar.c index b9b88897f5..2e409a422e 100644 --- a/libgimp/gimpprogressbar.c +++ b/libgimp/gimpprogressbar.c @@ -21,6 +21,8 @@ #include "config.h" +#undef GSEAL_ENABLE + #include #ifdef GDK_WINDOWING_WIN32 @@ -107,7 +109,7 @@ gimp_progress_bar_start (const gchar *message, gtk_progress_bar_set_text (GTK_PROGRESS_BAR (bar), message ? message : " "); gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (bar), 0.0); - if (GTK_WIDGET_DRAWABLE (bar)) + if (gtk_widget_is_drawable (GTK_WIDGET (bar))) while (gtk_events_pending ()) gtk_main_iteration (); } @@ -120,7 +122,7 @@ gimp_progress_bar_end (gpointer user_data) gtk_progress_bar_set_text (GTK_PROGRESS_BAR (bar), " "); gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (bar), 0.0); - if (GTK_WIDGET_DRAWABLE (bar)) + if (gtk_widget_is_drawable (GTK_WIDGET (bar))) while (gtk_events_pending ()) gtk_main_iteration (); } @@ -133,7 +135,7 @@ gimp_progress_bar_set_text (const gchar *message, gtk_progress_bar_set_text (GTK_PROGRESS_BAR (bar), message ? message : " "); - if (GTK_WIDGET_DRAWABLE (bar)) + if (gtk_widget_is_drawable (GTK_WIDGET (bar))) while (gtk_events_pending ()) gtk_main_iteration (); } @@ -149,7 +151,7 @@ gimp_progress_bar_set_value (gdouble percentage, else gtk_progress_bar_pulse (GTK_PROGRESS_BAR (bar)); - if (GTK_WIDGET_DRAWABLE (bar)) + if (gtk_widget_is_drawable (GTK_WIDGET (bar))) while (gtk_events_pending ()) gtk_main_iteration (); } @@ -161,7 +163,7 @@ gimp_progress_bar_pulse (gpointer user_data) gtk_progress_bar_pulse (GTK_PROGRESS_BAR (bar)); - if (GTK_WIDGET_DRAWABLE (bar)) + if (gtk_widget_is_drawable (GTK_WIDGET (bar))) while (gtk_events_pending ()) gtk_main_iteration (); } @@ -178,12 +180,12 @@ gimp_window_get_native (GtkWindow *window) #endif #ifdef GDK_WINDOWING_WIN32 - if (window && GTK_WIDGET_REALIZED (window)) + if (window && GTK_WIDGET_REALIZED (GTK_WIDGET (window))) return GDK_WINDOW_HWND (gtk_widget_get_window (GTK_WIDGET (window))); #endif #ifdef GDK_WINDOWING_X11 - if (window && GTK_WIDGET_REALIZED (window)) + if (window && GTK_WIDGET_REALIZED (GTK_WIDGET (window))) return GDK_WINDOW_XID (gtk_widget_get_window (GTK_WIDGET (window))); #endif diff --git a/libgimp/gimpui.c b/libgimp/gimpui.c index c3bfe2c963..874cdde336 100644 --- a/libgimp/gimpui.c +++ b/libgimp/gimpui.c @@ -18,6 +18,8 @@ #include "config.h" +#undef GSEAL_ENABLE + #include #include "libgimpmodule/gimpmodule.h" @@ -290,7 +292,7 @@ gimp_window_set_transient_for (GtkWindow *window, if (! parent) return; - if (GTK_WIDGET_REALIZED (window)) + if (GTK_WIDGET_REALIZED (GTK_WIDGET (window))) gdk_window_set_transient_for (gtk_widget_get_window (GTK_WIDGET (window)), parent); diff --git a/libgimp/gimpzoompreview.c b/libgimp/gimpzoompreview.c index 715eb62037..1a9aebd5fb 100644 --- a/libgimp/gimpzoompreview.c +++ b/libgimp/gimpzoompreview.c @@ -21,6 +21,8 @@ #include "config.h" +#undef GSEAL_ENABLE + #include #include "libgimpwidgets/gimpwidgets.h"