app: clean up the desaturate cruft removal to look like the others

This commit is contained in:
Michael Natterer
2012-03-14 00:52:32 +01:00
parent aa07344d56
commit 8684b87f04
2 changed files with 7 additions and 14 deletions

View File

@ -36,7 +36,7 @@ gimp_drawable_desaturate (GimpDrawable *drawable,
GimpProgress *progress, GimpProgress *progress,
GimpDesaturateMode mode) GimpDesaturateMode mode)
{ {
GeglNode *desaturate; GeglNode *node;
GObject *config; GObject *config;
g_return_if_fail (GIMP_IS_DRAWABLE (drawable)); 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 (progress == NULL || GIMP_IS_PROGRESS (progress));
g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable))); g_return_if_fail (gimp_item_is_attached (GIMP_ITEM (drawable)));
desaturate = g_object_new (GEGL_TYPE_NODE, node = g_object_new (GEGL_TYPE_NODE,
"operation", "gimp:desaturate", "operation", "gimp:desaturate",
NULL); NULL);
config = g_object_new (GIMP_TYPE_DESATURATE_CONFIG, config = g_object_new (GIMP_TYPE_DESATURATE_CONFIG,
"mode", mode, "mode", mode,
NULL); NULL);
gegl_node_set (desaturate, gegl_node_set (node,
"config", config, "config", config,
NULL); NULL);
g_object_unref (config); g_object_unref (config);
gimp_drawable_apply_operation (drawable, progress, _("Desaturate"), gimp_drawable_apply_operation (drawable, progress, _("Desaturate"),
desaturate, TRUE); node, TRUE);
g_object_unref (desaturate); g_object_unref (node);
} }

View File

@ -48,7 +48,6 @@ static gboolean gimp_desaturate_tool_initialize (GimpTool *tool,
static GeglNode * gimp_desaturate_tool_get_operation (GimpImageMapTool *im_tool, static GeglNode * gimp_desaturate_tool_get_operation (GimpImageMapTool *im_tool,
GObject **config); 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_dialog (GimpImageMapTool *im_tool);
static void gimp_desaturate_tool_config_notify (GObject *object, 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->dialog_desc = _("Desaturate (Remove Colors)");
im_tool_class->get_operation = gimp_desaturate_tool_get_operation; 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; im_tool_class->dialog = gimp_desaturate_tool_dialog;
} }
@ -160,11 +158,6 @@ gimp_desaturate_tool_get_operation (GimpImageMapTool *image_map_tool,
return node; return node;
} }
static void
gimp_desaturate_tool_map (GimpImageMapTool *image_map_tool)
{
}
/***********************/ /***********************/
/* Desaturate dialog */ /* Desaturate dialog */