mirror of https://github.com/GNOME/gimp.git
emboss/emboss.c hot/hot.c nlfilt/nlfilt.c:
fix `re-run with last args' to operate on the current image/drawable pat/pat.c: fix handling of pattern name when called non-interactively
This commit is contained in:
parent
da44cf3bef
commit
1c979b5784
|
@ -194,6 +194,9 @@ run(gchar *name, gint nparam, GParam *param,
|
||||||
|
|
||||||
case RUN_WITH_LAST_VALS:
|
case RUN_WITH_LAST_VALS:
|
||||||
gimp_get_data("plug_in_emboss", &args);
|
gimp_get_data("plug_in_emboss", &args);
|
||||||
|
/* use this image and drawable, even with last args */
|
||||||
|
args.img = param[1].data.d_image;
|
||||||
|
args.drw = param[2].data.d_drawable;
|
||||||
if (pluginCore(&args)==-1) {
|
if (pluginCore(&args)==-1) {
|
||||||
rvals[0].data.d_status = STATUS_EXECUTION_ERROR;
|
rvals[0].data.d_status = STATUS_EXECUTION_ERROR;
|
||||||
}
|
}
|
||||||
|
|
|
@ -234,13 +234,14 @@ run(char *name, int nparam, GParam *param,
|
||||||
|
|
||||||
gimp_get_data("plug_in_hot", &args);
|
gimp_get_data("plug_in_hot", &args);
|
||||||
|
|
||||||
|
args.image = param[1].data.d_image;
|
||||||
|
args.drawable = param[2].data.d_drawable;
|
||||||
|
|
||||||
rvals[0].type = PARAM_STATUS;
|
rvals[0].type = PARAM_STATUS;
|
||||||
rvals[0].data.d_status = STATUS_SUCCESS;
|
rvals[0].data.d_status = STATUS_SUCCESS;
|
||||||
switch (param[0].data.d_int32) {
|
switch (param[0].data.d_int32) {
|
||||||
case RUN_INTERACTIVE:
|
case RUN_INTERACTIVE:
|
||||||
/* XXX: add code here for interactive running */
|
/* XXX: add code here for interactive running */
|
||||||
args.image = param[1].data.d_image;
|
|
||||||
args.drawable = param[2].data.d_drawable;
|
|
||||||
if(args.mode == -1) {
|
if(args.mode == -1) {
|
||||||
args.mode = mode_ntsc;
|
args.mode = mode_ntsc;
|
||||||
args.action = act_lredux;
|
args.action = act_lredux;
|
||||||
|
@ -260,8 +261,6 @@ run(char *name, int nparam, GParam *param,
|
||||||
rvals[0].data.d_status = STATUS_CALLING_ERROR;
|
rvals[0].data.d_status = STATUS_CALLING_ERROR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
args.image = param[1].data.d_image;
|
|
||||||
args.drawable = param[2].data.d_drawable;
|
|
||||||
args.mode = param[3].data.d_drawable;
|
args.mode = param[3].data.d_drawable;
|
||||||
args.action = param[4].data.d_drawable;
|
args.action = param[4].data.d_drawable;
|
||||||
|
|
||||||
|
|
|
@ -140,6 +140,8 @@ run(char *name, gint nparam, GParam *param,
|
||||||
|
|
||||||
args.radius=-1.0;
|
args.radius=-1.0;
|
||||||
gimp_get_data("plug_in_nlfilt", &args);
|
gimp_get_data("plug_in_nlfilt", &args);
|
||||||
|
args.img = param[1].data.d_image;
|
||||||
|
args.drw = param[2].data.d_drawable;
|
||||||
|
|
||||||
rvals[0].type = PARAM_STATUS;
|
rvals[0].type = PARAM_STATUS;
|
||||||
rvals[0].data.d_status = STATUS_SUCCESS;
|
rvals[0].data.d_status = STATUS_SUCCESS;
|
||||||
|
@ -147,8 +149,6 @@ run(char *name, gint nparam, GParam *param,
|
||||||
GDrawable *drw;
|
GDrawable *drw;
|
||||||
case RUN_INTERACTIVE:
|
case RUN_INTERACTIVE:
|
||||||
/* XXX: add code here for interactive running */
|
/* XXX: add code here for interactive running */
|
||||||
args.img = param[1].data.d_image;
|
|
||||||
args.drw = param[2].data.d_drawable;
|
|
||||||
if (args.radius == -1) {
|
if (args.radius == -1) {
|
||||||
args.alpha = (gdouble)0.3;
|
args.alpha = (gdouble)0.3;
|
||||||
args.radius = (gdouble)0.3;
|
args.radius = (gdouble)0.3;
|
||||||
|
@ -171,8 +171,6 @@ run(char *name, gint nparam, GParam *param,
|
||||||
rvals[0].data.d_status = STATUS_CALLING_ERROR;
|
rvals[0].data.d_status = STATUS_CALLING_ERROR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
args.img = param[1].data.d_image;
|
|
||||||
args.drw = param[2].data.d_drawable;
|
|
||||||
args.alpha = param[3].data.d_float;
|
args.alpha = param[3].data.d_float;
|
||||||
args.radius = param[4].data.d_float;
|
args.radius = param[4].data.d_float;
|
||||||
args.filter = param[5].data.d_int32;
|
args.filter = param[5].data.d_int32;
|
||||||
|
|
|
@ -152,6 +152,8 @@ run (char *name,
|
||||||
case RUN_NONINTERACTIVE:
|
case RUN_NONINTERACTIVE:
|
||||||
if (nparams != 6)
|
if (nparams != 6)
|
||||||
status = STATUS_CALLING_ERROR;
|
status = STATUS_CALLING_ERROR;
|
||||||
|
else
|
||||||
|
strcpy(description, param[5].data.d_string);
|
||||||
case RUN_WITH_LAST_VALS:
|
case RUN_WITH_LAST_VALS:
|
||||||
gimp_get_data ("file_pat_save", description);
|
gimp_get_data ("file_pat_save", description);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -194,6 +194,9 @@ run(gchar *name, gint nparam, GParam *param,
|
||||||
|
|
||||||
case RUN_WITH_LAST_VALS:
|
case RUN_WITH_LAST_VALS:
|
||||||
gimp_get_data("plug_in_emboss", &args);
|
gimp_get_data("plug_in_emboss", &args);
|
||||||
|
/* use this image and drawable, even with last args */
|
||||||
|
args.img = param[1].data.d_image;
|
||||||
|
args.drw = param[2].data.d_drawable;
|
||||||
if (pluginCore(&args)==-1) {
|
if (pluginCore(&args)==-1) {
|
||||||
rvals[0].data.d_status = STATUS_EXECUTION_ERROR;
|
rvals[0].data.d_status = STATUS_EXECUTION_ERROR;
|
||||||
}
|
}
|
||||||
|
|
|
@ -234,13 +234,14 @@ run(char *name, int nparam, GParam *param,
|
||||||
|
|
||||||
gimp_get_data("plug_in_hot", &args);
|
gimp_get_data("plug_in_hot", &args);
|
||||||
|
|
||||||
|
args.image = param[1].data.d_image;
|
||||||
|
args.drawable = param[2].data.d_drawable;
|
||||||
|
|
||||||
rvals[0].type = PARAM_STATUS;
|
rvals[0].type = PARAM_STATUS;
|
||||||
rvals[0].data.d_status = STATUS_SUCCESS;
|
rvals[0].data.d_status = STATUS_SUCCESS;
|
||||||
switch (param[0].data.d_int32) {
|
switch (param[0].data.d_int32) {
|
||||||
case RUN_INTERACTIVE:
|
case RUN_INTERACTIVE:
|
||||||
/* XXX: add code here for interactive running */
|
/* XXX: add code here for interactive running */
|
||||||
args.image = param[1].data.d_image;
|
|
||||||
args.drawable = param[2].data.d_drawable;
|
|
||||||
if(args.mode == -1) {
|
if(args.mode == -1) {
|
||||||
args.mode = mode_ntsc;
|
args.mode = mode_ntsc;
|
||||||
args.action = act_lredux;
|
args.action = act_lredux;
|
||||||
|
@ -260,8 +261,6 @@ run(char *name, int nparam, GParam *param,
|
||||||
rvals[0].data.d_status = STATUS_CALLING_ERROR;
|
rvals[0].data.d_status = STATUS_CALLING_ERROR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
args.image = param[1].data.d_image;
|
|
||||||
args.drawable = param[2].data.d_drawable;
|
|
||||||
args.mode = param[3].data.d_drawable;
|
args.mode = param[3].data.d_drawable;
|
||||||
args.action = param[4].data.d_drawable;
|
args.action = param[4].data.d_drawable;
|
||||||
|
|
||||||
|
|
|
@ -140,6 +140,8 @@ run(char *name, gint nparam, GParam *param,
|
||||||
|
|
||||||
args.radius=-1.0;
|
args.radius=-1.0;
|
||||||
gimp_get_data("plug_in_nlfilt", &args);
|
gimp_get_data("plug_in_nlfilt", &args);
|
||||||
|
args.img = param[1].data.d_image;
|
||||||
|
args.drw = param[2].data.d_drawable;
|
||||||
|
|
||||||
rvals[0].type = PARAM_STATUS;
|
rvals[0].type = PARAM_STATUS;
|
||||||
rvals[0].data.d_status = STATUS_SUCCESS;
|
rvals[0].data.d_status = STATUS_SUCCESS;
|
||||||
|
@ -147,8 +149,6 @@ run(char *name, gint nparam, GParam *param,
|
||||||
GDrawable *drw;
|
GDrawable *drw;
|
||||||
case RUN_INTERACTIVE:
|
case RUN_INTERACTIVE:
|
||||||
/* XXX: add code here for interactive running */
|
/* XXX: add code here for interactive running */
|
||||||
args.img = param[1].data.d_image;
|
|
||||||
args.drw = param[2].data.d_drawable;
|
|
||||||
if (args.radius == -1) {
|
if (args.radius == -1) {
|
||||||
args.alpha = (gdouble)0.3;
|
args.alpha = (gdouble)0.3;
|
||||||
args.radius = (gdouble)0.3;
|
args.radius = (gdouble)0.3;
|
||||||
|
@ -171,8 +171,6 @@ run(char *name, gint nparam, GParam *param,
|
||||||
rvals[0].data.d_status = STATUS_CALLING_ERROR;
|
rvals[0].data.d_status = STATUS_CALLING_ERROR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
args.img = param[1].data.d_image;
|
|
||||||
args.drw = param[2].data.d_drawable;
|
|
||||||
args.alpha = param[3].data.d_float;
|
args.alpha = param[3].data.d_float;
|
||||||
args.radius = param[4].data.d_float;
|
args.radius = param[4].data.d_float;
|
||||||
args.filter = param[5].data.d_int32;
|
args.filter = param[5].data.d_int32;
|
||||||
|
|
|
@ -152,6 +152,8 @@ run (char *name,
|
||||||
case RUN_NONINTERACTIVE:
|
case RUN_NONINTERACTIVE:
|
||||||
if (nparams != 6)
|
if (nparams != 6)
|
||||||
status = STATUS_CALLING_ERROR;
|
status = STATUS_CALLING_ERROR;
|
||||||
|
else
|
||||||
|
strcpy(description, param[5].data.d_string);
|
||||||
case RUN_WITH_LAST_VALS:
|
case RUN_WITH_LAST_VALS:
|
||||||
gimp_get_data ("file_pat_save", description);
|
gimp_get_data ("file_pat_save", description);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue