app: handle GimpToolWidget::message in GimpDrawTool
... by forwarding the message to the tool.
This commit is contained in:
@ -105,6 +105,10 @@ static void gimp_draw_tool_widget_status_coords
|
||||
gdouble y,
|
||||
const gchar *help,
|
||||
GimpTool *tool);
|
||||
static void gimp_draw_tool_widget_message
|
||||
(GimpToolWidget *widget,
|
||||
const gchar *message,
|
||||
GimpTool *tool);
|
||||
static void gimp_draw_tool_widget_snap_offsets
|
||||
(GimpToolWidget *widget,
|
||||
gint offset_x,
|
||||
@ -387,6 +391,16 @@ gimp_draw_tool_widget_status_coords (GimpToolWidget *widget,
|
||||
title, x, separator, y, help);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_draw_tool_widget_message (GimpToolWidget *widget,
|
||||
const gchar *message,
|
||||
GimpTool *tool)
|
||||
{
|
||||
GimpDrawTool *draw_tool = GIMP_DRAW_TOOL (tool);
|
||||
|
||||
gimp_tool_message_literal (tool, draw_tool->display, message);
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_draw_tool_widget_snap_offsets (GimpToolWidget *widget,
|
||||
gint offset_x,
|
||||
@ -670,6 +684,9 @@ gimp_draw_tool_set_widget (GimpDrawTool *draw_tool,
|
||||
g_signal_handlers_disconnect_by_func (draw_tool->widget,
|
||||
gimp_draw_tool_widget_status_coords,
|
||||
draw_tool);
|
||||
g_signal_handlers_disconnect_by_func (draw_tool->widget,
|
||||
gimp_draw_tool_widget_message,
|
||||
draw_tool);
|
||||
g_signal_handlers_disconnect_by_func (draw_tool->widget,
|
||||
gimp_draw_tool_widget_snap_offsets,
|
||||
draw_tool);
|
||||
@ -703,6 +720,9 @@ gimp_draw_tool_set_widget (GimpDrawTool *draw_tool,
|
||||
g_signal_connect (draw_tool->widget, "status-coords",
|
||||
G_CALLBACK (gimp_draw_tool_widget_status_coords),
|
||||
draw_tool);
|
||||
g_signal_connect (draw_tool->widget, "message",
|
||||
G_CALLBACK (gimp_draw_tool_widget_message),
|
||||
draw_tool);
|
||||
g_signal_connect (draw_tool->widget, "snap-offsets",
|
||||
G_CALLBACK (gimp_draw_tool_widget_snap_offsets),
|
||||
draw_tool);
|
||||
|
||||
Reference in New Issue
Block a user