put all tool_manager variables into a struct which is attached to a
2001-07-07 Michael Natterer <mitch@gimp.org> * app/tools/tool_manager.[ch]: put all tool_manager variables into a struct which is attached to a "Gimp". Pass a Gimp* to all tool_manager functions. * app/disp_callbacks.c * app/gdisplay.c * app/gimage.c * app/scale.c * app/scroll.c * app/undo.c * app/gui/convert-dialog.c * app/gui/edit-commands.c * app/gui/tool-options-dialog.c * app/gui/tools-commands.c: changed accordingly. * app/tools/gimpbezierselecttool.c * app/tools/gimpbrightnesscontrasttool.c * app/tools/gimpbycolorselecttool.c * app/tools/gimpclonetool.c * app/tools/gimpcolorbalancetool.c * app/tools/gimpcroptool.c * app/tools/gimpcurvestool.c * app/tools/gimpeditselectiontool.c * app/tools/gimphistogramtool.c * app/tools/gimphuesaturationtool.c * app/tools/gimplevelstool.c * app/tools/gimpposterizetool.c * app/tools/gimptexttool.c * app/tools/gimpthresholdtool.c * app/tools/gimptool.c * app/tools/gimptransformtool.c: mostly bad hacks for tool dialogs which exist without a real context. Needs some more review.
This commit is contained in:
committed by
Michael Natterer
parent
5693956664
commit
b70ee4b76d
@ -22,9 +22,10 @@
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "core/core-types.h"
|
||||
#include "tools/tools-types.h"
|
||||
|
||||
#include "core/gimpimage.h"
|
||||
|
||||
#include "widgets/gimpcursor.h"
|
||||
|
||||
#include "tools/gimptool.h"
|
||||
@ -154,8 +155,8 @@ scroll_display (GDisplay *gdisp,
|
||||
gdisp->offset_x = old_x;
|
||||
gdisp->offset_y = old_y;
|
||||
|
||||
/* stop the currently active tool */
|
||||
tool_manager_control_active (PAUSE, (void *) gdisp);
|
||||
/* freeze the active tool */
|
||||
tool_manager_control_active (gdisp->gimage->gimp, PAUSE, gdisp);
|
||||
|
||||
/* set the offsets back to the new values */
|
||||
gdisp->offset_x += x_offset;
|
||||
@ -169,8 +170,8 @@ scroll_display (GDisplay *gdisp,
|
||||
(gdisp->disp_width - abs (x_offset)),
|
||||
(gdisp->disp_height - abs (y_offset)));
|
||||
|
||||
/* resume the currently active tool */
|
||||
tool_manager_control_active (RESUME, (void *) gdisp);
|
||||
/* re-enable the active tool */
|
||||
tool_manager_control_active (gdisp->gimage->gimp, RESUME, gdisp);
|
||||
|
||||
/* scale the image into the exposed regions */
|
||||
if (x_offset)
|
||||
|
||||
Reference in New Issue
Block a user