mirror of https://github.com/GNOME/gimp.git
app/tools/gimpclonetool.c app/tools/gimpcurvestool.c
2006-03-25 Michael Natterer <mitch@gimp.org> * app/tools/gimpclonetool.c * app/tools/gimpcurvestool.c * app/tools/gimpforegroundselecttool.c * app/tools/gimpselectiontool.c * app/tools/gimpvectortool.c (GimpTool::oper_update): don't push status messages when shell->proximity is FALSE. Make sure the old status message gets popped regardless of shell->proximity's value. Fixes stuck status bar messages.
This commit is contained in:
parent
8362c190a4
commit
0e7a40face
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2006-03-25 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/tools/gimpclonetool.c
|
||||
* app/tools/gimpcurvestool.c
|
||||
* app/tools/gimpforegroundselecttool.c
|
||||
* app/tools/gimpselectiontool.c
|
||||
* app/tools/gimpvectortool.c (GimpTool::oper_update): don't push
|
||||
status messages when shell->proximity is FALSE. Make sure the old
|
||||
status message gets popped regardless of shell->proximity's
|
||||
value. Fixes stuck status bar messages.
|
||||
|
||||
2006-03-25 Karine Delvare <edhel@gimp.org>
|
||||
|
||||
* app/tools/gimprectangletool.c: react to highlight notification.
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include "widgets/gimpwidgets-utils.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplayshell.h"
|
||||
|
||||
#include "gimpclonetool.h"
|
||||
#include "gimppaintoptions-gui.h"
|
||||
|
@ -232,8 +233,9 @@ gimp_clone_tool_oper_update (GimpTool *tool,
|
|||
|
||||
GIMP_TOOL_CLASS (parent_class)->oper_update (tool, coords, state, gdisp);
|
||||
|
||||
if (GIMP_CLONE_OPTIONS (options)->clone_type == GIMP_IMAGE_CLONE &&
|
||||
GIMP_CLONE (GIMP_PAINT_TOOL (tool)->core)->src_drawable == NULL)
|
||||
if (GIMP_CLONE_OPTIONS (options)->clone_type == GIMP_IMAGE_CLONE &&
|
||||
GIMP_CLONE (GIMP_PAINT_TOOL (tool)->core)->src_drawable == NULL &&
|
||||
GIMP_DISPLAY_SHELL (gdisp->shell)->proximity)
|
||||
{
|
||||
gimp_tool_replace_status (tool, gdisp,
|
||||
_("Ctrl-Click to set a clone source."));
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
#include "widgets/gimphistogramview.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplayshell.h"
|
||||
|
||||
#include "gimpcurvestool.h"
|
||||
#include "gimphistogramoptions.h"
|
||||
|
@ -361,7 +362,7 @@ gimp_curves_tool_oper_update (GimpTool *tool,
|
|||
|
||||
GIMP_COLOR_TOOL (tool)->pick_mode = mode;
|
||||
|
||||
if (status)
|
||||
if (status && GIMP_DISPLAY_SHELL (gdisp->shell)->proximity)
|
||||
gimp_tool_push_status (tool, gdisp, status);
|
||||
}
|
||||
|
||||
|
|
|
@ -316,11 +316,13 @@ gimp_foreground_select_tool_oper_update (GimpTool *tool,
|
|||
}
|
||||
}
|
||||
|
||||
if (status)
|
||||
gimp_tool_replace_status (tool, gdisp, status);
|
||||
|
||||
if (GIMP_DISPLAY_SHELL (gdisp->shell)->proximity)
|
||||
gimp_draw_tool_start (draw_tool, gdisp);
|
||||
{
|
||||
if (status)
|
||||
gimp_tool_replace_status (tool, gdisp, status);
|
||||
|
||||
gimp_draw_tool_start (draw_tool, gdisp);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "core/gimptoolinfo.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplayshell.h"
|
||||
|
||||
#include "gimpeditselectiontool.h"
|
||||
#include "gimpselectiontool.h"
|
||||
|
@ -160,7 +161,6 @@ gimp_selection_tool_oper_update (GimpTool *tool,
|
|||
GimpChannel *selection;
|
||||
GimpLayer *layer;
|
||||
GimpLayer *floating_sel;
|
||||
const gchar *status = NULL;
|
||||
gboolean move_layer = FALSE;
|
||||
gboolean move_floating_sel = FALSE;
|
||||
|
||||
|
@ -219,33 +219,41 @@ gimp_selection_tool_oper_update (GimpTool *tool,
|
|||
selection_tool->op = options->operation;
|
||||
}
|
||||
|
||||
if (! gimp_enum_get_value (GIMP_TYPE_CHANNEL_OPS, selection_tool->op,
|
||||
NULL, NULL, &status, NULL))
|
||||
gimp_tool_pop_status (tool, gdisp);
|
||||
|
||||
if (GIMP_DISPLAY_SHELL (gdisp->shell)->proximity)
|
||||
{
|
||||
switch (selection_tool->op)
|
||||
const gchar *status = NULL;
|
||||
|
||||
if (! gimp_enum_get_value (GIMP_TYPE_CHANNEL_OPS, selection_tool->op,
|
||||
NULL, NULL, &status, NULL))
|
||||
{
|
||||
case SELECTION_MOVE_MASK:
|
||||
status = _("Move the selection mask");
|
||||
break;
|
||||
switch (selection_tool->op)
|
||||
{
|
||||
case SELECTION_MOVE_MASK:
|
||||
status = _("Move the selection mask");
|
||||
break;
|
||||
|
||||
case SELECTION_MOVE:
|
||||
status = _("Move the selected pixels");
|
||||
break;
|
||||
case SELECTION_MOVE:
|
||||
status = _("Move the selected pixels");
|
||||
break;
|
||||
|
||||
case SELECTION_MOVE_COPY:
|
||||
status = _("Move a copy of the selected pixels");
|
||||
break;
|
||||
case SELECTION_MOVE_COPY:
|
||||
status = _("Move a copy of the selected pixels");
|
||||
break;
|
||||
|
||||
case SELECTION_ANCHOR:
|
||||
status = _("Anchor the floating selection");
|
||||
break;
|
||||
case SELECTION_ANCHOR:
|
||||
status = _("Anchor the floating selection");
|
||||
break;
|
||||
|
||||
default:
|
||||
g_return_if_reached ();
|
||||
default:
|
||||
g_return_if_reached ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gimp_tool_push_status (tool, gdisp, status);
|
||||
if (status)
|
||||
gimp_tool_push_status (tool, gdisp, status);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#include "widgets/gimpwidgets-utils.h"
|
||||
|
||||
#include "display/gimpdisplay.h"
|
||||
#include "display/gimpdisplayshell.h"
|
||||
|
||||
#include "gimpclonetool.h"
|
||||
#include "gimppaintoptions-gui.h"
|
||||
|
@ -232,8 +233,9 @@ gimp_clone_tool_oper_update (GimpTool *tool,
|
|||
|
||||
GIMP_TOOL_CLASS (parent_class)->oper_update (tool, coords, state, gdisp);
|
||||
|
||||
if (GIMP_CLONE_OPTIONS (options)->clone_type == GIMP_IMAGE_CLONE &&
|
||||
GIMP_CLONE (GIMP_PAINT_TOOL (tool)->core)->src_drawable == NULL)
|
||||
if (GIMP_CLONE_OPTIONS (options)->clone_type == GIMP_IMAGE_CLONE &&
|
||||
GIMP_CLONE (GIMP_PAINT_TOOL (tool)->core)->src_drawable == NULL &&
|
||||
GIMP_DISPLAY_SHELL (gdisp->shell)->proximity)
|
||||
{
|
||||
gimp_tool_replace_status (tool, gdisp,
|
||||
_("Ctrl-Click to set a clone source."));
|
||||
|
|
|
@ -897,21 +897,18 @@ gimp_vector_tool_oper_update (GimpTool *tool,
|
|||
GdkModifierType state,
|
||||
GimpDisplay *gdisp)
|
||||
{
|
||||
GimpVectorTool *vector_tool;
|
||||
GimpDrawTool *draw_tool;
|
||||
GimpVectorTool *vector_tool = GIMP_VECTOR_TOOL (tool);
|
||||
GimpDrawTool *draw_tool = GIMP_DRAW_TOOL (tool);
|
||||
GimpVectorOptions *options;
|
||||
GimpAnchor *anchor = NULL;
|
||||
GimpAnchor *anchor2 = NULL;
|
||||
GimpStroke *stroke = NULL;
|
||||
gdouble position = -1;
|
||||
gboolean on_handle = FALSE;
|
||||
gboolean on_curve = FALSE;
|
||||
gboolean on_vectors = FALSE;
|
||||
GimpAnchor *anchor = NULL;
|
||||
GimpAnchor *anchor2 = NULL;
|
||||
GimpStroke *stroke = NULL;
|
||||
gdouble position = -1;
|
||||
gboolean on_handle = FALSE;
|
||||
gboolean on_curve = FALSE;
|
||||
gboolean on_vectors = FALSE;
|
||||
|
||||
vector_tool = GIMP_VECTOR_TOOL (tool);
|
||||
options = GIMP_VECTOR_OPTIONS (tool->tool_info->tool_options);
|
||||
|
||||
draw_tool = GIMP_DRAW_TOOL (tool);
|
||||
options = GIMP_VECTOR_OPTIONS (tool->tool_info->tool_options);
|
||||
|
||||
vector_tool->modifier_lock = FALSE;
|
||||
|
||||
|
@ -1141,17 +1138,16 @@ static void
|
|||
gimp_vector_tool_status_update (GimpTool *tool,
|
||||
GimpDisplay *gdisp)
|
||||
{
|
||||
GimpVectorTool *vector_tool = GIMP_VECTOR_TOOL (tool);
|
||||
GimpDisplayShell *shell;
|
||||
GimpVectorTool *vector_tool = GIMP_VECTOR_TOOL (tool);
|
||||
|
||||
shell = tool->gdisp ? GIMP_DISPLAY_SHELL (tool->gdisp->shell) : NULL;
|
||||
gimp_tool_pop_status (tool, gdisp);
|
||||
|
||||
if (shell && shell->proximity)
|
||||
if (GIMP_DISPLAY_SHELL (gdisp->shell)->proximity)
|
||||
{
|
||||
const gchar *status = NULL;
|
||||
|
||||
switch (vector_tool->function)
|
||||
{
|
||||
{
|
||||
case VECTORS_SELECT_VECTOR:
|
||||
status = _("Click to pick path to edit.");
|
||||
break;
|
||||
|
@ -1210,8 +1206,6 @@ gimp_vector_tool_status_update (GimpTool *tool,
|
|||
|
||||
if (status)
|
||||
gimp_tool_push_status (tool, gdisp, status);
|
||||
else
|
||||
gimp_tool_pop_status (tool, gdisp);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1221,13 +1215,11 @@ gimp_vector_tool_cursor_update (GimpTool *tool,
|
|||
GdkModifierType state,
|
||||
GimpDisplay *gdisp)
|
||||
{
|
||||
GimpVectorTool *vector_tool;
|
||||
GimpVectorTool *vector_tool = GIMP_VECTOR_TOOL (tool);
|
||||
GimpCursorType cursor;
|
||||
GimpToolCursorType tool_cursor;
|
||||
GimpCursorModifier cmodifier;
|
||||
|
||||
vector_tool = GIMP_VECTOR_TOOL (tool);
|
||||
|
||||
cursor = GIMP_CURSOR_MOUSE;
|
||||
tool_cursor = GIMP_TOOL_CURSOR_PATHS;
|
||||
cmodifier = GIMP_CURSOR_MODIFIER_NONE;
|
||||
|
|
Loading…
Reference in New Issue