[gimp-perl] Make Gimp::Fu always process cmd-line args before possible interact().
- From: Ed J <edj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-perl] Make Gimp::Fu always process cmd-line args before possible interact().
- Date: Thu, 8 May 2014 01:14:45 +0000 (UTC)
commit c2ea00f1669cf32b2c088fbe8e157de7f9eafd58
Author: Ed J <edj src gnome org>
Date: Thu May 8 02:14:29 2014 +0100
Make Gimp::Fu always process cmd-line args before possible interact().
Gimp/Fu.pm | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/Gimp/Fu.pm b/Gimp/Fu.pm
index 76c66cc..903545b 100644
--- a/Gimp/Fu.pm
+++ b/Gimp/Fu.pm
@@ -174,10 +174,9 @@ sub string2pf($$) {
if ($arg eq 'a') {
$latest_image->get_active_drawable;
} else {
- # existing GIMP object - rely on autobless
die "Drawable % argument not integer\n"
unless $arg eq int $arg;
- $arg;
+ Gimp::Drawable->existing($arg);
}
} else {
die "Must specify drawable as %number or %a (active)\n";
@@ -223,11 +222,10 @@ Gimp::on_net {
die __"parameter '$entry->[1]' is not optional\n"
unless defined $args[$i] or $interact>0;
}
+ for my $i (0..$#args) { $args[$i] = string2pf($args[$i], $params->[$i]); }
if ($interact > 0) {
(my $res,@args)=interact($function,$blurb,$help,$params,$menupath,@args);
return unless $res;
- } else {
- for my $i (0..$#args) { $args[$i] = string2pf($args[$i], $params->[$i]); }
}
my $input_image = $args[0] if ref $args[0] eq "Gimp::Image";
my @retvals = Gimp::callback(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]