[gimp-perl] PS is plugin, not extension; remove obsolete files. Bug 727568



commit 6c10f29152351b4b594c05137ddf3592f645cb11
Author: Ed J <m8r-35s8eo mailinator com>
Date:   Thu Apr 3 23:58:28 2014 +0100

    PS is plugin, not extension; remove obsolete files. Bug 727568

 MANIFEST             |    1 -
 Net/Net.pm           |    8 +-
 TODO                 |    4 +-
 examples/Perl-Server |   51 +++++----------
 examples/testall     |  171 --------------------------------------------------
 extra.c              |   56 ----------------
 6 files changed, 23 insertions(+), 268 deletions(-)
---
diff --git a/MANIFEST b/MANIFEST
index 4f7edd9..f5a7859 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -84,7 +84,6 @@ examples/selective_sharpen
 examples/sethspin
 examples/stampify
 examples/stamps
-examples/testall
 examples/tex-to-float
 examples/translogo
 examples/triangle
diff --git a/Net/Net.pm b/Net/Net.pm
index 1c64306..e6af57c 100644
--- a/Net/Net.pm
+++ b/Net/Net.pm
@@ -162,7 +162,7 @@ sub start_server {
      $flags,
      fileno($gimp_fh),
      int($Gimp::verbose);
-   warn __"$$-extension-perl-server args='$args'" if $Gimp::verbose;
+   warn __"$$-plug-in-perl-server args='$args'" if $Gimp::verbose;
    push(@args,"--no-data") if $opt=~s/(^|:)no-?data//;
    push(@args,"-i") unless $opt=~s/(^|:)gui//;
    push(@args,"--verbose") if $Gimp::verbose;
@@ -175,7 +175,7 @@ sub start_server {
        "--batch-interpreter",
        "plug-in-script-fu-eval",
        "-b",
-       "(if (defined? 'extension-perl-server) (extension-perl-server $args))",
+       "(if (defined? 'plug-in-perl-server) (plug-in-perl-server $args))",
        "-b",
        "(gimp-quit 0)";
    }
@@ -409,7 +409,7 @@ sub new_connection {
   $stats{fileno($fh)}=[0,time];
 }
 
-sub extension_perl_server {
+sub plug_in_perl_server {
   my $run_mode=$_[0];
   $ps_flags=$_[1];
   my $extra=$_[2];
@@ -546,7 +546,7 @@ Gimp::Net - Communication module for the gimp-perl server.
 =head1 DESCRIPTION
 
 For Gimp::Net (and thus commandline and remote scripts) to work, you
-first have to install the "Perl-Server" extension somewhere where Gimp
+first have to install the "Perl-Server" plugin somewhere where Gimp
 can find it (e.g in your .gimp/plug-ins/ directory). Usually this is
 done automatically while installing the Gimp extension. If you have a
 menu entry C<<Xtns>/Perl-Server> then it is probably installed.
diff --git a/TODO b/TODO
index 971672c..2de5c31 100644
--- a/TODO
+++ b/TODO
@@ -4,11 +4,13 @@ Items as of 2014-03-31 (by Ed J)
   way to pass GIMP data back and forth directly via typemap system. May
   involve a gimp-perl "wrapper" data structure that pairs an SV with its
   GimpPDBArgType/GimpParamDef counterpart - Gimp::Lib::Data?
+* revisit this, replace script-fu with perl equiv:
+  --batch-interpreter plug-in-script-fu-eval '(plug-in-perl-server $args)'
+  model on gimpsrc/plug-ins/script-fu/script-fu.c (make PS be extension)
 * gimp-perl website: maybe just gimp.org/glossary entry - only needs
   links to CPAN, bugzilla, git - make sure CPAN has all POD docs
   - https://mail.gnome.org/mailman/listinfo/gimp-developer-list
   - https://bugzilla.gnome.org/buglist.cgi?quicksearch=product:gimp-perl
-* Remove extra.[ch] - move into Gimp.xs?
 * Get gimp PDL objects working right over Gimp::Net - infrastructure is there
   - gimp-tile set dirty automatically(!)
 * Document on_* and callback architecture
diff --git a/examples/Perl-Server b/examples/Perl-Server
index 6d159a4..9dac44d 100755
--- a/examples/Perl-Server
+++ b/examples/Perl-Server
@@ -10,43 +10,24 @@ N_"/Xtns/Perl"; # workaround for i18n weirdnesses
 Gimp::set_trace(\$Gimp::Net::trace_res);
 Gimp::ignore_functions(qw(gimp_progress_init gimp_progress_update));
 
-Gimp::register_callback extension_perl_server => \&Gimp::Net::extension_perl_server;
+Gimp::register_callback plug_in_perl_server => \&Gimp::Net::plug_in_perl_server;
 
 Gimp::on_query {
-   Gimp->install_procedure("extension_perl_server", "Start the Gimp-Perl Server",
-                           "This is the server for plug-ins written using the Gimp::Net module",
-                           "Marc Lehmann <pcg\ goof com>", "Marc Lehmann", "1999-12-02",
-                          # N_"<Toolbox>/Xtns/Perl/Server", undef, &Gimp::EXTENSION,
-                           N_"<Toolbox>/Xtns/Perl/Server", undef, &Gimp::PLUGIN,
-                           [
-                            [&Gimp::PDB_INT32, "run_mode", "Interactive, [non-interactive]"],
-                            [&Gimp::PDB_INT32, "flags", "internal flags (must be 0)"],
-                            [&Gimp::PDB_INT32, "extra", "multi-purpose ;)"],
-                            [&Gimp::PDB_INT32, "verbose", "Gimp verbose var"],
-                           ],[]);
-
-   Gimp->install_procedure("gimp_procedural_db_constant_register", "Register a plug-in specific integer 
constant",
-                           "Plug-ins should register their custom constants using this function, so".
-                           "other plug-ins (notably script-languages) can access these using symbolic names",
-                           "Marc Lehmann <pcg\ goof com>", "Marc Lehmann", "1999-07-07",
-                         #  undef, undef, &Gimp::EXTENSION,
-                           undef, undef, &Gimp::PLUGIN,
-                           [
-                            [&Gimp::PDB_STRING, "procedure", "The name of the function that uses this 
constant"],
-                            [&Gimp::PDB_STRING, "arg_num", "The name of the argument that this constant is 
used for"],
-                            [&Gimp::PDB_STRING, "constant_name", "The name of the constant, should be 
all-uppercase"],
-                            [&Gimp::PDB_INT32,  "constant_value", "The (integer) value for this constant"],
-                           ],[]);
-   Gimp->install_procedure("gimp_procedural_db_set_default", "Set the default value for a plug-in argument",
-                           "Plug-ins should register default values for their arguments",
-                           "Marc Lehmann <pcg\ goof com>", "Marc Lehmann", "1999-07-07",
-                         #  undef, undef, &Gimp::EXTENSION,
-                           undef, undef, &Gimp::PLUGIN,
-                           [
-                            [&Gimp::PDB_STRING, "procedure", "The name of the function that uses this 
constant"],
-                            [&Gimp::PDB_STRING, "arg_num", "The name of the argument that this constant is 
used for"],
-                            [&Gimp::PDB_INT32,  "default_value", "The default value for this constant"],
-                           ],[]);
+   Gimp->install_procedure(
+      "plug_in_perl_server", "Start the Gimp-Perl Server",
+      "This is the server for plug-ins written using the Gimp::Net module",
+      "Marc Lehmann <pcg\ goof com>", "Marc Lehmann", "1999-12-02",
+      N_"<Toolbox>/Xtns/Perl/Server", undef,
+#      &Gimp::EXTENSION,
+      &Gimp::PLUGIN,
+      [
+       [&Gimp::PDB_INT32, "run_mode", "Interactive, [non-interactive]"],
+       [&Gimp::PDB_INT32, "flags", "internal flags (must be 0)"],
+       [&Gimp::PDB_INT32, "extra", "multi-purpose ;)"],
+       [&Gimp::PDB_INT32, "verbose", "Gimp verbose var"],
+      ],
+      [],
+   );
 };
 
 exit Gimp::main;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]