Commit 334911e2 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

require GTK+-1.3.8 and PangoFT2-0.19.

2001-09-19  Sven Neumann  <sven@gimp.org>

	* configure.in: require GTK+-1.3.8 and PangoFT2-0.19.

	* app/devices.c:
	* app/tools/gimppainttool.c: removed intermediate hacks that are no
	longer needed with the new GTK+ release.

	* app/plug_in.c
	* libgimp/gimp.[ch]
	* libgimp/gimpui.c
	* libgimpbase/gimpprotocol.[ch]: removed use_xshm and color_cube
	variables and accessor functions.

	* app/errors.c: use gtk_exit() instead of gdk_exit().

	* app/gdisplay.c: use Pango API to determine cursor label width. This
	does not work correctly, but at least it compiles...

	* app/gui/splash.c: follow Pango API changes.

	* app/tools/gimpcurvestool.[ch]: use PangoLayouts to draw text.

	* app/tools/gimptexttool.c: follow Pango API changes.

	* app/widgets/gimpfontselection-dialog.c
	* app/widgets/gimpfontselection.c: mostly rewritten following the
	changes in GtkFontSelection. This is unusable at the moment and
	crashes, but at least it compiles again...

	* plug-ins/Makefile.am: temporarily disabled build of ifscompose since
	it does not compile any longer after the latest GDK cleanups.

	* plug-ins/common/nlfilt.c: gimp_color_cube() is obsolete.
parent 48d7a679
2001-09-19 Sven Neumann <sven@gimp.org>
* configure.in: require GTK+-1.3.8 and PangoFT2-0.19.
* app/devices.c:
* app/tools/gimppainttool.c: removed intermediate hacks that are no
longer needed with the new GTK+ release.
* app/plug_in.c
* libgimp/gimp.[ch]
* libgimp/gimpui.c
* libgimpbase/gimpprotocol.[ch]: removed use_xshm and color_cube
variables and accessor functions.
* app/errors.c: use gtk_exit() instead of gdk_exit().
* app/gdisplay.c: use Pango API to determine cursor label width. This
does not work correctly, but at least it compiles...
* app/gui/splash.c: follow Pango API changes.
* app/tools/gimpcurvestool.[ch]: use PangoLayouts to draw text.
* app/tools/gimptexttool.c: follow Pango API changes.
* app/widgets/gimpfontselection-dialog.c
* app/widgets/gimpfontselection.c: mostly rewritten following the
changes in GtkFontSelection. This is unusable at the moment and
crashes, but at least it compiles again...
* plug-ins/Makefile.am: temporarily disabled build of ifscompose since
it does not compile any longer after the latest GDK cleanups.
* plug-ins/common/nlfilt.c: gimp_color_cube() is obsolete.
2001-09-18 Sven Neumann <sven@gimp.org>
* app/pdb/parasite_cmds.c
......
......@@ -324,7 +324,8 @@ plug_in_init (void)
plug_in_init_shm ();
/* search for binaries in the plug-in directory path */
gimp_datafiles_read_directories (the_gimp->config->plug_in_path, MODE_EXECUTABLE,
gimp_datafiles_read_directories (the_gimp->config->plug_in_path,
MODE_EXECUTABLE,
plug_in_init_file, NULL);
/* read the pluginrc file for cached data */
......@@ -1328,14 +1329,10 @@ plug_in_run (ProcRecord *proc_rec,
config.shm_ID = shm_ID;
config.gamma = gimprc.gamma_val;
config.install_cmap = gimprc.install_cmap;
config.use_xshm = gdk_get_use_xshm ();
config.unused = 0;
config.min_colors = CLAMP (gimprc.min_colors, 27, 256);
config.gdisp_ID = gdisp_ID;
if (gtk_check_version (1, 2, 8))
config.min_colors = CLAMP (gimprc.min_colors, 27, 216);
else
config.min_colors = CLAMP (gimprc.min_colors, 27, 256);
proc_run.name = proc_rec->name;
proc_run.nparams = argc;
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
......
......@@ -22,12 +22,6 @@
#include <stdlib.h>
#include <string.h>
#ifdef __GNUC__
#warning FIXME: GDK_DISABLE_DEPRECATED
#endif
#undef GDK_DISABLE_DEPRECATED
#include <gtk/gtk.h>
#include "libgimpmath/gimpmath.h"
......@@ -614,10 +608,21 @@ curves_free (void)
curves_dialog->image_map = NULL;
}
gtk_widget_destroy (curves_dialog->shell);
if (curves_dialog->pixmap)
gdk_drawable_unref (curves_dialog->pixmap);
gtk_widget_destroy (curves_dialog->shell);
if (curves_dialog->cursor_layout)
g_object_unref (curves_dialog->cursor_layout);
if (curves_dialog->xpos_layout)
g_object_unref (curves_dialog->xpos_layout);
if (curves_dialog->lut)
gimp_lut_free (curves_dialog->lut);
g_free (curves_dialog);
curves_dialog = NULL;
}
}
......@@ -641,11 +646,11 @@ curves_dialog_new (void)
gint i, j;
cd = g_new (CurvesDialog, 1);
cd->cursor_ind_height = -1;
cd->cursor_ind_width = -1;
cd->preview = TRUE;
cd->pixmap = NULL;
cd->channel = GIMP_HISTOGRAM_VALUE;
cd->preview = TRUE;
cd->pixmap = NULL;
cd->xpos_layout = NULL;
cd->cursor_layout = NULL;
cd->channel = GIMP_HISTOGRAM_VALUE;
for (i = 0; i < 5; i++)
cd->curve_type[i] = SMOOTH;
......@@ -838,48 +843,40 @@ curve_print_loc (CurvesDialog *cd,
gint ypos)
{
gchar buf[32];
gint width;
gint ascent;
gint descent;
if (cd->cursor_ind_width < 0)
if (!cd->cursor_layout)
{
/* Calc max extents */
gdk_string_extents (cd->graph->style->font,
"x:888 y:888",
NULL,
NULL,
&width,
&ascent,
&descent);
cd->cursor_ind_width = width;
cd->cursor_ind_height = ascent + descent;
cd->cursor_ind_ascent = ascent;
cd->cursor_layout = gtk_widget_create_pango_layout (cd->graph,
"x:888 y:888");
pango_layout_get_pixel_extents (cd->cursor_layout,
NULL, &cd->cursor_rect);
}
if (xpos >= 0 && xpos <= 255 && ypos >=0 && ypos <= 255)
{
g_snprintf (buf, sizeof (buf), "x:%d y:%d",xpos,ypos);
gdk_draw_rectangle (cd->graph->window,
cd->graph->style->bg_gc[GTK_STATE_ACTIVE],
TRUE, RADIUS*2 + 2 , RADIUS*2 + 2,
cd->cursor_ind_width+4,
cd->cursor_ind_height+5);
TRUE,
RADIUS*2 + 2,
RADIUS*2 + 2,
cd->cursor_rect.width + 4,
cd->cursor_rect.height + 5);
gdk_draw_rectangle (cd->graph->window,
cd->graph->style->black_gc,
FALSE, RADIUS*2 + 2 , RADIUS*2 + 2,
cd->cursor_ind_width+3,
cd->cursor_ind_height+4);
gdk_draw_string (cd->graph->window,
cd->graph->style->font,
cd->graph->style->black_gc,
RADIUS*2 + 4,
RADIUS*2 + 5 + cd->cursor_ind_ascent,
buf);
FALSE,
RADIUS*2 + 2,
RADIUS*2 + 2,
cd->cursor_rect.width + 3,
cd->cursor_rect.height + 4);
g_snprintf (buf, sizeof (buf), "x:%3d y:%3d",xpos, ypos);
pango_layout_set_text (cd->cursor_layout, buf, 11);
gdk_draw_layout (cd->graph->window,
cd->graph->style->black_gc,
RADIUS*2 + 4 + cd->cursor_rect.x,
RADIUS*2 + 5 + cd->cursor_rect.y,
cd->cursor_layout);
}
}
......@@ -892,6 +889,7 @@ curves_update (CurvesDialog *cd,
gint i, j;
gchar buf[32];
gint offset;
gint height;
gint sel_channel;
if(cd->color) {
......@@ -903,7 +901,6 @@ curves_update (CurvesDialog *cd,
sel_channel = GIMP_HISTOGRAM_VALUE;
}
if (update & XRANGE_TOP)
{
guchar buf[XRANGE_WIDTH * 3];
......@@ -1064,26 +1061,34 @@ curves_update (CurvesDialog *cd,
/* and xpos indicator */
g_snprintf (buf, sizeof (buf), "x:%d",cd->col_value[sel_channel]);
if (!cd->xpos_layout)
cd->xpos_layout = gtk_widget_create_pango_layout (cd->graph, buf);
else
pango_layout_set_text (cd->xpos_layout, buf, -1);
if ((cd->col_value[sel_channel]+RADIUS) < 127)
{
offset = RADIUS + 4;
}
else
{
offset = - gdk_string_width (cd->graph->style->font,buf) - 2;
pango_layout_get_pixel_size (cd->xpos_layout, &offset, &height);
offset = - (offset + 2);
}
gdk_draw_string (cd->pixmap,
cd->graph->style->font,
gdk_draw_layout (cd->pixmap,
cd->graph->style->black_gc,
cd->col_value[sel_channel]+offset,
GRAPH_HEIGHT,
buf);
gdk_draw_drawable (cd->graph->window, cd->graph->style->black_gc, cd->pixmap,
0, 0, 0, 0, GRAPH_WIDTH + RADIUS * 2, GRAPH_HEIGHT + RADIUS * 2);
cd->col_value[sel_channel] + offset,
GRAPH_HEIGHT - height - 2,
cd->xpos_layout);
gdk_draw_drawable (cd->graph->window,
cd->graph->style->black_gc,
cd->pixmap,
0, 0,
0, 0,
GRAPH_WIDTH + RADIUS * 2, GRAPH_HEIGHT + RADIUS * 2);
}
}
......
......@@ -52,36 +52,36 @@ typedef struct _CurvesDialog CurvesDialog;
struct _CurvesDialog
{
GtkWidget *shell;
GtkWidget *channel_menu;
GtkWidget *xrange;
GtkWidget *yrange;
GtkWidget *graph;
GdkPixmap *pixmap;
GtkWidget *curve_type_menu;
GimpDrawable *drawable;
ImageMap *image_map;
gint color;
gint channel;
gboolean preview;
gint grab_point;
gint last;
gint leftmost;
gint rightmost;
gint curve_type[5];
gint points[5][17][2];
guchar curve[5][256];
gint col_value[5];
gint cursor_ind_height;
gint cursor_ind_width;
gint cursor_ind_ascent;
GimpLut *lut;
GtkWidget *shell;
GtkWidget *channel_menu;
GtkWidget *xrange;
GtkWidget *yrange;
GtkWidget *graph;
GdkPixmap *pixmap;
GtkWidget *curve_type_menu;
PangoLayout *xpos_layout;
PangoLayout *cursor_layout;
PangoRectangle cursor_rect;
GimpDrawable *drawable;
ImageMap *image_map;
gint color;
gint channel;
gboolean preview;
gint grab_point;
gint last;
gint leftmost;
gint rightmost;
gint curve_type[5];
gint points[5][17][2];
guchar curve[5][256];
gint col_value[5];
GimpLut *lut;
};
......
......@@ -21,12 +21,6 @@
#include <stdlib.h>
#include <string.h>
#ifdef __GNUC__
#warning FIXME: GDK_DISABLE_DEPRECATED
#endif
#undef GDK_DISABLE_DEPRECATED
#include <gtk/gtk.h>
#include "libgimpmath/gimpmath.h"
......@@ -1459,10 +1453,11 @@ gdisplay_set_dot_for_dot (GDisplay *gdisp,
}
/* Set a proper size for the coordinates display in the statusbar. */
void
gdisplay_resize_cursor_label (GDisplay *gdisp)
{
/* Set a proper size for the coordinates display in the statusbar. */
PangoLayout *layout;
gchar buffer[CURSOR_STR_LENGTH];
gint cursor_label_width;
gint label_frame_size_difference;
......@@ -1492,22 +1487,27 @@ gdisplay_resize_cursor_label (GDisplay *gdisp)
(gdouble) gdisp->gimage->height * unit_factor /
gdisp->gimage->yresolution);
}
cursor_label_width =
gdk_string_width (gtk_widget_get_style (gdisp->cursor_label)->font, buffer);
/* find out how many pixels the label's parent frame is bigger than
* the label itself
*/
label_frame_size_difference =
gdisp->cursor_label->parent->allocation.width -
gdisp->cursor_label->allocation.width;
gtk_widget_set_usize (gdisp->cursor_label, cursor_label_width, -1);
/* don't resize if this is a new display */
if (label_frame_size_difference)
gtk_widget_set_usize (gdisp->cursor_label->parent,
cursor_label_width + label_frame_size_difference, -1);
layout = GTK_LABEL (gdisp->cursor_label)->layout;
if (layout)
{
pango_layout_set_text (layout, buffer, -1);
pango_layout_get_pixel_size (layout, &cursor_label_width, NULL);
/* find out how many pixels the label's parent frame is bigger than
* the label itself
*/
label_frame_size_difference =
gdisp->cursor_label->parent->allocation.width -
gdisp->cursor_label->allocation.width;
gtk_widget_set_usize (gdisp->cursor_label, cursor_label_width, -1);
/* don't resize if this is a new display */
if (label_frame_size_difference)
gtk_widget_set_usize (gdisp->cursor_label->parent,
cursor_label_width + label_frame_size_difference, -1);
}
gdisplay_update_cursor (gdisp, gdisp->cursor_x, gdisp->cursor_y);
}
......
......@@ -244,12 +244,7 @@ devices_init (void)
DeviceInfo *device_info;
GList *list;
#warning FIXME: remove this hack when GTK+-1.3.8 is released
#ifdef gdk_core_pointer
current_device = gdk_core_pointer;
#else
current_device = gdk_device_get_core_pointer ();
#endif
/* create device info structures for present devices */
for (list = gdk_devices_list (); list; list = g_list_next (list))
......
......@@ -21,12 +21,6 @@
#include <stdlib.h>
#include <string.h>
#ifdef __GNUC__
#warning FIXME: GDK_DISABLE_DEPRECATED
#endif
#undef GDK_DISABLE_DEPRECATED
#include <gtk/gtk.h>
#include "libgimpmath/gimpmath.h"
......@@ -1459,10 +1453,11 @@ gdisplay_set_dot_for_dot (GDisplay *gdisp,
}
/* Set a proper size for the coordinates display in the statusbar. */
void
gdisplay_resize_cursor_label (GDisplay *gdisp)
{
/* Set a proper size for the coordinates display in the statusbar. */
PangoLayout *layout;
gchar buffer[CURSOR_STR_LENGTH];
gint cursor_label_width;
gint label_frame_size_difference;
......@@ -1492,22 +1487,27 @@ gdisplay_resize_cursor_label (GDisplay *gdisp)
(gdouble) gdisp->gimage->height * unit_factor /
gdisp->gimage->yresolution);
}
cursor_label_width =
gdk_string_width (gtk_widget_get_style (gdisp->cursor_label)->font, buffer);
/* find out how many pixels the label's parent frame is bigger than
* the label itself
*/
label_frame_size_difference =
gdisp->cursor_label->parent->allocation.width -
gdisp->cursor_label->allocation.width;
gtk_widget_set_usize (gdisp->cursor_label, cursor_label_width, -1);
/* don't resize if this is a new display */
if (label_frame_size_difference)
gtk_widget_set_usize (gdisp->cursor_label->parent,
cursor_label_width + label_frame_size_difference, -1);
layout = GTK_LABEL (gdisp->cursor_label)->layout;
if (layout)
{
pango_layout_set_text (layout, buffer, -1);
pango_layout_get_pixel_size (layout, &cursor_label_width, NULL);
/* find out how many pixels the label's parent frame is bigger than
* the label itself
*/
label_frame_size_difference =
gdisp->cursor_label->parent->allocation.width -
gdisp->cursor_label->allocation.width;
gtk_widget_set_usize (gdisp->cursor_label, cursor_label_width, -1);
/* don't resize if this is a new display */
if (label_frame_size_difference)
gtk_widget_set_usize (gdisp->cursor_label->parent,
cursor_label_width + label_frame_size_difference, -1);
}
gdisplay_update_cursor (gdisp, gdisp->cursor_x, gdisp->cursor_y);
}
......
......@@ -135,7 +135,7 @@ gimp_fatal_error (const gchar *fmt, ...)
#endif /* ! G_OS_WIN32 */
gdk_exit (1);
gtk_exit (1);
}
void
......@@ -192,5 +192,5 @@ gimp_terminate (const gchar *fmt, ...)
#endif /* ! G_OS_WIN32 */
gdk_exit (1);
gtk_exit (1);
}
......@@ -21,12 +21,6 @@
#include <stdlib.h>
#include <string.h>
#ifdef __GNUC__
#warning FIXME: GDK_DISABLE_DEPRECATED
#endif
#undef GDK_DISABLE_DEPRECATED
#include <gtk/gtk.h>
#include "libgimpmath/gimpmath.h"
......@@ -1459,10 +1453,11 @@ gdisplay_set_dot_for_dot (GDisplay *gdisp,
}
/* Set a proper size for the coordinates display in the statusbar. */
void
gdisplay_resize_cursor_label (GDisplay *gdisp)
{
/* Set a proper size for the coordinates display in the statusbar. */
PangoLayout *layout;
gchar buffer[CURSOR_STR_LENGTH];
gint cursor_label_width;
gint label_frame_size_difference;
......@@ -1492,22 +1487,27 @@ gdisplay_resize_cursor_label (GDisplay *gdisp)
(gdouble) gdisp->gimage->height * unit_factor /
gdisp->gimage->yresolution);
}
cursor_label_width =
gdk_string_width (gtk_widget_get_style (gdisp->cursor_label)->font, buffer);
/* find out how many pixels the label's parent frame is bigger than
* the label itself
*/
label_frame_size_difference =
gdisp->cursor_label->parent->allocation.width -
gdisp->cursor_label->allocation.width;
gtk_widget_set_usize (gdisp->cursor_label, cursor_label_width, -1);
/* don't resize if this is a new display */
if (label_frame_size_difference)
gtk_widget_set_usize (gdisp->cursor_label->parent,
cursor_label_width + label_frame_size_difference, -1);
layout = GTK_LABEL (gdisp->cursor_label)->layout;
if (layout)
{
pango_layout_set_text (layout, buffer, -1);
pango_layout_get_pixel_size (layout, &cursor_label_width, NULL);
/* find out how many pixels the label's parent frame is bigger than
* the label itself
*/
label_frame_size_difference =
gdisp->cursor_label->parent->allocation.width -
gdisp->cursor_label->allocation.width;
gtk_widget_set_usize (gdisp->cursor_label, cursor_label_width, -1);
/* don't resize if this is a new display */
if (label_frame_size_difference)
gtk_widget_set_usize (gdisp->cursor_label->parent,
cursor_label_width + label_frame_size_difference, -1);
}
gdisplay_update_cursor (gdisp, gdisp->cursor_x, gdisp->cursor_y);
}
......
......@@ -244,12 +244,7 @@ devices_init (void)
DeviceInfo *device_info;
GList *list;
#warning FIXME: remove this hack when GTK+-1.3.8 is released
#ifdef gdk_core_pointer
current_device = gdk_core_pointer;
#else
current_device = gdk_device_get_core_pointer ();
#endif
/* create device info structures for present devices */
for (list = gdk_devices_list (); list; list = g_list_next (list))
......
......@@ -244,12 +244,7 @@ devices_init (void)
DeviceInfo *device_info;
GList *list;
#warning FIXME: remove this hack when GTK+-1.3.8 is released
#ifdef gdk_core_pointer
current_device = gdk_core_pointer;
#else
current_device = gdk_device_get_core_pointer ();
#endif
/* create device info structures for present devices */
for (list = gdk_devices_list (); list; list = g_list_next (list))
......
......@@ -324,7 +324,8 @@ plug_in_init (void)
plug_in_init_shm ();
/* search for binaries in the plug-in directory path */
gimp_datafiles_read_directories (the_gimp->config->plug_in_path, MODE_EXECUTABLE,
gimp_datafiles_read_directories (the_gimp->config->plug_in_path,
MODE_EXECUTABLE,
plug_in_init_file, NULL);
/* read the pluginrc file for cached data */
......@@ -1328,14 +1329,10 @@ plug_in_run (ProcRecord *proc_rec,
config.shm_ID = shm_ID;
config.gamma = gimprc.gamma_val;
config.install_cmap = gimprc.install_cmap;
config.use_xshm = gdk_get_use_xshm ();
config.unused = 0;
config.min_colors = CLAMP (gimprc.min_colors, 27, 256);
config.gdisp_ID = gdisp_ID;
if (gtk_check_version (1, 2, 8))
config.min_colors = CLAMP (gimprc.min_colors, 27, 216);
else
config.min_colors = CLAMP (gimprc.min_colors, 27, 256);
proc_run.name = proc_rec->name;
proc_run.nparams = argc;
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
......
......@@ -324,7 +324,8 @@ plug_in_init (void)
plug_in_init_shm ();
/* search for binaries in the plug-in directory path */
gimp_datafiles_read_directories (the_gimp->config->plug_in_path, MODE_EXECUTABLE,
gimp_datafiles_read_directories (the_gimp->config->plug_in_path,
MODE_EXECUTABLE,
plug_in_init_file, NULL);
/* read the pluginrc file for cached data */
......@@ -1328,14 +1329,10 @@ plug_in_run (ProcRecord *proc_rec,
config.shm_ID = shm_ID;
config.gamma = gimprc.gamma_val;
config.install_cmap = gimprc.install_cmap;
config.use_xshm = gdk_get_use_xshm ();
config.unused = 0;
config.min_colors = CLAMP (gimprc.min_colors, 27, 256);
config.gdisp_ID = gdisp_ID;
if (gtk_check_version (1, 2, 8))
config.min_colors = CLAMP (gimprc.min_colors, 27, 216);
else
config.min_colors = CLAMP (gimprc.min_colors, 27, 256);
proc_run.name = proc_rec->name;
proc_run.nparams = argc;
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
......
......@@ -78,8 +78,9 @@ splash_create (void)
{
GtkWidget *vbox;
GtkWidget *logo_hbox;
PangoFontMetrics metrics;
PangoFontMetrics *metrics;
PangoContext *context;
gint char_width;
win_initstatus = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_type_hint (GTK_WINDOW (win_initstatus),
......@@ -137,12 +138,14 @@ splash_create (void)
* the default_font
*/
context = gtk_widget_get_pango_context (label2);
pango_context_get_metrics (context,
label2->style->font_desc,
pango_context_get_language (context),
&metrics);
metrics = pango_context_get_metrics (context,
label2->style->font_desc,
pango_context_get_language (context));
char_width = pango_font_metrics_get_approximate_char_width (metrics);
pango_font_metrics_unref (metrics);
max_label_length = (0.9 * (gdouble) logo_area_width /
(gdouble) PANGO_PIXELS (metrics.approximate_char_width));
(gdouble) PANGO_PIXELS (char_width));
logo_layout = gtk_widget_create_pango_layout (logo_area, NULL);
g_object_weak_ref (G_OBJECT (win_initstatus),
......
......@@ -324,7 +324,8 @@ plug_in_init (void)
plug_in_init_shm ();
/* search for binaries in the plug-in directory path */
gimp_datafiles_read_directories (the_gimp->config->plug_in_path, MODE_EXECUTABLE,
gimp_datafiles_read_directories (the_gimp->config->plug_in_path,
MODE_EXECUTABLE,
plug_in_init_file, NULL);
/* read the pluginrc file for cached data */
......@@ -1328,14 +1329,10 @@ plug_in_run (ProcRecord *proc_rec,
config.shm_ID = shm_ID;
config.gamma = gimprc.gamma_val;
config.install_cmap = gimprc.install_cmap;
config.use_xshm = gdk_get_use_xshm ();
config.unused = 0;
config.min_colors = CLAMP (gimprc.min_colors, 27, 256);
config.gdisp_ID = gdisp_ID;
if (gtk_check_version (1, 2, 8))
config.min_colors = CLAMP (gimprc.min_colors, 27, 216);
else
config.min_colors = CLAMP (gimprc.min_colors, 27, 256);
proc_run.name = proc_rec->name;
proc_run.nparams = argc;
proc_run.params = plug_in_args_to_params (args, argc, FALSE);
......
......@@ -1326,12 +1326,7 @@ gimp_paint_tool_calculate_brush_size (MaskBuf *mask,
{
scale = CLAMP (scale, 0.0, 1.0);
#warning FIXME: remove this hack when GTK+-1.3.8 is released
#ifdef gdk_core_pointer
if (current_device == gdk_core_pointer)
#else
if (current_device == gdk_device_get_core_pointer ())
#endif
{
*width = mask->width;
*height = mask->height;
......@@ -1651,12 +1646,7 @@ gimp_paint_tool_get_brush_mask (GimpPaintTool *paint_tool,
{
MaskBuf *mask;
#warning FIXME: remove this hack when GTK+-1.3.8 is released
#ifdef gdk_core_pointer
if (current_device == gdk_core_pointer)
#else
if (current_device == gdk_device_get_core_pointer ())
#endif
mask = paint_tool->brush->mask;
else
mask = gimp_paint_tool_scale_mask (paint_tool->brush->mask, scale);
......
......@@ -324,7 +324,8 @@ plug_in_init (void)
plug_in_init_shm ();