app: add gimp_tool_widget_changed()
... which emits the "changed" signal, for use in subclasses to notify the tool about widget changes not resulting from property changes.
This commit is contained in:
@ -281,11 +281,13 @@ gimp_tool_widget_properties_changed (GObject *object,
|
|||||||
guint n_pspecs,
|
guint n_pspecs,
|
||||||
GParamSpec **pspecs)
|
GParamSpec **pspecs)
|
||||||
{
|
{
|
||||||
|
GimpToolWidget *widget = GIMP_TOOL_WIDGET (object);
|
||||||
|
|
||||||
G_OBJECT_CLASS (parent_class)->dispatch_properties_changed (object,
|
G_OBJECT_CLASS (parent_class)->dispatch_properties_changed (object,
|
||||||
n_pspecs,
|
n_pspecs,
|
||||||
pspecs);
|
pspecs);
|
||||||
|
|
||||||
g_signal_emit (object, widget_signals[CHANGED], 0);
|
gimp_tool_widget_changed (widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -362,6 +364,14 @@ gimp_tool_widget_get_focus (GimpToolWidget *widget)
|
|||||||
return widget->private->focus;
|
return widget->private->focus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gimp_tool_widget_changed (GimpToolWidget *widget)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GIMP_IS_TOOL_WIDGET (widget));
|
||||||
|
|
||||||
|
g_signal_emit (widget, widget_signals[CHANGED], 0);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gimp_tool_widget_response (GimpToolWidget *widget,
|
gimp_tool_widget_response (GimpToolWidget *widget,
|
||||||
gint response_id)
|
gint response_id)
|
||||||
|
@ -131,6 +131,8 @@ gboolean gimp_tool_widget_get_focus (GimpToolWidget *widget);
|
|||||||
|
|
||||||
/* for subclasses, to notify the handling tool
|
/* for subclasses, to notify the handling tool
|
||||||
*/
|
*/
|
||||||
|
void gimp_tool_widget_changed (GimpToolWidget *widget);
|
||||||
|
|
||||||
void gimp_tool_widget_response (GimpToolWidget *widget,
|
void gimp_tool_widget_response (GimpToolWidget *widget,
|
||||||
gint response_id);
|
gint response_id);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user