void tools_color_average_radius_cmd_callback (GtkAction *action, gint value, gpointer data) { GimpContext *context; GimpToolInfo *tool_info; return_if_no_context (context, data); tool_info = gimp_context_get_tool (context); if (tool_info && GIMP_IS_COLOR_OPTIONS (tool_info->tool_options)) { action_select_property ((GimpActionSelectType) value, G_OBJECT (tool_info->tool_options), "average-radius", 1.0, 1.0, 10.0, FALSE); } }
void gimp_color_tool_enable (GimpColorTool *color_tool, GimpColorOptions *options) { GimpTool *tool; g_return_if_fail (GIMP_IS_COLOR_TOOL (color_tool)); g_return_if_fail (GIMP_IS_COLOR_OPTIONS (options)); tool = GIMP_TOOL (color_tool); if (gimp_tool_control_is_active (tool->control)) { g_warning ("Trying to enable GimpColorTool while it is active."); return; } if (color_tool->options) g_object_unref (color_tool->options); color_tool->options = g_object_ref (options); color_tool->enabled = TRUE; }