Commit 265071f3 authored by Ell's avatar Ell

app: handle GimpToolWidget::message in GimpDrawTool

... by forwarding the message to the tool.
parent 00a06f94
......@@ -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);
......
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