[gimp] app: handle GimpToolWidget::message in GimpToolWidgetGroup
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: handle GimpToolWidget::message in GimpToolWidgetGroup
- Date: Sun, 13 Jan 2019 13:17:37 +0000 (UTC)
commit 00a06f94be6a1c86a8d0056f4656480d9a706bbd
Author: Ell <ell_se yahoo com>
Date: Sun Jan 13 03:37:01 2019 -0500
app: handle GimpToolWidget::message in GimpToolWidgetGroup
... by forwarding the message, if the emitting widget has focus.
app/display/gimptoolwidgetgroup.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
---
diff --git a/app/display/gimptoolwidgetgroup.c b/app/display/gimptoolwidgetgroup.c
index 8fcb162d8c..d62f4c926b 100644
--- a/app/display/gimptoolwidgetgroup.c
+++ b/app/display/gimptoolwidgetgroup.c
@@ -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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]