mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-22 12:32:37 +00:00
moved the call to gimp_color_tool_enable() from GimpTool::initialize() to
2003-09-19 Michael Natterer <mitch@gimp.org> * app/tools/gimpcolorpickertool.c: moved the call to gimp_color_tool_enable() from GimpTool::initialize() to GObject::constructor() so the right cursor is shown before the first button_press. Fixes bug #122693.
This commit is contained in:
parent
d6a606b9fc
commit
da6c31af1f
|
@ -1,3 +1,10 @@
|
|||
2003-09-19 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/tools/gimpcolorpickertool.c: moved the call to
|
||||
gimp_color_tool_enable() from GimpTool::initialize() to
|
||||
GObject::constructor() so the right cursor is shown before the
|
||||
first button_press. Fixes bug #122693.
|
||||
|
||||
2003-09-19 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/widgets/gimpcolormapeditor.c: changed the hex entry to look
|
||||
|
|
|
@ -59,10 +59,11 @@
|
|||
|
||||
static void gimp_color_picker_tool_class_init (GimpColorPickerToolClass *klass);
|
||||
static void gimp_color_picker_tool_init (GimpColorPickerTool *tool);
|
||||
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_initialize (GimpTool *tool,
|
||||
GimpDisplay *gdisp);
|
||||
static void gimp_color_picker_tool_control (GimpTool *tool,
|
||||
GimpToolAction action,
|
||||
GimpDisplay *gdisp);
|
||||
|
@ -149,12 +150,12 @@ gimp_color_picker_tool_class_init (GimpColorPickerToolClass *klass)
|
|||
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->finalize = gimp_color_picker_tool_finalize;
|
||||
object_class->constructor = gimp_color_picker_tool_constructor;
|
||||
object_class->finalize = gimp_color_picker_tool_finalize;
|
||||
|
||||
tool_class->initialize = gimp_color_picker_tool_initialize;
|
||||
tool_class->control = gimp_color_picker_tool_control;
|
||||
tool_class->control = gimp_color_picker_tool_control;
|
||||
|
||||
color_tool_class->picked = gimp_color_picker_tool_picked;
|
||||
color_tool_class->picked = gimp_color_picker_tool_picked;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -162,10 +163,30 @@ gimp_color_picker_tool_init (GimpColorPickerTool *tool)
|
|||
{
|
||||
gimp_tool_control_set_preserve (GIMP_TOOL (tool)->control, FALSE);
|
||||
|
||||
gimp_tool_control_set_cursor (GIMP_TOOL (tool)->control,
|
||||
GIMP_COLOR_PICKER_CURSOR);
|
||||
gimp_tool_control_set_tool_cursor (GIMP_TOOL (tool)->control,
|
||||
GIMP_COLOR_PICKER_TOOL_CURSOR);
|
||||
}
|
||||
|
||||
static GObject *
|
||||
gimp_color_picker_tool_constructor (GType type,
|
||||
guint n_params,
|
||||
GObjectConstructParam *params)
|
||||
{
|
||||
GObject *object;
|
||||
GimpTool *tool;
|
||||
|
||||
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
|
||||
|
||||
tool = GIMP_TOOL (object);
|
||||
|
||||
gimp_color_tool_enable (GIMP_COLOR_TOOL (object),
|
||||
GIMP_COLOR_OPTIONS (tool->tool_info->tool_options));
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_color_picker_tool_finalize (GObject *object)
|
||||
{
|
||||
|
@ -173,24 +194,12 @@ gimp_color_picker_tool_finalize (GObject *object)
|
|||
{
|
||||
info_dialog_free (gimp_color_picker_tool_info);
|
||||
gimp_color_picker_tool_info = NULL;
|
||||
|
||||
color_area = NULL;
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_color_picker_tool_initialize (GimpTool *tool,
|
||||
GimpDisplay *gdisp)
|
||||
{
|
||||
GIMP_TOOL_CLASS (parent_class)->initialize (tool, gdisp);
|
||||
|
||||
/* always pick colors */
|
||||
gimp_color_tool_enable (GIMP_COLOR_TOOL (tool),
|
||||
GIMP_COLOR_OPTIONS (tool->tool_info->tool_options));
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_color_picker_tool_control (GimpTool *tool,
|
||||
GimpToolAction action,
|
||||
|
@ -203,6 +212,7 @@ gimp_color_picker_tool_control (GimpTool *tool,
|
|||
{
|
||||
info_dialog_free (gimp_color_picker_tool_info);
|
||||
gimp_color_picker_tool_info = NULL;
|
||||
color_area = NULL;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in a new issue