Commit 904d8e2c authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

app/tools/Makefile.am back as real tool which gets temporarily pushed to

2001-02-28  Michael Natterer  <mitch@gimp.org>

	* app/tools/Makefile.am
	* app/tools/edit_selection.[ch]: back as real tool which gets
	temporarily pushed to the tool_manager's new tool stack.

	* app/tools/move.c
	* app/tools/text_tool.c: call the edit_selection stuff again.

	* app/tools/tool.c: added a STUB().

	* app/tools/tool_manager.[ch]: implemented tool_manager_push_tool()
	and tool_manager_pop_tool().
parent ce2fa492
2001-02-28 Michael Natterer <mitch@gimp.org>
* app/tools/Makefile.am
* app/tools/edit_selection.[ch]: back as real tool which gets
temporarily pushed to the tool_manager's new tool stack.
* app/tools/move.c
* app/tools/text_tool.c: call the edit_selection stuff again.
* app/tools/tool.c: added a STUB().
* app/tools/tool_manager.[ch]: implemented tool_manager_push_tool()
and tool_manager_pop_tool().
2001-02-28 Michael Natterer <mitch@gimp.org>
* app/tools/Makefile.am
......
......@@ -36,8 +36,8 @@ libapptools_la_SOURCES = \
## dodgeburn.h \
gimpdrawtool.c \
gimpdrawgtool.h \
## edit_selection.c \
## edit_selection.h \
edit_selection.c \
edit_selection.h \
## ellipse_select.c \
## ellipse_select.h \
## eraser.c \
......
This diff is collapsed.
......@@ -16,8 +16,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __EDIT_SELECTION_H__
#define __EDIT_SELECTION_H__
#ifndef __GIMP_EDIT_SELECTION_TOOL_H__
#define __GIMP_EDIT_SELECTION_TOOL_H__
typedef enum
......@@ -29,27 +29,10 @@ typedef enum
} EditType;
void init_edit_selection (Tool *tool,
GDisplay *gdisp,
GdkEventButton *bevent,
EditType edit_type);
void init_edit_selection (GimpTool *tool,
GDisplay *gdisp,
GdkEventButton *bevent,
EditType edit_type);
void edit_selection_button_release (Tool *tool,
GdkEventButton *bevent,
GDisplay *gdisp);
void edit_selection_motion (Tool *tool,
GdkEventMotion *mevent,
GDisplay *gdisp);
void edit_selection_control (Tool *tool,
ToolAction action,
GDisplay *gdisp);
void edit_selection_cursor_update (Tool *tool,
GdkEventMotion *mevent,
GDisplay *gdisp);
void edit_selection_draw (Tool *tool);
void edit_sel_arrow_keys_func (Tool *tool,
GdkEventKey *kevent,
GDisplay *gdisp);
#endif /* __EDIT_SELECTION_H__ */
#endif /* __GIMP_EDIT_SELECTION_TOOL_H__ */
This diff is collapsed.
......@@ -16,8 +16,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __EDIT_SELECTION_H__
#define __EDIT_SELECTION_H__
#ifndef __GIMP_EDIT_SELECTION_TOOL_H__
#define __GIMP_EDIT_SELECTION_TOOL_H__
typedef enum
......@@ -29,27 +29,10 @@ typedef enum
} EditType;
void init_edit_selection (Tool *tool,
GDisplay *gdisp,
GdkEventButton *bevent,
EditType edit_type);
void init_edit_selection (GimpTool *tool,
GDisplay *gdisp,
GdkEventButton *bevent,
EditType edit_type);
void edit_selection_button_release (Tool *tool,
GdkEventButton *bevent,
GDisplay *gdisp);
void edit_selection_motion (Tool *tool,
GdkEventMotion *mevent,
GDisplay *gdisp);
void edit_selection_control (Tool *tool,
ToolAction action,
GDisplay *gdisp);
void edit_selection_cursor_update (Tool *tool,
GdkEventMotion *mevent,
GDisplay *gdisp);
void edit_selection_draw (Tool *tool);
void edit_sel_arrow_keys_func (Tool *tool,
GdkEventKey *kevent,
GDisplay *gdisp);
#endif /* __EDIT_SELECTION_H__ */
#endif /* __GIMP_EDIT_SELECTION_TOOL_H__ */
......@@ -200,8 +200,6 @@ move_tool_button_press (GimpTool *tool,
gdisplay_untransform_coords (gdisp, bevent->x, bevent->y, &x, &y,
FALSE, FALSE);
#warning FIXME fix edit_selection (allow pushing of temp tools)
#if 0
if (bevent->state & GDK_MOD1_MASK &&
!gimage_mask_is_empty (gdisp->gimage))
{
......@@ -215,7 +213,6 @@ move_tool_button_press (GimpTool *tool,
}
else
{
#endif
if (gdisp->draw_guides &&
(guide = gdisplay_find_guide (gdisp, bevent->x, bevent->y)))
{
......@@ -244,18 +241,14 @@ move_tool_button_press (GimpTool *tool,
{
move->layer = gimp_image_floating_sel (gdisp->gimage);
}
#if 0
/* Otherwise, init the edit selection */
else
{
gimp_image_set_active_layer (gdisp->gimage, layer);
init_edit_selection (tool, gdisp, bevent, EDIT_LAYER_TRANSLATE);
}
#endif
tool->state = ACTIVE;
#if 0
}
#endif
}
/* if we've got an active tool grab the pointer */
......
......@@ -414,10 +414,8 @@ text_tool_button_press (GimpTool *tool,
/* If there is a floating selection, and this aint it, use the move tool */
if (gimp_layer_is_floating_sel (layer))
{
#warning FIXME (edit_selection)
#if 0
init_edit_selection (tool, gdisp, bevent, EDIT_LAYER_TRANSLATE);
#endif
return;
}
......
......@@ -561,6 +561,7 @@ STUB(clone_non_gui)
STUB(clone_non_gui_default)
STUB(convolve_non_gui)
STUB(convolve_non_gui_default)
STUB(path_transform_xy)
#warning obsolete crap
#ifdef STONE_AGE
......
......@@ -200,8 +200,6 @@ move_tool_button_press (GimpTool *tool,
gdisplay_untransform_coords (gdisp, bevent->x, bevent->y, &x, &y,
FALSE, FALSE);
#warning FIXME fix edit_selection (allow pushing of temp tools)
#if 0
if (bevent->state & GDK_MOD1_MASK &&
!gimage_mask_is_empty (gdisp->gimage))
{
......@@ -215,7 +213,6 @@ move_tool_button_press (GimpTool *tool,
}
else
{
#endif
if (gdisp->draw_guides &&
(guide = gdisplay_find_guide (gdisp, bevent->x, bevent->y)))
{
......@@ -244,18 +241,14 @@ move_tool_button_press (GimpTool *tool,
{
move->layer = gimp_image_floating_sel (gdisp->gimage);
}
#if 0
/* Otherwise, init the edit selection */
else
{
gimp_image_set_active_layer (gdisp->gimage, layer);
init_edit_selection (tool, gdisp, bevent, EDIT_LAYER_TRANSLATE);
}
#endif
tool->state = ACTIVE;
#if 0
}
#endif
}
/* if we've got an active tool grab the pointer */
......
......@@ -414,10 +414,8 @@ text_tool_button_press (GimpTool *tool,
/* If there is a floating selection, and this aint it, use the move tool */
if (gimp_layer_is_floating_sel (layer))
{
#warning FIXME (edit_selection)
#if 0
init_edit_selection (tool, gdisp, bevent, EDIT_LAYER_TRANSLATE);
#endif
return;
}
......
......@@ -561,6 +561,7 @@ STUB(clone_non_gui)
STUB(clone_non_gui_default)
STUB(convolve_non_gui)
STUB(convolve_non_gui_default)
STUB(path_transform_xy)
#warning obsolete crap
#ifdef STONE_AGE
......
......@@ -48,6 +48,9 @@ GimpTool *active_tool = NULL;
GimpContainer *global_tool_info_list = NULL;
static GSList *tool_stack = NULL;
/* Function definitions */
static void
......@@ -64,12 +67,43 @@ active_tool_unref (void)
void
tool_manager_select_tool (GimpTool *tool)
{
g_return_if_fail (tool != NULL);
g_return_if_fail (GIMP_IS_TOOL (tool));
if (active_tool)
active_tool_unref ();
active_tool = tool;
}
void
tool_manager_push_tool (GimpTool *tool)
{
g_return_if_fail (tool != NULL);
g_return_if_fail (GIMP_IS_TOOL (tool));
if (active_tool)
{
gtk_object_ref (GTK_OBJECT (active_tool));
tool_stack = g_slist_prepend (tool_stack, active_tool);
}
tool_manager_select_tool (tool);
}
void
tool_manager_pop_tool (void)
{
if (tool_stack)
{
tool_manager_select_tool (GIMP_TOOL (tool_stack->data));
tool_stack = g_slist_remove (tool_stack, active_tool);
}
}
void
tool_manager_initialize_tool (GimpTool *tool, /* FIXME: remove tool param */
GDisplay *gdisp)
......
......@@ -26,6 +26,10 @@
/* Function declarations */
void tool_manager_select_tool (GimpTool *tool);
void tool_manager_push_tool (GimpTool *tool);
void tool_manager_pop_tool (void);
void tool_manager_initialize_tool (GimpTool *tool,
GDisplay *gdisp);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment