Commit 06b16890 authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer

Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)

2001-07-24  Michael Natterer  <mitch@gimp.org>

	Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)

	* configure.in: require glib/gtk+ >= 1.3.7, commented out the
	gtkxmhtml stuff.

	From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
	to hack or use GIMP HEAD.

	Beware, it crashes randomly :)

	* app/core/Makefile.am
	* app/core/gimpmarshal.list: new file plus rules to generate
	gimpmarshal.[ch] from it.

	* app/core/*
	* app/tools/*
	* app/widgets/*
	* libgimpwidgets/*: started to use the glib object system. All
	core/ objects are still gtk objects however. All signals are
	created using g_signal_new(). There are many gtk+ artefacts left.
	Finally, we will _not_ use the gtk_signal_foo() wrappers and
	friends any more.

	* app/colormaps.c
	* app/devices.[ch]
	* app/disp_callbacks.c
	* app/errorconsole.c
	* app/file-save.[ch]
	* app/interface.c
	* app/module_db.c
	* app/nav_window.c
	* app/ops_buttons.c
	* app/scroll.c
	* app/user_install.c
	* app/gui/about-dialog.c
	* app/gui/brush-editor.c
	* app/gui/brushes-commands.c
	* app/gui/color-notebook.c
	* app/gui/colormap-dialog.c
	* app/gui/dialogs-commands.c
	* app/gui/dialogs-constructors.c
	* app/gui/file-commands.c
	* app/gui/file-dialog-utils.c
	* app/gui/file-new-dialog.c
	* app/gui/file-open-dialog.[ch]
	* app/gui/file-save-dialog.c
	* app/gui/gradient-editor.c
	* app/gui/gradients-commands.c
	* app/gui/image-commands.c
	* app/gui/info-dialog.[ch]
	* app/gui/layer-select.c
	* app/gui/layers-commands.c
	* app/gui/menus.c
	* app/gui/offset-dialog.c
	* app/gui/palette-editor.c
	* app/gui/palettes-commands.c
	* app/gui/patterns-commands.c
	* app/gui/preferences-dialog.c
	* app/gui/resize-dialog.[ch]
	* app/gui/splash.c
	* app/gui/tips-dialog.c
	* app/gui/tool-options-dialog.c
	* app/gui/toolbox.c
	* app/gui/tools-commands.c
	* libgimp/gimpbrushmenu.c
	* libgimp/gimpmenu.c
	* libgimp/gimppatternmenu.c
	* libgimp/gimpui.c
	* libgimpbase/gimpenv.c: tons and tons of changes like "const
	gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
	and currently disables), lots of s/gtk_signal/g_signal/,
	removal/replacement of deprecated stuff,
	s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
	while I was on it, zillions of warnings left...

	* modules/Makefile.am: disabled the water color selector
	temporarily (XInput issues).

	* plug-ins/Makefile.am
	* plug-ins/common/.cvsignore
	* plug-ins/common/Makefile.am
	* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
	which did not build (including Script-Fu). They are trivial to
	fix.
parent ae51fe61
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-23 Sven Neumann <sven@gimp.org>
* plug-ins/common/winclipboard.c
......
......@@ -39,7 +39,7 @@ dialogs_create_toplevel_cmd_callback (GtkWidget *widget,
{
if (action)
{
gchar *identifier;
const gchar *identifier;
identifier = g_quark_to_string ((GQuark) action);
......@@ -55,7 +55,7 @@ dialogs_create_dockable_cmd_callback (GtkWidget *widget,
{
if (action)
{
gchar *identifier;
const gchar *identifier;
identifier = g_quark_to_string ((GQuark) action);
......@@ -75,8 +75,8 @@ dialogs_add_tab_cmd_callback (GtkWidget *widget,
if (dockbook && action)
{
GtkWidget *dockable;
gchar *identifier;
GtkWidget *dockable;
const gchar *identifier;
identifier = g_quark_to_string ((GQuark) action);
......
......@@ -152,8 +152,8 @@ file_save_cmd_callback (GtkWidget *widget,
}
else
{
gchar *raw_filename;
gint status;
const gchar *raw_filename;
gint status;
raw_filename = g_basename (filename);
......
......@@ -96,7 +96,7 @@ gradients_menu_set_sensitivity (GimpContainerEditor *editor)
menus_set_sensitive ("<Gradients>/" menu, (condition) != 0)
SET_SENSITIVE ("Duplicate Gradient",
gradient && GIMP_DATA_CLASS (GTK_OBJECT (gradient)->klass)->duplicate);
gradient && GIMP_DATA_GET_CLASS (gradient)->duplicate);
SET_SENSITIVE ("Edit Gradient...",
gradient && GIMP_DATA_FACTORY_VIEW (editor)->data_edit_func);
SET_SENSITIVE ("Delete Gradient...",
......@@ -162,7 +162,7 @@ gradients_save_as_pov_ok_callback (GtkWidget *widget,
GimpGradient *gradient)
{
GtkFileSelection *filesel;
gchar *filename;
const gchar *filename;
FILE *file;
GimpGradientSegment *seg;
......
......@@ -196,7 +196,7 @@ image_resize_cmd_callback (GtkWidget *widget,
image_resize->gimage = gimage;
image_resize->resize = resize_widget_new (ResizeWidget,
ResizeImage,
GTK_OBJECT (gimage),
G_OBJECT (gimage),
"destroy",
gimage->width,
gimage->height,
......@@ -204,7 +204,7 @@ image_resize_cmd_callback (GtkWidget *widget,
gimage->yresolution,
gimage->unit,
gdisp->dot_for_dot,
image_resize_callback,
G_CALLBACK (image_resize_callback),
NULL,
image_resize);
......@@ -233,7 +233,7 @@ image_scale_cmd_callback (GtkWidget *widget,
image_scale->gimage = gimage;
image_scale->resize = resize_widget_new (ScaleWidget,
ResizeImage,
GTK_OBJECT (gimage),
G_OBJECT (gimage),
"destroy",
gimage->width,
gimage->height,
......@@ -241,7 +241,7 @@ image_scale_cmd_callback (GtkWidget *widget,
gimage->yresolution,
gimage->unit,
gdisp->dot_for_dot,
image_scale_callback,
G_CALLBACK (image_scale_callback),
NULL,
image_scale);
......
......@@ -640,8 +640,6 @@ layers_new_layer_query (GimpImage *gimage)
/* The size sizeentry */
adjustment = gtk_adjustment_new (1, 1, 1, 1, 10, 1);
spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (adjustment), 1, 2);
gtk_spin_button_set_shadow_type (GTK_SPIN_BUTTON (spinbutton),
GTK_SHADOW_NONE);
gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbutton), TRUE);
gtk_widget_set_usize (spinbutton, 75, 0);
......
......@@ -113,7 +113,7 @@ palettes_menu_set_sensitivity (GimpContainerEditor *editor)
menus_set_sensitive ("<Palettes>/" menu, (condition) != 0)
SET_SENSITIVE ("Duplicate Palette",
palette && GIMP_DATA_CLASS (GTK_OBJECT (palette)->klass)->duplicate);
palette && GIMP_DATA_GET_CLASS (palette)->duplicate);
SET_SENSITIVE ("Edit Palette...",
palette && GIMP_DATA_FACTORY_VIEW (editor)->data_edit_func);
SET_SENSITIVE ("Delete Palette...",
......
......@@ -109,7 +109,7 @@ tools_select_cmd_callback (GtkWidget *widget,
/* Complete the initialisation by doing the same stuff
* tools_initialize() does after it did what tools_select() does
*/
if (GIMP_TOOL_CLASS (GTK_OBJECT (active_tool)->klass)->initialize)
if (GIMP_TOOL_GET_CLASS (active_tool)->initialize)
{
gimp_tool_initialize (active_tool, gdisp);
......
......@@ -32,10 +32,10 @@ typedef enum
#define GIMP_TYPE_COLOR_BALANCE_TOOL (gimp_color_balance_tool_get_type ())
#define GIMP_COLOR_BALANCE_TOOL(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_COLOR_BALANCE_TOOL, GimpColorBalanceTool))
#define GIMP_IS_COLOR_BALANCE_TOOL(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_COLOR_BALANCE_TOOL))
#define GIMP_COLOR_BALANCE_TOOL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_COLOR_BALANCE_TOOL, GimpColorBalanceToolClass))
#define GIMP_IS_COLOR_BALANCE_TOOL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_COLOR_BALANCE_TOOL))
#define GIMP_COLOR_BALANCE_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_COLOR_BALANCE_TOOL, GimpColorBalanceTool))
#define GIMP_IS_COLOR_BALANCE_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_COLOR_BALANCE_TOOL))
#define GIMP_COLOR_BALANCE_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_COLOR_BALANCE_TOOL, GimpColorBalanceToolClass))
#define GIMP_IS_COLOR_BALANCE_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_COLOR_BALANCE_TOOL))
typedef struct _GimpColorBalanceTool GimpColorBalanceTool;
......
......@@ -695,14 +695,16 @@ curves_dialog_new (void)
gtk_box_pack_start (GTK_BOX (channel_hbox), label, FALSE, FALSE, 0);
cd->channel_menu = gimp_option_menu_new2
(FALSE, curves_channel_callback,
cd, (gpointer) cd->channel,
(FALSE,
G_CALLBACK (curves_channel_callback),
cd,
GINT_TO_POINTER (cd->channel),
_("Value"), (gpointer) GIMP_HISTOGRAM_VALUE, &channel_items[0],
_("Red"), (gpointer) GIMP_HISTOGRAM_RED, &channel_items[1],
_("Green"), (gpointer) GIMP_HISTOGRAM_GREEN, &channel_items[2],
_("Blue"), (gpointer) GIMP_HISTOGRAM_BLUE, &channel_items[3],
_("Alpha"), (gpointer) GIMP_HISTOGRAM_ALPHA, &channel_items[4],
_("Value"), GINT_TO_POINTER (GIMP_HISTOGRAM_VALUE), &channel_items[0],
_("Red"), GINT_TO_POINTER (GIMP_HISTOGRAM_RED), &channel_items[1],
_("Green"), GINT_TO_POINTER (GIMP_HISTOGRAM_GREEN), &channel_items[2],
_("Blue"), GINT_TO_POINTER (GIMP_HISTOGRAM_BLUE), &channel_items[3],
_("Alpha"), GINT_TO_POINTER (GIMP_HISTOGRAM_ALPHA), &channel_items[4],
NULL);
......@@ -729,9 +731,9 @@ curves_dialog_new (void)
gtk_widget_set_events (cd->yrange, RANGE_MASK);
gtk_container_add (GTK_CONTAINER (frame), cd->yrange);
gtk_signal_connect (GTK_OBJECT (cd->yrange), "event",
GTK_SIGNAL_FUNC (curves_yrange_events),
cd);
g_signal_connect (G_OBJECT (cd->yrange), "event",
G_CALLBACK (curves_yrange_events),
cd);
gtk_widget_show (cd->yrange);
gtk_widget_show (frame);
......@@ -750,9 +752,9 @@ curves_dialog_new (void)
gtk_widget_set_events (cd->graph, GRAPH_MASK);
gtk_container_add (GTK_CONTAINER (frame), cd->graph);
gtk_signal_connect (GTK_OBJECT (cd->graph), "event",
GTK_SIGNAL_FUNC (curves_graph_events),
cd);
g_signal_connect (G_OBJECT (cd->graph), "event",
G_CALLBACK (curves_graph_events),
cd);
gtk_widget_show (cd->graph);
gtk_widget_show (frame);
......@@ -768,9 +770,9 @@ curves_dialog_new (void)
gtk_widget_set_events (cd->xrange, RANGE_MASK);
gtk_container_add (GTK_CONTAINER (frame), cd->xrange);
gtk_signal_connect (GTK_OBJECT (cd->xrange), "event",
GTK_SIGNAL_FUNC (curves_xrange_events),
cd);
g_signal_connect (G_OBJECT (cd->xrange), "event",
G_CALLBACK (curves_xrange_events),
cd);
gtk_widget_show (cd->xrange);
gtk_widget_show (frame);
......@@ -802,9 +804,9 @@ curves_dialog_new (void)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), cd->preview);
gtk_box_pack_end (GTK_BOX (hbox), toggle, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
GTK_SIGNAL_FUNC (curves_preview_update),
cd);
g_signal_connect (G_OBJECT (toggle), "toggled",
G_CALLBACK (curves_preview_update),
cd);
gtk_widget_show (toggle);
gtk_widget_show (hbox);
......@@ -818,19 +820,21 @@ curves_dialog_new (void)
button = gtk_button_new_with_label (_("Load"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (curves_load_callback),
cd->shell);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (curves_load_callback),
cd->shell);
button = gtk_button_new_with_label (_("Save"));
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (curves_save_callback),
cd->shell);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (curves_save_callback),
cd->shell);
gtk_widget_show (hbbox);
gtk_widget_show (vbox);
......@@ -1754,19 +1758,21 @@ file_dialog_create (GtkWidget *parent)
gtk_container_set_border_width (GTK_CONTAINER (file_dlg), 2);
gtk_container_set_border_width (GTK_CONTAINER (GTK_FILE_SELECTION (file_dlg)->button_area), 2);
gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (file_dlg)->cancel_button),
"clicked", GTK_SIGNAL_FUNC (file_dialog_cancel_callback),
NULL);
gtk_signal_connect (GTK_OBJECT (file_dlg), "delete_event",
GTK_SIGNAL_FUNC (file_dialog_cancel_callback),
NULL);
gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (file_dlg)->ok_button),
"clicked", GTK_SIGNAL_FUNC (file_dialog_ok_callback),
NULL);
gtk_signal_connect (GTK_OBJECT (parent), "unmap",
GTK_SIGNAL_FUNC (file_dialog_cancel_callback),
NULL);
g_signal_connect (G_OBJECT (GTK_FILE_SELECTION (file_dlg)->cancel_button),
"clicked",
G_CALLBACK (file_dialog_cancel_callback),
NULL);
g_signal_connect (G_OBJECT (file_dlg), "delete_event",
G_CALLBACK (file_dialog_cancel_callback),
NULL);
g_signal_connect (G_OBJECT (GTK_FILE_SELECTION (file_dlg)->ok_button),
"clicked",
G_CALLBACK (file_dialog_ok_callback),
NULL);
g_signal_connect (G_OBJECT (parent), "unmap",
G_CALLBACK (file_dialog_cancel_callback),
NULL);
temp = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "curves" G_DIR_SEPARATOR_S,
gimp_directory ());
......@@ -1780,8 +1786,8 @@ static void
file_dialog_ok_callback (GtkWidget *widget,
gpointer data)
{
FILE *f;
gchar *filename;
FILE *f;
const gchar *filename;
filename = gtk_file_selection_get_filename (GTK_FILE_SELECTION (file_dlg));
......
......@@ -28,10 +28,10 @@
#define GIMP_TYPE_CURVES_TOOL (gimp_curves_tool_get_type ())
#define GIMP_CURVES_TOOL(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_CURVES_TOOL, GimpCurvesTool))
#define GIMP_IS_CURVES_TOOL(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_CURVES_TOOL))
#define GIMP_CURVES_TOOL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_CURVES_TOOL, GimpCurvesToolClass))
#define GIMP_IS_CURVES_TOOL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_CURVES_TOOL))
#define GIMP_CURVES_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_CURVES_TOOL, GimpCurvesTool))
#define GIMP_IS_CURVES_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_CURVES_TOOL))
#define GIMP_CURVES_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_CURVES_TOOL, GimpCurvesToolClass))
#define GIMP_IS_CURVES_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_CURVES_TOOL))
typedef struct _GimpCurvesTool GimpCurvesTool;
......
......@@ -36,10 +36,10 @@ typedef enum
#define GIMP_TYPE_HUE_SATURATION_TOOL (gimp_hue_saturation_tool_get_type ())
#define GIMP_HUE_SATURATION_TOOL(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_HUE_SATURATION_TOOL, GimpHueSaturationTool))
#define GIMP_IS_HUE_SATURATION_TOOL(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_HUE_SATURATION_TOOL))
#define GIMP_HUE_SATURATION_TOOL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_HUE_SATURATION_TOOL, GimpHueSaturationToolClass))
#define GIMP_IS_HUE_SATURATION_TOOL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_HUE_SATURATION_TOOL))
#define GIMP_HUE_SATURATION_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_HUE_SATURATION_TOOL, GimpHueSaturationTool))
#define GIMP_IS_HUE_SATURATION_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_HUE_SATURATION_TOOL))
#define GIMP_HUE_SATURATION_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_HUE_SATURATION_TOOL, GimpHueSaturationToolClass))
#define GIMP_IS_HUE_SATURATION_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_HUE_SATURATION_TOOL))
typedef struct _GimpHueSaturationTool GimpHueSaturationTool;
......
......@@ -24,10 +24,10 @@
#define GIMP_TYPE_THRESHOLD_TOOL (gimp_threshold_tool_get_type ())
#define GIMP_THRESHOLD_TOOL(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_THRESHOLD_TOOL, GimpThresholdTool))
#define GIMP_IS_THRESHOLD_TOOL(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_THRESHOLD_TOOL))
#define GIMP_THRESHOLD_TOOL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_THRESHOLD_TOOL, GimpThresholdToolClass))
#define GIMP_IS_THRESHOLD_TOOL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_THRESHOLD_TOOL))
#define GIMP_THRESHOLD_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_THRESHOLD_TOOL, GimpThresholdTool))
#define GIMP_IS_THRESHOLD_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_THRESHOLD_TOOL))
#define GIMP_THRESHOLD_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_THRESHOLD_TOOL, GimpThresholdToolClass))
#define GIMP_IS_THRESHOLD_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_THRESHOLD_TOOL))
typedef struct _GimpThresholdTool GimpThresholdTool;
......
......@@ -74,7 +74,6 @@ get_standard_colormaps (void)
g_visual = gdk_rgb_get_visual ();
g_cmap = gdk_rgb_get_cmap ();
gtk_widget_set_default_visual (g_visual);
gtk_widget_set_default_colormap (g_cmap);
set_app_colors ();
......
......@@ -4,3 +4,4 @@ Makefile.in
.libs
*.lo
libappcore.la
stamp-gimpmarshal.h
## Process this file with automake to produce Makefile.in
AM_CPPFLAGS = @STRIP_BEGIN@ \
-DG_LOG_DOMAIN=\"Gimp-Core\" \
@GIMP_THREAD_FLAGS@ \
@GIMP_MP_FLAGS@ \
@STRIP_END@
INCLUDES = @STRIP_BEGIN@ \
-I$(top_srcdir) \
-I$(top_srcdir)/app \
$(GTK_CFLAGS) \
-I$(includedir) \
@STRIP_END@
noinst_LIBRARIES = libappcore.a
libappcore_a_SOURCES = @STRIP_BEGIN@ \
libappcore_a_sources = @STRIP_BEGIN@ \
core-types.h \
gimp.c \
gimp.h \
......@@ -72,8 +85,6 @@ libappcore_a_SOURCES = @STRIP_BEGIN@ \
gimplayermask.h \
gimplist.c \
gimplist.h \
gimpmarshal.c \
gimpmarshal.h \
gimpobject.c \
gimpobject.h \
gimppattern.c \
......@@ -103,22 +114,45 @@ libappcore_a_SOURCES = @STRIP_BEGIN@ \
gimpviewable.h \
@STRIP_END@
EXTRS_DIST = \
makefile.msc
AM_CPPFLAGS = @STRIP_BEGIN@ \
-DG_LOG_DOMAIN=\"Gimp-Core\" \
@GIMP_THREAD_FLAGS@ \
@GIMP_MP_FLAGS@ \
libappcore_a_built_sources = @STRIP_BEGIN@ \
stamp-gimpmarshal.h \
gimpmarshal.c \
gimpmarshal.h \
@STRIP_END@
INCLUDES = @STRIP_BEGIN@ \
-I$(top_srcdir) \
-I$(top_srcdir)/app \
$(GTK_CFLAGS) \
-I$(includedir) \
libappcore_a_extra_sources = @STRIP_BEGIN@ \
gimpmarshal.list \
@STRIP_END@
libappcore_a_SOURCES = $(libappcore_a_built_sources) $(libappcore_a_sources)
EXTRS_DIST = \
makefile.msc \
$(libappcore_a_extra_sources)
#
# rules to generate built sources
#
# setup autogeneration dependancies
gen_sources = xgen-gmh xgen-gmc
CLEANFILES += $(gen_sources)
$(srcdir)/stamp-gimpmarshal.h: gimpmarshal.list gimpmarshal.h
echo "#ifndef __GIMP_MARSHAL_H__" > xgen-gmh \
&& echo "#define __GIMP_MARSHAL_H__" >> xgen-gmh \
&& glib-genmarshal --nostdinc --prefix=gimp_cclosure_marshal $(srcdir)/gimpmarshal.list --header >> xgen-gmh \
&& echo "#endif /* __GIMP_MARSHAL_H__ */" >> xgen-gmh \
&& (cmp -s xgen-gmh $(srcdir)/gimpmarshal.h || cp xgen-gmh $(srcdir)/gimpmarshal.h) \
&& rm -f xgen-gmh xgen-gmh~ \
&& echo timestamp > $@
$(srcdir)/gimpmarshal.c: $(srcdir)/stamp-gimpmarshal.h
echo "#include <glib.h>" > xgen-gmc \
&& echo "#include <glib-object.h>" >> xgen-gmc \
&& echo "#include \"gimpmarshal.h\"" >> xgen-gmc \
&& glib-genmarshal --nostdinc --prefix=gimp_cclosure_marshal $(srcdir)/gimpmarshal.list --body >> xgen-gmc \
&& cp xgen-gmc $(srcdir)/gimpmarshal.c \
&& rm -f xgen-gmc xgen-gmc~
.PHONY: files
files:
......
......@@ -136,14 +136,16 @@ static void gimp_transform_tool_draw (GimpDrawTool *draw_too
static TranInfo old_trans_info;
InfoDialog *transform_info = NULL;
static gboolean transform_info_inited = FALSE;
static GimpDrawToolClass *parent_class = NULL;
static guint gimp_transform_tool_signals[LAST_SIGNAL] = { 0 };
static GimpDrawToolClass *parent_class = NULL;
GtkType
static guint gimp_transform_tool_signals[LAST_SIGNAL] = { 0 };
GType
gimp_transform_tool_get_type (void)
{
static GtkType tool_type = 0;
static GType tool_type = 0;
if (! tool_type)
{
......@@ -176,21 +178,18 @@ gimp_transform_tool_class_init (GimpTransformToolClass *klass)
tool_class = (GimpToolClass *) klass;
draw_class = (GimpDrawToolClass *) klass;
parent_class = gtk_type_class (GIMP_TYPE_DRAW_TOOL);
parent_class = g_type_class_peek_parent (klass);
gimp_transform_tool_signals[TRANSFORM] =
gtk_signal_new ("transform",
GTK_RUN_LAST,
object_class->type,
GTK_SIGNAL_OFFSET (GimpTransformToolClass,