[gimp] pdb: clean up the channel mixel PDB compat proc
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] pdb: clean up the channel mixel PDB compat proc
- Date: Mon, 18 Jan 2016 01:15:48 +0000 (UTC)
commit 37dd1778ad4f87d86e5d70322b14903edd1570b1
Author: Michael Natterer <mitch gimp org>
Date: Mon Jan 18 02:14:49 2016 +0100
pdb: clean up the channel mixel PDB compat proc
Fix indentation, remove unneeded casts.
app/pdb/plug-in-compat-cmds.c | 61 +++++++++++++++++------------------
tools/pdbgen/pdb/plug_in_compat.pdb | 61 +++++++++++++++++------------------
2 files changed, 60 insertions(+), 62 deletions(-)
---
diff --git a/app/pdb/plug-in-compat-cmds.c b/app/pdb/plug-in-compat-cmds.c
index 032a0c2..d0b8545 100644
--- a/app/pdb/plug-in-compat-cmds.c
+++ b/app/pdb/plug-in-compat-cmds.c
@@ -912,38 +912,37 @@ plug_in_colors_channel_mixer_invoker (GimpProcedure *procedure,
GIMP_PDB_ITEM_CONTENT, error) &&
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
{
- GeglNode *node = NULL;
- if ((gboolean) monochrome)
+ GeglNode *node = NULL;
+
+ if (monochrome)
+ {
+ node = gegl_node_new_child (NULL,
+ "operation", "gegl:mono-mixer",
+ "red", rr_gain,
+ "green", rg_gain,
+ "blue", rb_gain,
+ NULL);
+ }
+ else
{
- node =
- gegl_node_new_child (NULL,
- "operation", "gegl:mono-mixer",
- "red", (gdouble) rr_gain,
- "green", (gdouble) rg_gain,
- "blue", (gdouble) rb_gain,
- NULL);
- }
- else
- {
- node =
- gegl_node_new_child (NULL,
- "operation", "gegl:channel-mixer",
- "rr-gain", (gdouble) rr_gain,
- "rg-gain", (gdouble) rg_gain,
- "rb-gain", (gdouble) rb_gain,
- "gr-gain", (gdouble) gr_gain,
- "gg-gain", (gdouble) gg_gain,
- "gb-gain", (gdouble) gb_gain,
- "br-gain", (gdouble) br_gain,
- "bg-gain", (gdouble) bg_gain,
- "bb-gain", (gdouble) bb_gain,
- NULL);
- }
+ node = gegl_node_new_child (NULL,
+ "operation", "gegl:channel-mixer",
+ "rr-gain", rr_gain,
+ "rg-gain", rg_gain,
+ "rb-gain", rb_gain,
+ "gr-gain", gr_gain,
+ "gg-gain", gg_gain,
+ "gb-gain", gb_gain,
+ "br-gain", br_gain,
+ "bg-gain", bg_gain,
+ "bb-gain", bb_gain,
+ NULL);
+ }
- gimp_drawable_apply_operation (drawable, progress,
- C_("undo-type", "Channel Mixer"),
- node);
- g_object_unref (node);
+ gimp_drawable_apply_operation (drawable, progress,
+ C_("undo-type", "Channel Mixer"),
+ node);
+ g_object_unref (node);
}
else
success = FALSE;
diff --git a/tools/pdbgen/pdb/plug_in_compat.pdb b/tools/pdbgen/pdb/plug_in_compat.pdb
index 6901fd7..9c0c3bf 100644
--- a/tools/pdbgen/pdb/plug_in_compat.pdb
+++ b/tools/pdbgen/pdb/plug_in_compat.pdb
@@ -657,38 +657,37 @@ HELP
GIMP_PDB_ITEM_CONTENT, error) &&
gimp_pdb_item_is_not_group (GIMP_ITEM (drawable), error))
{
- GeglNode *node = NULL;
- if ((gboolean) monochrome)
+ GeglNode *node = NULL;
+
+ if (monochrome)
+ {
+ node = gegl_node_new_child (NULL,
+ "operation", "gegl:mono-mixer",
+ "red", rr_gain,
+ "green", rg_gain,
+ "blue", rb_gain,
+ NULL);
+ }
+ else
{
- node =
- gegl_node_new_child (NULL,
- "operation", "gegl:mono-mixer",
- "red", (gdouble) rr_gain,
- "green", (gdouble) rg_gain,
- "blue", (gdouble) rb_gain,
- NULL);
- }
- else
- {
- node =
- gegl_node_new_child (NULL,
- "operation", "gegl:channel-mixer",
- "rr-gain", (gdouble) rr_gain,
- "rg-gain", (gdouble) rg_gain,
- "rb-gain", (gdouble) rb_gain,
- "gr-gain", (gdouble) gr_gain,
- "gg-gain", (gdouble) gg_gain,
- "gb-gain", (gdouble) gb_gain,
- "br-gain", (gdouble) br_gain,
- "bg-gain", (gdouble) bg_gain,
- "bb-gain", (gdouble) bb_gain,
- NULL);
- }
+ node = gegl_node_new_child (NULL,
+ "operation", "gegl:channel-mixer",
+ "rr-gain", rr_gain,
+ "rg-gain", rg_gain,
+ "rb-gain", rb_gain,
+ "gr-gain", gr_gain,
+ "gg-gain", gg_gain,
+ "gb-gain", gb_gain,
+ "br-gain", br_gain,
+ "bg-gain", bg_gain,
+ "bb-gain", bb_gain,
+ NULL);
+ }
- gimp_drawable_apply_operation (drawable, progress,
- C_("undo-type", "Channel Mixer"),
- node);
- g_object_unref (node);
+ gimp_drawable_apply_operation (drawable, progress,
+ C_("undo-type", "Channel Mixer"),
+ node);
+ g_object_unref (node);
}
else
success = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]