Build with GSEAL_ENABLE and #undef it where accessors are missing

This commit is contained in:
Michael Natterer 2009-10-17 18:55:14 +02:00
parent fcd346a227
commit 8cee9c66a7
5 changed files with 24 additions and 15 deletions

View File

@ -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,

View File

@ -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,

View File

@ -21,6 +21,8 @@
#include "config.h"
#undef GSEAL_ENABLE
#include <gtk/gtk.h>
#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

View File

@ -18,6 +18,8 @@
#include "config.h"
#undef GSEAL_ENABLE
#include <gtk/gtk.h>
#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);

View File

@ -21,6 +21,8 @@
#include "config.h"
#undef GSEAL_ENABLE
#include <gtk/gtk.h>
#include "libgimpwidgets/gimpwidgets.h"