app: clean up the desaturate cruft removal to look like the others
This commit is contained in:
@ -36,7 +36,7 @@ gimp_drawable_desaturate (GimpDrawable *drawable,
|
||||
GimpProgress *progress,
|
||||
GimpDesaturateMode mode)
|
||||
{
|
||||
GeglNode *desaturate;
|
||||
GeglNode *node;
|
||||
GObject *config;
|
||||
|
||||
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
|
||||
@ -44,21 +44,21 @@ gimp_drawable_desaturate (GimpDrawable *drawable,
|
||||
g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
|
||||
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
|
||||
|
||||
desaturate = g_object_new (GEGL_TYPE_NODE,
|
||||
"operation", "gimp:desaturate",
|
||||
NULL);
|
||||
node = g_object_new (GEGL_TYPE_NODE,
|
||||
"operation", "gimp:desaturate",
|
||||
NULL);
|
||||
|
||||
config = g_object_new (GIMP_TYPE_DESATURATE_CONFIG,
|
||||
"mode", mode,
|
||||
NULL);
|
||||
|
||||
gegl_node_set (desaturate,
|
||||
gegl_node_set (node,
|
||||
"config", config,
|
||||
NULL);
|
||||
|
||||
g_object_unref (config);
|
||||
|
||||
gimp_drawable_apply_operation (drawable, progress, _("Desaturate"),
|
||||
desaturate, TRUE);
|
||||
g_object_unref (desaturate);
|
||||
node, TRUE);
|
||||
g_object_unref (node);
|
||||
}
|
||||
|
@ -48,7 +48,6 @@ static gboolean gimp_desaturate_tool_initialize (GimpTool *tool,
|
||||
|
||||
static GeglNode * gimp_desaturate_tool_get_operation (GimpImageMapTool *im_tool,
|
||||
GObject **config);
|
||||
static void gimp_desaturate_tool_map (GimpImageMapTool *im_tool);
|
||||
static void gimp_desaturate_tool_dialog (GimpImageMapTool *im_tool);
|
||||
|
||||
static void gimp_desaturate_tool_config_notify (GObject *object,
|
||||
@ -91,7 +90,6 @@ gimp_desaturate_tool_class_init (GimpDesaturateToolClass *klass)
|
||||
im_tool_class->dialog_desc = _("Desaturate (Remove Colors)");
|
||||
|
||||
im_tool_class->get_operation = gimp_desaturate_tool_get_operation;
|
||||
im_tool_class->map = gimp_desaturate_tool_map;
|
||||
im_tool_class->dialog = gimp_desaturate_tool_dialog;
|
||||
}
|
||||
|
||||
@ -160,11 +158,6 @@ gimp_desaturate_tool_get_operation (GimpImageMapTool *image_map_tool,
|
||||
return node;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_desaturate_tool_map (GimpImageMapTool *image_map_tool)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/***********************/
|
||||
/* Desaturate dialog */
|
||||
|
Reference in New Issue
Block a user