Bug 754713 - On-canvas dialog of color picker tool always displays...
...in initially active tab We intend reuse the dialog across displays, so don't destroy the dialog in GIMP_TOOL_CONTROL_HALT, only hide it. This way the dialog keeps its detached state.
This commit is contained in:
parent
326ef2f7b2
commit
867b1f7efa
1 changed files with 21 additions and 8 deletions
|
|
@ -44,6 +44,7 @@
|
|||
/* local function prototypes */
|
||||
|
||||
static void gimp_color_picker_tool_constructed (GObject *object);
|
||||
static void gimp_color_picker_tool_dispose (GObject *object);
|
||||
|
||||
static void gimp_color_picker_tool_control (GimpTool *tool,
|
||||
GimpToolAction action,
|
||||
|
|
@ -110,6 +111,7 @@ gimp_color_picker_tool_class_init (GimpColorPickerToolClass *klass)
|
|||
GimpColorToolClass *color_tool_class = GIMP_COLOR_TOOL_CLASS (klass);
|
||||
|
||||
object_class->constructed = gimp_color_picker_tool_constructed;
|
||||
object_class->dispose = gimp_color_picker_tool_dispose;
|
||||
|
||||
tool_class->control = gimp_color_picker_tool_control;
|
||||
tool_class->modifier_key = gimp_color_picker_tool_modifier_key;
|
||||
|
|
@ -137,6 +139,24 @@ gimp_color_picker_tool_constructed (GObject *object)
|
|||
GIMP_COLOR_TOOL_GET_OPTIONS (tool));
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_color_picker_tool_dispose (GObject *object)
|
||||
{
|
||||
GimpColorPickerTool *picker_tool = GIMP_COLOR_PICKER_TOOL (object);
|
||||
|
||||
if (picker_tool->gui)
|
||||
{
|
||||
g_object_unref (picker_tool->gui);
|
||||
|
||||
picker_tool->gui = NULL;
|
||||
picker_tool->color_area = NULL;
|
||||
picker_tool->color_frame1 = NULL;
|
||||
picker_tool->color_frame2 = NULL;
|
||||
}
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_color_picker_tool_control (GimpTool *tool,
|
||||
GimpToolAction action,
|
||||
|
|
@ -152,14 +172,7 @@ gimp_color_picker_tool_control (GimpTool *tool,
|
|||
|
||||
case GIMP_TOOL_ACTION_HALT:
|
||||
if (picker_tool->gui)
|
||||
{
|
||||
g_object_unref (picker_tool->gui);
|
||||
|
||||
picker_tool->gui = NULL;
|
||||
picker_tool->color_area = NULL;
|
||||
picker_tool->color_frame1 = NULL;
|
||||
picker_tool->color_frame2 = NULL;
|
||||
}
|
||||
gimp_tool_gui_hide (picker_tool->gui);
|
||||
break;
|
||||
|
||||
case GIMP_TOOL_ACTION_COMMIT:
|
||||
|
|
|
|||
Loading…
Reference in a new issue