[gimp] app: move shutdown code from gimp_align_tool_halt() to control(HALT)
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: move shutdown code from gimp_align_tool_halt() to control(HALT)
- Date: Fri, 1 Apr 2011 21:31:52 +0000 (UTC)
commit 931d2110c6c0d3ce555ca64e977d88739bb77368
Author: Michael Natterer <mitch gimp org>
Date: Fri Apr 1 13:43:26 2011 +0200
app: move shutdown code from gimp_align_tool_halt() to control(HALT)
and also remove GObject::dispose() because that's going to be
handled generically soon.
app/tools/gimpaligntool.c | 36 +++---------------------------------
1 files changed, 3 insertions(+), 33 deletions(-)
---
diff --git a/app/tools/gimpaligntool.c b/app/tools/gimpaligntool.c
index 5c30bfb..c94e3fc 100644
--- a/app/tools/gimpaligntool.c
+++ b/app/tools/gimpaligntool.c
@@ -59,7 +59,6 @@
/* local function prototypes */
static void gimp_align_tool_constructed (GObject *object);
-static void gimp_align_tool_dispose (GObject *object);
static void gimp_align_tool_control (GimpTool *tool,
GimpToolAction action,
@@ -100,7 +99,6 @@ static void gimp_align_tool_cursor_update (GimpTool *tool,
static void gimp_align_tool_draw (GimpDrawTool *draw_tool);
-static void gimp_align_tool_halt (GimpAlignTool *align_tool);
static void gimp_align_tool_align (GimpAlignTool *align_tool,
GimpAlignmentType align_type);
@@ -139,7 +137,6 @@ gimp_align_tool_class_init (GimpAlignToolClass *klass)
GimpDrawToolClass *draw_tool_class = GIMP_DRAW_TOOL_CLASS (klass);
object_class->constructed = gimp_align_tool_constructed;
- object_class->dispose = gimp_align_tool_dispose;
tool_class->control = gimp_align_tool_control;
tool_class->button_press = gimp_align_tool_button_press;
@@ -182,14 +179,6 @@ gimp_align_tool_constructed (GObject *object)
}
static void
-gimp_align_tool_dispose (GObject *object)
-{
- gimp_align_tool_halt (GIMP_ALIGN_TOOL (object));
-
- G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-static void
gimp_align_tool_control (GimpTool *tool,
GimpToolAction action,
GimpDisplay *display)
@@ -203,7 +192,7 @@ gimp_align_tool_control (GimpTool *tool,
break;
case GIMP_TOOL_ACTION_HALT:
- gimp_align_tool_halt (align_tool);
+ gimp_align_tool_clear_selected (align_tool);
break;
}
@@ -224,7 +213,7 @@ gimp_align_tool_button_press (GimpTool *tool,
/* If the tool was being used in another image... reset it */
if (display != tool->display)
- gimp_align_tool_halt (align_tool);
+ gimp_tool_control (tool, GIMP_TOOL_ACTION_HALT, display);
tool->display = display;
@@ -413,7 +402,7 @@ gimp_align_tool_key_press (GimpTool *tool,
switch (kevent->keyval)
{
case GDK_KEY_Escape:
- gimp_align_tool_halt (GIMP_ALIGN_TOOL (tool));
+ gimp_tool_control (tool, GIMP_TOOL_ACTION_HALT, display);
return TRUE;
default:
@@ -713,25 +702,6 @@ gimp_align_tool_draw (GimpDrawTool *draw_tool)
}
static void
-gimp_align_tool_halt (GimpAlignTool *align_tool)
-{
- GimpTool *tool = GIMP_TOOL (align_tool);
-
- if (gimp_draw_tool_is_active (GIMP_DRAW_TOOL (align_tool)))
- gimp_draw_tool_stop (GIMP_DRAW_TOOL (align_tool));
-
- if (gimp_tool_control_is_active (tool->control))
- gimp_tool_control_halt (tool->control);
-
- gimp_align_tool_clear_selected (align_tool);
-
- if (tool->display)
- gimp_tool_pop_status (tool, tool->display);
-
- tool->display = NULL;
-}
-
-static void
gimp_align_tool_align (GimpAlignTool *align_tool,
GimpAlignmentType align_type)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]