Commit 503a9ceb authored by Michael Natterer's avatar Michael Natterer 😴

app: implement GObject::constructed() instead of ::constructor()

parent c1b35756
......@@ -55,14 +55,12 @@
/* local function prototypes */
static GObject * gimp_align_tool_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_align_tool_constructed (GObject *object);
static void gimp_align_tool_finalize (GObject *object);
static gboolean gimp_align_tool_initialize (GimpTool *tool,
GimpDisplay *display,
GError **error);
static void gimp_align_tool_finalize (GObject *object);
static void gimp_align_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *display);
......@@ -148,7 +146,7 @@ gimp_align_tool_class_init (GimpAlignToolClass *klass)
GimpDrawToolClass *draw_tool_class = GIMP_DRAW_TOOL_CLASS (klass);
object_class->finalize = gimp_align_tool_finalize;
object_class->constructor = gimp_align_tool_constructor;
object_class->constructed = gimp_align_tool_constructed;
tool_class->initialize = gimp_align_tool_initialize;
tool_class->control = gimp_align_tool_control;
......@@ -182,22 +180,16 @@ gimp_align_tool_init (GimpAlignTool *align_tool)
gimp_tool_control_set_tool_cursor (tool->control, GIMP_TOOL_CURSOR_MOVE);
}
static GObject *
gimp_align_tool_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_align_tool_constructed (GObject *object)
{
GObject *object;
GimpTool *tool;
GimpAlignTool *align_tool;
GimpTool *tool = GIMP_TOOL (object);
GimpAlignTool *align_tool = GIMP_ALIGN_TOOL (object);
GObject *options = G_OBJECT (gimp_tool_get_options (tool));
GtkContainer *container;
GObject *options;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
tool = GIMP_TOOL (object);
align_tool = GIMP_ALIGN_TOOL (object);
options = G_OBJECT (gimp_tool_get_options (tool));
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
/* This line of code is evil because it relies on that the 'options'
* object is fully constructed before we get here, which is not
......@@ -211,8 +203,6 @@ gimp_align_tool_constructor (GType type,
gtk_container_add (container, align_tool->controls);
gtk_widget_show (align_tool->controls);
}
return object;
}
static void
......
......@@ -43,42 +43,40 @@
#include "gimptoolcontrol.h"
static GObject * gimp_brush_tool_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_brush_tool_motion (GimpTool *tool,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display);
static void gimp_brush_tool_oper_update (GimpTool *tool,
const GimpCoords *coords,
GdkModifierType state,
gboolean proximity,
GimpDisplay *display);
static void gimp_brush_tool_cursor_update (GimpTool *tool,
const GimpCoords *coords,
GdkModifierType state,
GimpDisplay *display);
static void gimp_brush_tool_options_notify (GimpTool *tool,
GimpToolOptions *options,
const GParamSpec *pspec);
static void gimp_brush_tool_draw (GimpDrawTool *draw_tool);
static void gimp_brush_tool_brush_changed (GimpContext *context,
GimpBrush *brush,
GimpBrushTool *brush_tool);
static void gimp_brush_tool_set_brush (GimpBrushCore *brush_core,
GimpBrush *brush,
GimpBrushTool *brush_tool);
static void gimp_brush_tool_set_brush_after (GimpBrushCore *brush_core,
GimpBrush *brush,
GimpBrushTool *brush_tool);
static void gimp_brush_tool_notify_brush (GimpDisplayConfig *config,
GParamSpec *pspec,
GimpBrushTool *brush_tool);
static void gimp_brush_tool_constructed (GObject *object);
static void gimp_brush_tool_motion (GimpTool *tool,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpDisplay *display);
static void gimp_brush_tool_oper_update (GimpTool *tool,
const GimpCoords *coords,
GdkModifierType state,
gboolean proximity,
GimpDisplay *display);
static void gimp_brush_tool_cursor_update (GimpTool *tool,
const GimpCoords *coords,
GdkModifierType state,
GimpDisplay *display);
static void gimp_brush_tool_options_notify (GimpTool *tool,
GimpToolOptions *options,
const GParamSpec *pspec);
static void gimp_brush_tool_draw (GimpDrawTool *draw_tool);
static void gimp_brush_tool_brush_changed (GimpContext *context,
GimpBrush *brush,
GimpBrushTool *brush_tool);
static void gimp_brush_tool_set_brush (GimpBrushCore *brush_core,
GimpBrush *brush,
GimpBrushTool *brush_tool);
static void gimp_brush_tool_set_brush_after (GimpBrushCore *brush_core,
GimpBrush *brush,
GimpBrushTool *brush_tool);
static void gimp_brush_tool_notify_brush (GimpDisplayConfig *config,
GParamSpec *pspec,
GimpBrushTool *brush_tool);
G_DEFINE_TYPE (GimpBrushTool, gimp_brush_tool, GIMP_TYPE_PAINT_TOOL)
......@@ -93,14 +91,14 @@ gimp_brush_tool_class_init (GimpBrushToolClass *klass)
GimpToolClass *tool_class = GIMP_TOOL_CLASS (klass);
GimpDrawToolClass *draw_tool_class = GIMP_DRAW_TOOL_CLASS (klass);
object_class->constructor = gimp_brush_tool_constructor;
object_class->constructed = gimp_brush_tool_constructed;
tool_class->motion = gimp_brush_tool_motion;
tool_class->oper_update = gimp_brush_tool_oper_update;
tool_class->cursor_update = gimp_brush_tool_cursor_update;
tool_class->options_notify = gimp_brush_tool_options_notify;
draw_tool_class->draw = gimp_brush_tool_draw;
draw_tool_class->draw = gimp_brush_tool_draw;
}
static void
......@@ -123,22 +121,16 @@ gimp_brush_tool_init (GimpBrushTool *brush_tool)
brush_tool->brush_y = 0.0;
}
static GObject *
gimp_brush_tool_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_brush_tool_constructed (GObject *object)
{
GObject *object;
GimpTool *tool;
GimpPaintTool *paint_tool;
GimpBrushTool *brush_tool;
GimpTool *tool = GIMP_TOOL (object);
GimpPaintTool *paint_tool = GIMP_PAINT_TOOL (object);
GimpBrushTool *brush_tool = GIMP_BRUSH_TOOL (object);
GimpDisplayConfig *display_config;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
tool = GIMP_TOOL (object);
paint_tool = GIMP_PAINT_TOOL (object);
brush_tool = GIMP_BRUSH_TOOL (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_assert (GIMP_IS_BRUSH_CORE (paint_tool->core));
......@@ -164,8 +156,6 @@ gimp_brush_tool_constructor (GType type,
g_signal_connect_after (paint_tool->core, "set-brush",
G_CALLBACK (gimp_brush_tool_set_brush_after),
brush_tool);
return object;
}
static void
......
......@@ -43,39 +43,37 @@
/* local function prototypes */
static GObject * gimp_color_picker_tool_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_color_picker_tool_finalize (GObject *object);
static void gimp_color_picker_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *display);
static void gimp_color_picker_tool_modifier_key (GimpTool *tool,
GdkModifierType key,
gboolean press,
GdkModifierType state,
GimpDisplay *display);
static void gimp_color_picker_tool_oper_update (GimpTool *tool,
const GimpCoords *coords,
GdkModifierType state,
gboolean proximity,
GimpDisplay *display);
static void gimp_color_picker_tool_picked (GimpColorTool *color_tool,
GimpColorPickState pick_state,
GimpImageType sample_type,
GimpRGB *color,
gint color_index);
static void gimp_color_picker_tool_info_create (GimpColorPickerTool *picker_tool);
static void gimp_color_picker_tool_info_response (GtkWidget *widget,
gint response_id,
GimpColorPickerTool *picker_tool);
static void gimp_color_picker_tool_info_update (GimpColorPickerTool *picker_tool,
GimpImageType sample_type,
GimpRGB *color,
gint color_index);
static void gimp_color_picker_tool_constructed (GObject *object);
static void gimp_color_picker_tool_finalize (GObject *object);
static void gimp_color_picker_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *display);
static void gimp_color_picker_tool_modifier_key (GimpTool *tool,
GdkModifierType key,
gboolean press,
GdkModifierType state,
GimpDisplay *display);
static void gimp_color_picker_tool_oper_update (GimpTool *tool,
const GimpCoords *coords,
GdkModifierType state,
gboolean proximity,
GimpDisplay *display);
static void gimp_color_picker_tool_picked (GimpColorTool *color_tool,
GimpColorPickState pick_state,
GimpImageType sample_type,
GimpRGB *color,
gint color_index);
static void gimp_color_picker_tool_info_create (GimpColorPickerTool *picker_tool);
static void gimp_color_picker_tool_info_response (GtkWidget *widget,
gint response_id,
GimpColorPickerTool *picker_tool);
static void gimp_color_picker_tool_info_update (GimpColorPickerTool *picker_tool,
GimpImageType sample_type,
GimpRGB *color,
gint color_index);
G_DEFINE_TYPE (GimpColorPickerTool, gimp_color_picker_tool,
......@@ -108,7 +106,7 @@ gimp_color_picker_tool_class_init (GimpColorPickerToolClass *klass)
GimpToolClass *tool_class = GIMP_TOOL_CLASS (klass);
GimpColorToolClass *color_tool_class = GIMP_COLOR_TOOL_CLASS (klass);
object_class->constructor = gimp_color_picker_tool_constructor;
object_class->constructed = gimp_color_picker_tool_constructed;
object_class->finalize = gimp_color_picker_tool_finalize;
tool_class->control = gimp_color_picker_tool_control;
......@@ -126,22 +124,16 @@ gimp_color_picker_tool_init (GimpColorPickerTool *tool)
color_tool->pick_mode = GIMP_COLOR_PICK_MODE_FOREGROUND;
}
static GObject *
gimp_color_picker_tool_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_color_picker_tool_constructed (GObject *object)
{
GObject *object;
GimpTool *tool;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
GimpTool *tool = GIMP_TOOL (object);
tool = GIMP_TOOL (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
gimp_color_tool_enable (GIMP_COLOR_TOOL (object),
GIMP_COLOR_TOOL_GET_OPTIONS (tool));
return object;
}
static void
......
......@@ -58,53 +58,55 @@ struct _GimpCropToolClass
static void gimp_crop_tool_rectangle_tool_iface_init (GimpRectangleToolInterface *iface);
static GObject * gimp_crop_tool_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_crop_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *display);
static void gimp_crop_tool_button_press (GimpTool *tool,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpButtonPressType press_type,
GimpDisplay *display);
static void gimp_crop_tool_button_release (GimpTool *tool,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpButtonReleaseType release_type,
GimpDisplay *display);
static void gimp_crop_tool_active_modifier_key (GimpTool *tool,
GdkModifierType key,
gboolean press,
GdkModifierType state,
GimpDisplay *display);
static void gimp_crop_tool_cursor_update (GimpTool *tool,
const GimpCoords *coords,
GdkModifierType state,
GimpDisplay *display);
static void gimp_crop_tool_draw (GimpDrawTool *draw_tool);
static gboolean gimp_crop_tool_execute (GimpRectangleTool *rectangle,
gint x,
gint y,
gint w,
gint h);
static void gimp_crop_tool_update_option_defaults (GimpCropTool *crop_tool,
gboolean ignore_pending);
static void gimp_crop_tool_constructed (GObject *object);
static void gimp_crop_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *display);
static void gimp_crop_tool_button_press (GimpTool *tool,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpButtonPressType press_type,
GimpDisplay *display);
static void gimp_crop_tool_button_release (GimpTool *tool,
const GimpCoords *coords,
guint32 time,
GdkModifierType state,
GimpButtonReleaseType release_type,
GimpDisplay *display);
static void gimp_crop_tool_active_modifier_key (GimpTool *tool,
GdkModifierType key,
gboolean press,
GdkModifierType state,
GimpDisplay *display);
static void gimp_crop_tool_cursor_update (GimpTool *tool,
const GimpCoords *coords,
GdkModifierType state,
GimpDisplay *display);
static void gimp_crop_tool_draw (GimpDrawTool *draw_tool);
static gboolean gimp_crop_tool_execute (GimpRectangleTool *rectangle,
gint x,
gint y,
gint w,
gint h);
static void gimp_crop_tool_update_option_defaults (GimpCropTool *crop_tool,
gboolean ignore_pending);
static GimpRectangleConstraint
gimp_crop_tool_get_constraint (GimpCropTool *crop_tool);
gimp_crop_tool_get_constraint (GimpCropTool *crop_tool);
static void gimp_crop_tool_options_notify (GimpCropOptions *options,
GParamSpec *pspec,
GimpCropTool *crop_tool);
static void gimp_crop_tool_image_changed (GimpCropTool *crop_tool,
GimpImage *image,
GimpContext *context);
static void gimp_crop_tool_image_size_changed (GimpCropTool *crop_tool);
static void gimp_crop_tool_cancel (GimpRectangleTool *rect_tool);
static gboolean gimp_crop_tool_rectangle_change_complete (GimpRectangleTool *rect_tool);
static void gimp_crop_tool_options_notify (GimpCropOptions *options,
GParamSpec *pspec,
GimpCropTool *crop_tool);
static void gimp_crop_tool_image_changed (GimpCropTool *crop_tool,
GimpImage *image,
GimpContext *context);
static void gimp_crop_tool_image_size_changed (GimpCropTool *crop_tool);
static void gimp_crop_tool_cancel (GimpRectangleTool *rect_tool);
static gboolean gimp_crop_tool_rectangle_change_complete (GimpRectangleTool *rect_tool);
G_DEFINE_TYPE_WITH_CODE (GimpCropTool, gimp_crop_tool, GIMP_TYPE_DRAW_TOOL,
......@@ -140,7 +142,7 @@ gimp_crop_tool_class_init (GimpCropToolClass *klass)
GimpToolClass *tool_class = GIMP_TOOL_CLASS (klass);
GimpDrawToolClass *draw_tool_class = GIMP_DRAW_TOOL_CLASS (klass);
object_class->constructor = gimp_crop_tool_constructor;
object_class->constructed = gimp_crop_tool_constructed;
object_class->set_property = gimp_rectangle_tool_set_property;
object_class->get_property = gimp_rectangle_tool_get_property;
......@@ -181,30 +183,25 @@ gimp_crop_tool_init (GimpCropTool *crop_tool)
crop_tool->current_image = NULL;
}
static GObject *
gimp_crop_tool_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_crop_tool_constructed (GObject *object)
{
GObject *object;
GimpCropTool *crop_tool;
GimpCropTool *crop_tool = GIMP_CROP_TOOL (object);
GimpCropOptions *options;
GimpContext *gimp_context;
GimpToolInfo *tool_info;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
gimp_rectangle_tool_constructor (object);
g_object_get (object,
"tool-info", &tool_info,
NULL);
gimp_context = gimp_get_user_context (tool_info->gimp);
crop_tool = GIMP_CROP_TOOL (object);
g_signal_connect_object (gimp_context, "image-changed",
G_CALLBACK (gimp_crop_tool_image_changed),
crop_tool,
......@@ -231,10 +228,7 @@ gimp_crop_tool_constructor (GType type,
gimp_rectangle_tool_set_constraint (GIMP_RECTANGLE_TOOL (object),
gimp_crop_tool_get_constraint (crop_tool));
gimp_crop_tool_update_option_defaults (crop_tool,
FALSE);
return object;
gimp_crop_tool_update_option_defaults (crop_tool, FALSE);
}
static void
......
......@@ -61,9 +61,7 @@ typedef struct
} FgSelectStroke;
static GObject * gimp_foreground_select_tool_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_foreground_select_tool_constructed (GObject *object);
static void gimp_foreground_select_tool_finalize (GObject *object);
static void gimp_foreground_select_tool_control (GimpTool *tool,
......@@ -160,7 +158,7 @@ gimp_foreground_select_tool_class_init (GimpForegroundSelectToolClass *klass)
free_select_tool_class = GIMP_FREE_SELECT_TOOL_CLASS (klass);
object_class->constructor = gimp_foreground_select_tool_constructor;
object_class->constructed = gimp_foreground_select_tool_constructed;
object_class->finalize = gimp_foreground_select_tool_finalize;
tool_class->control = gimp_foreground_select_tool_control;
......@@ -199,23 +197,17 @@ gimp_foreground_select_tool_init (GimpForegroundSelectTool *fg_select)
fg_select->mask = NULL;
}
static GObject *
gimp_foreground_select_tool_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_foreground_select_tool_constructed (GObject *object)
{
GObject *object;
GimpToolOptions *options;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
GimpToolOptions *options = GIMP_TOOL_GET_OPTIONS (object);
options = GIMP_TOOL_GET_OPTIONS (object);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
g_signal_connect_object (options, "notify",
G_CALLBACK (gimp_foreground_select_options_notify),
object, 0);
return object;
}
static void
......
......@@ -32,23 +32,21 @@ enum
};
static GObject * gimp_foreground_select_tool_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_foreground_select_tool_undo_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_foreground_select_tool_undo_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_foreground_select_tool_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void gimp_foreground_select_tool_undo_free (GimpUndo *undo,
GimpUndoMode undo_mode);
static void gimp_foreground_select_tool_undo_constructed (GObject *object);
static void gimp_foreground_select_tool_undo_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_foreground_select_tool_undo_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec);
static void gimp_foreground_select_tool_undo_pop (GimpUndo *undo,
GimpUndoMode undo_mode,
GimpUndoAccumulator *accum);
static void gimp_foreground_select_tool_undo_free (GimpUndo *undo,
GimpUndoMode undo_mode);
G_DEFINE_TYPE (GimpForegroundSelectToolUndo, gimp_foreground_select_tool_undo,
......@@ -63,7 +61,7 @@ gimp_foreground_select_tool_undo_class_init (GimpForegroundSelectToolUndoClass *
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GimpUndoClass *undo_class = GIMP_UNDO_CLASS (klass);
object_class->constructor = gimp_foreground_select_tool_undo_constructor;
object_class->constructed = gimp_foreground_select_tool_undo_constructed;
object_class->set_property = gimp_foreground_select_tool_undo_set_property;
object_class->get_property = gimp_foreground_select_tool_undo_get_property;
......@@ -83,16 +81,14 @@ gimp_foreground_select_tool_undo_init (GimpForegroundSelectToolUndo *undo)
{
}
static GObject *
gimp_foreground_select_tool_undo_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_foreground_select_tool_undo_constructed (GObject *object)
{
GObject *object;
GimpForegroundSelectToolUndo *foreground_select_tool_undo;
GimpForegroundSelectTool *foreground_select_tool;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
foreground_select_tool_undo = GIMP_FOREGROUND_SELECT_TOOL_UNDO (object);
......@@ -102,8 +98,6 @@ gimp_foreground_select_tool_undo_constructor (GType type,
g_object_add_weak_pointer (G_OBJECT (foreground_select_tool_undo->foreground_select_tool),
(gpointer) &foreground_select_tool_undo->foreground_select_tool);
return object;
}
static void
......
......@@ -71,9 +71,7 @@ static void gimp_image_map_tool_base_init (GimpImageMapToolClass *klas
static void gimp_image_map_tool_init (GimpImageMapTool *im_tool);
static GObject * gimp_image_map_tool_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_image_map_tool_constructed (GObject *object);
static void gimp_image_map_tool_finalize (GObject *object);
static gboolean gimp_image_map_tool_initialize (GimpTool *tool,
......@@ -155,7 +153,7 @@ gimp_image_map_tool_class_init (GimpImageMapToolClass *klass)
parent_class = g_type_class_peek_parent (klass);
object_class->constructor = gimp_image_map_tool_constructor;
object_class->constructed = gimp_image_map_tool_constructed;
object_class->finalize = gimp_image_map_tool_finalize;
tool_class->initialize = gimp_image_map_tool_initialize;
......@@ -211,25 +209,20 @@ gimp_image_map_tool_init (GimpImageMapTool *image_map_tool)
image_map_tool->label_group = NULL;
}
static GObject *
gimp_image_map_tool_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_image_map_tool_constructed (GObject *object)
{
GObject *object;
GimpImageMapTool *image_map_tool;
GimpImageMapTool *image_map_tool = GIMP_IMAGE_MAP_TOOL (object);
GimpImageMapToolClass *klass;
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
if (G_OBJECT_CLASS (parent_class)->constructed)
G_OBJECT_CLASS (parent_class)->constructed (object);
image_map_tool = GIMP_IMAGE_MAP_TOOL (object);
klass = GIMP_IMAGE_MAP_TOOL_GET_CLASS (image_map_tool);
klass = GIMP_IMAGE_MAP_TOOL_GET_CLASS (image_map_tool);
if (klass->get_operation)
image_map_tool->operation = klass->get_operation (image_map_tool,
&image_map_tool->config);
return object;
}
static void
......
......@@ -51,9 +51,7 @@
#include "gimp-intl.h"
static GObject * gimp_paint_tool_constructor (GType type,
guint n_params,
GObjectConstructParam *params);
static void gimp_paint_tool_constructed (GObject *object);
static void gimp_paint_tool_finalize (GObject *object);
static void gimp_paint_tool_control (GimpTool *tool,
......@@ -110,7 +108,7 @@ gimp_paint_tool_class_init (GimpPaintToolClass *klass)
GimpToolClass *tool_class = GIMP_TOOL_CLASS (klass);
GimpDrawToolClass *draw_tool_class = GIMP_DRAW_TOOL_CLASS (klass);
object_class->constructor = gimp_paint_tool_constructor;
object_class->constructed = gimp_paint_tool_constructed;
object_class->finalize = gimp_paint_tool_finalize;
tool_class->control = gimp_paint_tool_control;
......@@ -147,22 +145,16 @@ gimp_paint_tool_init (GimpPaintTool *paint_tool)
paint_tool->core = NULL;
}
static GObject *
gimp_paint_tool_constructor (GType type,
guint n_params,
GObjectConstructParam *params)
static void
gimp_paint_tool_constructed (GObject *object)
{
GObject *object;
GimpTool *tool;
GimpTool *tool = GIMP_TOOL (object);
GimpPaintTool *paint_tool = GIMP_PAINT_TOOL (object);
GimpPaintOptions *options = GIMP_PAINT_TOOL_GET_OPTIONS (tool);
GimpPaintInfo *paint_info;