[gimp/blend-tool-fun: 159/163] plug-ins: decompose: move "run_mode" to a local scope
- From: Michael Henning <mhenning src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/blend-tool-fun: 159/163] plug-ins: decompose: move "run_mode" to a local scope
- Date: Mon, 26 Oct 2015 02:31:36 +0000 (UTC)
commit f3ac14e4a665b480fc1352c5492f841bf3f7d924
Author: Michael Natterer <mitch gimp org>
Date: Sun Oct 25 23:46:56 2015 +0100
plug-ins: decompose: move "run_mode" to a local scope
and some tiny cleanups.
plug-ins/common/decompose.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/plug-ins/common/decompose.c b/plug-ins/common/decompose.c
index a89bd78..59c8524 100644
--- a/plug-ins/common/decompose.c
+++ b/plug-ins/common/decompose.c
@@ -224,11 +224,10 @@ static DecoVals decovals =
FALSE /* use registration color */
};
-static GimpRunMode run_mode;
-
MAIN ()
+
static void
query (void)
{
@@ -312,6 +311,7 @@ run (const gchar *name,
{
static GimpParam values[MAX_EXTRACT_IMAGES + 1];
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
+ GimpRunMode run_mode;
gint32 num_images;
gint32 image_ID_extract[MAX_EXTRACT_IMAGES];
gint32 layer_ID_extract[MAX_EXTRACT_IMAGES];
@@ -897,7 +897,9 @@ decompose_dialog (void)
/* Build a filename like <imagename>-<channel>.<extension> */
gchar *
-generate_filename (guint32 image_ID, guint colorspace, guint channel)
+generate_filename (guint32 image_ID,
+ guint colorspace,
+ guint channel)
{
/* Build a filename like <imagename>-<channel>.<extension> */
gchar *fname;
@@ -912,9 +914,11 @@ generate_filename (guint32 image_ID, guint colorspace, guint channel)
while (extension >= fname)
{
- if (*extension == '.') break;
+ if (*extension == '.')
+ break;
extension--;
}
+
if (extension >= fname)
{
*(extension++) = '\0';
@@ -942,6 +946,8 @@ generate_filename (guint32 image_ID, guint colorspace, guint channel)
{
filename = g_strdup (gettext (extract[colorspace].component[channel].channel_name));
}
+
g_free (fname);
+
return filename;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]