Commit 00a06f94 authored by Ell's avatar Ell

app: handle GimpToolWidget::message in GimpToolWidgetGroup

... by forwarding the message, if the emitting widget has focus.
parent 1ac4b85c
......@@ -123,6 +123,9 @@ static void gimp_tool_widget_group_child_status_coords (GimpToolWidg
gdouble y,
const gchar *help,
GimpToolWidgetGroup *group);
static void gimp_tool_widget_group_child_message (GimpToolWidget *child,
const gchar *message,
GimpToolWidgetGroup *group);
static void gimp_tool_widget_group_child_focus_changed (GimpToolWidget *child,
GimpToolWidgetGroup *group);
......@@ -201,6 +204,9 @@ gimp_tool_widget_group_init (GimpToolWidgetGroup *group)
gimp_container_add_handler (priv->children, "status-coords",
G_CALLBACK (gimp_tool_widget_group_child_status_coords),
group);
gimp_container_add_handler (priv->children, "message",
G_CALLBACK (gimp_tool_widget_group_child_message),
group);
gimp_container_add_handler (priv->children, "focus-changed",
G_CALLBACK (gimp_tool_widget_group_child_focus_changed),
group);
......@@ -596,6 +602,18 @@ gimp_tool_widget_group_child_status_coords (GimpToolWidget *child,
gimp_tool_widget_set_status_coords (widget, title, x, separator, y, help);
}
static void
gimp_tool_widget_group_child_message (GimpToolWidget *child,
const gchar *message,
GimpToolWidgetGroup *group)
{
GimpToolWidgetGroupPrivate *priv = group->priv;
GimpToolWidget *widget = GIMP_TOOL_WIDGET (group);
if (priv->focus_widget == child)
gimp_tool_widget_message_literal (widget, message);
}
static void
gimp_tool_widget_group_child_focus_changed (GimpToolWidget *child,
GimpToolWidgetGroup *group)
......
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