Hello,

> Well... in every devel release, with gimp perl, I've been getting messages
> like these below:
> "xachshadow.pl: Unable to grok '0' as colour specifier at
> /usr/local/lib/gimp/1.1/xachshadow.pl line 76 (ERROR)"
>
> "script.pl, argument type Gimp::Drawable, Gimp::Layer or Gimp::Channel
> expected (not Gimp::Image) at /usr/local/lib/gimp/1.1/script.pl line X
> (ERROR)"

The patch below, which I send some days ago, should fix this bugs (at
least I hope so). In detail, the patch addresses the following things
in Gimp V1.1.13:

  - In the gif-plugin the Cancel-Button only deletes the button and
    does not abort the dialog.

  - In different plugins written in Perl the auto import tag was
    missing.

  - In the blowinout and the windify plugins different plugins were
    called with 1 for RUN_NONINTERACTIVE. If I recall correctly, the
    result of this was the "argument type Gimp::Drawable ...".

  - In the guidegrid plugin an update of the image was missing. I
    inserted a call to gimp_drawable_update.

  - In the logulator plugin the scripts were registered under
    <Toolbox>/Xtns/... .

  - Scripts in the logulator plugin which only had the arguments
    text_string, font_size_pixels, and font did not get defaults for
    this arguments.

  - In different Perl-plugins the plugins sparkle, nova, and grid were
    called with a wrong amount of arguments. The result of this bug in
    xachshadow.pl was the "Unable to grok '0'".

Regards,

  Frank

diff -ru orig/gimp-1.1.13/plug-ins/common/gif.c gimp-1.1.13/plug-ins/common/gif.c
--- orig/gimp-1.1.13/plug-ins/common/gif.c      Sat Nov 27 06:44:25 1999
+++ gimp-1.1.13/plug-ins/common/gif.c   Sat Nov 27 05:10:30 1999
@@ -1301,9 +1301,9 @@
 
   button = gtk_button_new_with_label (_("Cancel"));
   GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
-  gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
-                            (GtkSignalFunc) save_cancel_callback,
-                            dlg);
+  gtk_signal_connect (GTK_OBJECT (button), "clicked",
+                     (GtkSignalFunc) save_cancel_callback,
+                     dlg);
   gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
   gtk_widget_show (button);
 
diff -ru orig/gimp-1.1.13/plug-ins/perl/examples/blowinout.pl 
gimp-1.1.13/plug-ins/perl/examples/blowinout.pl
--- orig/gimp-1.1.13/plug-ins/perl/examples/blowinout.pl        Mon Sep 13 17:05:10 
1999
+++ gimp-1.1.13/plug-ins/perl/examples/blowinout.pl     Sat Nov 27 09:22:27 1999
@@ -3,7 +3,7 @@
 # Blow In/Out
 # John Pitney
 
-use Gimp 1.06;
+use Gimp qw(:auto __);
 use Gimp::Fu;
 
 # print "hello there\n";
@@ -44,11 +44,11 @@
         $i * $distance / $nsteps * sin($angle * 3.14159 / 180) :
         $distance ** ($i/$nsteps) * sin($angle * 3.14159 / 180);
     gimp_edit_clear($dmlayer);
-    plug_in_noisify(1, $dm, $dmlayer, 0, 255, 255, 255, 0);
+    plug_in_noisify($dm, $dmlayer, 0, 255, 255, 255, 0);
     gimp_levels($dmlayer, 0, 0, 255, 1.0, 128, 255);
     $drawable = gimp_layer_copy($drawable, 0);
     gimp_image_add_layer($img, $drawable, -1);
-    plug_in_displace(1, $img, $drawable, $xdist, $ydist, 1, 1, $dmlayer,
+    plug_in_displace($img, $drawable, $xdist, $ydist, 1, 1, $dmlayer,
         $dmlayer, 1);
     if ( $inmode == 1 )
     {
@@ -62,11 +62,11 @@
             $i * $distance / $nsteps * sin($angle * 3.14159 / 180) :
             $distance ** ($i/$nsteps) * sin($angle * 3.14159 / 180);
         gimp_edit_clear($dmlayer);
-        plug_in_noisify(1, $dm, $dmlayer, 0, 255, 255, 255, 0);
+        plug_in_noisify($dm, $dmlayer, 0, 255, 255, 255, 0);
         gimp_levels($dmlayer, 0, 0, 255, 1.0, 128, 255);
         $drawable = gimp_layer_copy($drawable, 0);
         gimp_image_add_layer($img, $drawable, -1);
-        plug_in_displace(1, $img, $drawable, $xdist, $ydist, 1, 1, $dmlayer,
+        plug_in_displace($img, $drawable, $xdist, $ydist, 1, 1, $dmlayer,
             $dmlayer, 1);
         if ( $inmode == 1 )
         {
diff -ru orig/gimp-1.1.13/plug-ins/perl/examples/fit-text 
gimp-1.1.13/plug-ins/perl/examples/fit-text
--- orig/gimp-1.1.13/plug-ins/perl/examples/fit-text    Sat Nov 27 06:44:30 1999
+++ gimp-1.1.13/plug-ins/perl/examples/fit-text Sat Nov 27 09:53:05 1999
@@ -13,7 +13,7 @@
 # 7/15/99: added support if the user selects in pixels (assumes 72 dpi - deal)
 #          and tuned it a bit more <[EMAIL PROTECTED]>
 
-use Gimp;
+use Gimp qw(:auto __);
 use Gimp::Fu;
 use Gimp::Util;
 
diff -ru orig/gimp-1.1.13/plug-ins/perl/examples/guidegrid 
gimp-1.1.13/plug-ins/perl/examples/guidegrid
--- orig/gimp-1.1.13/plug-ins/perl/examples/guidegrid   Mon Sep 13 17:05:10 1999
+++ gimp-1.1.13/plug-ins/perl/examples/guidegrid        Sat Nov 27 18:29:17 1999
@@ -12,7 +12,7 @@
 # 12/7/99 <[EMAIL PROTECTED]>
 # Changed the display code in C and got rid of ugly hack in perl.
 #
-use Gimp;
+use Gimp qw(:auto __);
 use Gimp::Fu;
 use Gimp::Util;
 
@@ -78,7 +78,8 @@
     ##
     #$img->selection_all();
     #$img->selection_none();
-    
+    gimp_drawable_update($layer, 0, 0, $img->height, $img->width);
+
     return();
   };
 exit main;
diff -ru orig/gimp-1.1.13/plug-ins/perl/examples/innerbevel 
gimp-1.1.13/plug-ins/perl/examples/innerbevel
--- orig/gimp-1.1.13/plug-ins/perl/examples/innerbevel  Sat Nov 27 06:44:30 1999
+++ gimp-1.1.13/plug-ins/perl/examples/innerbevel       Sat Nov 27 19:42:43 1999
@@ -7,7 +7,7 @@
 # working btw).  You can follow step by step with the website at 
 # http://tigert.gimp.org/gimp/tutorials/beveled_text/
 
-use Gimp;
+use Gimp qw(:auto __);
 use Gimp::Fu;
 use Gimp::Util;
 
diff -ru orig/gimp-1.1.13/plug-ins/perl/examples/logulator 
gimp-1.1.13/plug-ins/perl/examples/logulator
--- orig/gimp-1.1.13/plug-ins/perl/examples/logulator   Sat Nov 27 06:44:30 1999
+++ gimp-1.1.13/plug-ins/perl/examples/logulator        Sun Nov 28 19:30:58 1999
@@ -14,7 +14,7 @@
       $menupath,$imagetypes,$params,$code)=@_;
    $function =~ s%^perl_fu_%logulator_% or die;
    my $mp = __"<Image>/Filters/Logulator";
-   $menupath =~ s%([^/]+)$%$mp/$1% or die;
+   $menupath =~ s%^.*/(.+$)%$mp/$1% or die;
    my($i,$j)=0;
    my($ti,$fsi,$fi);
    $i=@$params;
@@ -56,7 +56,7 @@
       my($image,$drawable)=(shift,shift);
       $drawable->has_alpha or die "It makes no sense to call $menupath with a 
drawable lacking alpha!\n";
       $i=0;
-      while($i<@_) {
+      while($i<=@_) {
          if($i==$ti) {
             splice @_,$i,0,"-- Text --";
          } elsif ($i==$fsi) {
@@ -1234,7 +1234,9 @@
       plug_in_noisify ($img, $sparkle_layer, 0, 0.2, 0.2, 0.2, 0.0);
       plug_in_c_astretch ($img, $sparkle_layer);
       gimp_selection_none ($img);
-      plug_in_sparkle ($img, $sparkle_layer, 0.03, 0.45, min ($width, $height) / 2, 
6, 15);
+      plug_in_sparkle ($img, $sparkle_layer, 0.03, 0.45, min ($width, $height) / 2, 
+6, 15,
+                      1.0, 1.0, 0.0, 0.0, 0, 0, 0, 0);
+
       gimp_levels ($sparkle_layer, 1, 0, 255, 0.2, 0, 255);
       gimp_levels ($sparkle_layer, 2, 0, 255, 0.7, 0, 255);
       gimp_selection_layer_alpha ($sparkle_layer);
@@ -2193,7 +2195,7 @@
       gimp_palette_set_background ([255, 255, 255]);
       gimp_edit_fill ($layer_mask);
       gimp_selection_none ($img);
-      plug_in_nova ($img, $burst_layer, @{$burst_coords}[0], cdr ($burst_coords), 
$burst_color, $burstradius, 100);
+      plug_in_nova ($img, $burst_layer, @{$burst_coords}[0], cdr ($burst_coords), 
+$burst_color, $burstradius, 100, 0);
       gimp_selection_layer_alpha ($text_layer);
       gimp_palette_set_background ([0, 0, 0]);
       gimp_selection_feather ($img, $feather);
@@ -2329,7 +2331,7 @@
       gimp_palette_set_background ([31, 31, 31]);
       gimp_palette_set_foreground ([255, 255, 255]);
       gimp_blend ($text_layer, FG_BG_RGB, NORMAL_MODE, BILINEAR, 100, 0, REPEAT_NONE, 
0, 0, 0, $cx, $cy, $bx, $by);
-      plug_in_nova ($img, $glow_layer, $novax, $novay, $glow_color, $novaradius, 100);
+      plug_in_nova ($img, $glow_layer, $novax, $novay, $glow_color, $novaradius, 100, 
+0);
       gimp_selection_all ($img);
       gimp_patterns_set_pattern ("Stone");
       gimp_bucket_fill ($bump_channel, PATTERN_BUCKET_FILL, NORMAL_MODE, 100, 0, 0, 
0, 0);
@@ -2398,7 +2400,8 @@
       gimp_selection_border ($img, $edge_size);
       plug_in_noisify ($img, $sparkle_layer, 0, $hit_rate, $hit_rate, $hit_rate, 0.0);
       gimp_selection_none ($img);
-      plug_in_sparkle ($img, $sparkle_layer, 0.03, 0.45, $width, 6, 15);
+      plug_in_sparkle ($img, $sparkle_layer, 0.03, 0.45, $width, 6, 15,
+                      1.0, 1.0, 0.0, 0.0, 0, 0, 0, 0);
       gimp_selection_load ($selection);
       gimp_selection_shrink ($img, $edge_size);
       gimp_levels ($sparkle_layer, 0, 0, 255, 1.2, 0, 255);
diff -ru orig/gimp-1.1.13/plug-ins/perl/examples/perlotine 
gimp-1.1.13/plug-ins/perl/examples/perlotine
--- orig/gimp-1.1.13/plug-ins/perl/examples/perlotine   Sat Nov 27 06:44:30 1999
+++ gimp-1.1.13/plug-ins/perl/examples/perlotine        Sat Nov 27 19:18:09 1999
@@ -21,7 +21,7 @@
 # If you have more additions, etc please don't hesitate to send them in!
 
 
-use Gimp;
+use Gimp qw(:auto __);
 use Gimp::Fu;
 use Gimp::Util;
 
@@ -86,7 +86,7 @@
        # do this: fs/low-bleed dither, make palette, 256 colors, 
        # dont dither alpha, do remove unused (is 1 "true" here?),
        # custom palette is ignored (we create our own, thus "duck" works).
-        $tmpimg->convert_indexed (2,0,256,0,1,duck) 
+        $tmpimg->convert_indexed (2,0,255,0,1,duck) 
        }
     
$tmpimg->gimp_file_save(-1,"$savepath$imgpath$imgname","$savepath$imgpath$imgname");
     $tmpimg->delete;
diff -ru orig/gimp-1.1.13/plug-ins/perl/examples/randomblends 
gimp-1.1.13/plug-ins/perl/examples/randomblends
--- orig/gimp-1.1.13/plug-ins/perl/examples/randomblends        Sat Nov 27 06:44:30 
1999
+++ gimp-1.1.13/plug-ins/perl/examples/randomblends     Sat Nov 27 15:09:35 1999
@@ -3,7 +3,7 @@
 # This is adrian's idea - take random blends and difference them.  You're
 # bound to come up w/ something cool eventually.
 
-use Gimp;
+use Gimp qw(:auto __);
 use Gimp::Fu;
 use Gimp::Util;
 
diff -ru orig/gimp-1.1.13/plug-ins/perl/examples/windify.pl 
gimp-1.1.13/plug-ins/perl/examples/windify.pl
--- orig/gimp-1.1.13/plug-ins/perl/examples/windify.pl  Sat Nov 27 06:44:30 1999
+++ gimp-1.1.13/plug-ins/perl/examples/windify.pl       Sat Nov 27 09:27:42 1999
@@ -3,7 +3,7 @@
 # sent to me by Seth Burgess <[EMAIL PROTECTED]>
 # small changes my Marc Lehmann <[EMAIL PROTECTED]>
 
-use Gimp;
+use Gimp qw(:auto __);
 use Gimp::Fu;
 
 #Gimp::set_trace(TRACE_CALL);
@@ -21,11 +21,11 @@
        gimp_image_add_layer($out,$windlayer,0);
        my $windlayercopy = gimp_layer_copy($windlayer, 1);
        gimp_image_add_layer($out,$windlayercopy,0);
-       plug_in_noisify(1,$out,$windlayercopy,0,$density/255,
+       plug_in_noisify($out,$windlayercopy,0,$density/255,
                                                 $density/255,
                                                 $density/255,1);
 
-       plug_in_mblur(1,$out,$windlayercopy,0,15,$angle);
+       plug_in_mblur($out,$windlayercopy,0,15,$angle);
        gimp_layer_set_mode($windlayercopy, 10); # Lighten Only
        gimp_image_merge_visible_layers($out,0);
 
@@ -33,7 +33,7 @@
 # gimp_image_merge_visible_layers bug
 
        my $newlay = gimp_image_get_active_layer ($out);
-       plug_in_displace(1,$img,$drawable,-$distance*cos($angle*180/3.14159),
+       plug_in_displace($img,$drawable,-$distance*cos($angle*180/3.14159),
                                           $distance*sin($angle*180/3.14159),
                                          1,1, $newlay,$newlay, $wrap);
        gimp_image_remove_layer($out,$newlay);
diff -ru orig/gimp-1.1.13/plug-ins/perl/examples/xachlego.pl 
gimp-1.1.13/plug-ins/perl/examples/xachlego.pl
--- orig/gimp-1.1.13/plug-ins/perl/examples/xachlego.pl Sat Nov 27 06:44:30 1999
+++ gimp-1.1.13/plug-ins/perl/examples/xachlego.pl      Sat Nov 27 09:39:51 1999
@@ -29,7 +29,7 @@
 #                   in a directory more suitable than the lame "Misc"
 # Here's the boring start of every script...
 
-use Gimp;
+use Gimp qw(:auto __);
 use Gimp::Fu;
 
 register "xach_blocks",
@@ -71,7 +71,8 @@
        gimp_edit_clear($gridlayer);
        gimp_palette_set_background([255,255,255]);
        gimp_edit_fill($gridlayer);
-       $gridlayer->plug_in_grid($blocksize, $blocksize, 0, 0);
+       $gridlayer->plug_in_grid(1,$blocksize,0,[0,0,0],255, 
+1,$blocksize,0,[0,0,0],255,
+                                0,0,0,[0,0,0],255);
        $gridlayer->plug_in_gauss_iir(0.7*$blocksize, 1, 1);
 
 #      threshold the 
@@ -93,7 +94,8 @@
                                  RGBA_IMAGE, "Grid 2", 100, 0);
        $img->add_layer($cleangrid,0);
        gimp_edit_fill($cleangrid);
-       $cleangrid->plug_in_grid($blocksize, $blocksize, 0, 0);
+       $cleangrid->plug_in_grid(1,$blocksize,0,[0,0,0],255, 
+1,$blocksize,0,[0,0,0],255,
+                                0,0,0,[0,0,0],255);
        gimp_selection_load($selection);
        $drawable->plug_in_bump_map($cleangrid, 135, 45, 3, 0, 0, 0, 0, 1, 0, 0);
        $img->selection_all;    
diff -ru orig/gimp-1.1.13/plug-ins/perl/examples/xachshadow.pl 
gimp-1.1.13/plug-ins/perl/examples/xachshadow.pl
--- orig/gimp-1.1.13/plug-ins/perl/examples/xachshadow.pl       Sat Nov 27 06:44:30 
1999
+++ gimp-1.1.13/plug-ins/perl/examples/xachshadow.pl    Sat Nov 27 09:43:08 1999
@@ -22,7 +22,7 @@
 #
 # Here's the boring start of every script...
 
-use Gimp;
+use Gimp qw(:auto __);
 use Gimp::Fu;
 
 register "xach_shadows",
@@ -70,7 +70,8 @@
        gimp_edit_clear($gridlayer);
        gimp_palette_set_background([255,255,255]);
        gimp_edit_fill($gridlayer);
-       $gridlayer->plug_in_grid($blocksize, $blocksize, 0, 0);
+       $gridlayer->plug_in_grid(1,$blocksize,0,[0,0,0],255, 
+1,$blocksize,0,[0,0,0],255,
+                                0,0,0,[0,0,0],255);
 
        gimp_layer_set_mode($gridlayer, 3);
 # Clean up stuff
diff -ru orig/gimp-1.1.13/plug-ins/perl/examples/xachvision.pl 
gimp-1.1.13/plug-ins/perl/examples/xachvision.pl
--- orig/gimp-1.1.13/plug-ins/perl/examples/xachvision.pl       Mon Sep 13 17:05:10 
1999
+++ gimp-1.1.13/plug-ins/perl/examples/xachvision.pl    Sat Nov 27 06:56:32 1999
@@ -3,7 +3,7 @@
 # Once again, an effect of Xach's
 # Created by Seth Burgess <[EMAIL PROTECTED]>
 
-use Gimp;
+use Gimp ':auto';
 use Gimp::Fu;
 
 register "xachvision",
@@ -41,7 +41,8 @@
        $midlayer->plug_in_noisify(1,$amt, $amt, $amt, $amt);
        $midmask = $midlayer->create_mask(0);
        $img->add_layer_mask($midlayer, $midmask);
-       $midmask->plug_in_grid($img->height * 3, 3, 0, 0);
+       $midmask->plug_in_grid(1,$img->height * 3,0,[0,0,0],255, 1,3,0,[0,0,0],255,
+                              0,0,0,[0,0,0],255 );
        $midmask->plug_in_gauss_iir(1.01, 1, 1);
 
        gimp_palette_set_background($oldbackground);

Reply via email to