see plug-ins/perl/Changes

This commit is contained in:
Marc Lehmann 2000-03-15 00:09:59 +00:00
parent 4d20d8296b
commit 03ed5c3765
5 changed files with 75 additions and 48 deletions

View file

@ -23,6 +23,11 @@ Revision history for Gimp-Perl extension.
- add a call to gimp_plugin_add_domain to Lib.xs.
- fix some of the bugs Raphael "reported" (missing Gtk makde Gimp::UI
crash).
- fix pxgettext call in po/update.sh to use the correct "perl".
- fix po/Makefile.PL to not barf on multiply defined "translation"
target.
- do not install scripts depending on Gtk.
- do not register menus when Gtk is needed for dialogs.
1.19 Thu Jan 6 00:21:58 CET 2000
- used N_ to mark all the menu paths, since gimp now tries to

View file

@ -319,7 +319,8 @@ Gimp::on_query {
script:
for(@scripts) {
my($perl_sub,$function,$blurb,$help,$author,$copyright,$date,
$menupath,$imagetypes,$params,$results,$features,$code,$type)=@$_;
$menupath,$imagetypes,$params,$results,$features,$code,$type,
$defargs)=@$_;
for (@$results) {
next if ref $_;
@ -358,6 +359,13 @@ Gimp::on_query {
$_->[0]=datatype($_->[3],@{$_->[4]}) if $_->[0] == PF_SPINNER;
$_->[0]=datatype($_->[3],@{$_->[4]}) if $_->[0] == PF_ADJUSTMENT;
}
# Gtk not installed -> do not install menu entry
if (@$params > $defargs) {
require Gimp::Feature;
undef $menupath unless Gimp::Feature::present('gtk');
}
Gimp->gimp_install_procedure($function,$blurb,$help,$author,$copyright,$date,
$menupath,$imagetypes,$type,
[[Gimp::PARAM_INT32,"run_mode","Interactive, [non-interactive]"],
@ -616,7 +624,7 @@ sub register($$$$$$$$$;@) {
no strict 'refs';
my($function,$blurb,$help,$author,$copyright,$date,
$menupath,$imagetypes,$params)=splice(@_,0,9);
my($results,$features,$code,$type);
my($results,$features,$code,$type,$defargs);
$results = (ref $_[0] eq "ARRAY") ? shift : [];
$features = (ref $_[0] eq "ARRAY") ? shift : [];
@ -626,23 +634,26 @@ sub register($$$$$$$$$;@) {
if (/^<Image>\//) {
$type = &Gimp::PROC_PLUG_IN;
unshift @$params, @image_params;
$defargs = @image_params;
} elsif (/^<Load>\//) {
$type = &Gimp::PROC_PLUG_IN;
unshift @$params, @load_params;
unshift @$results, @load_retvals;
$defargs = @load_params;
} elsif (/^<Save>\//) {
$type = &Gimp::PROC_PLUG_IN;
unshift @$params, @save_params;
$defargs = @save_params;
} elsif (/^<Toolbox>\//) {
$type = &Gimp::PROC_EXTENSION;
$defargs = 0;
} elsif (/^<None>/) {
$type = &Gimp::PROC_EXTENSION;
$defargs = 0;
} else {
die __"menupath _must_ start with <Image>, <Toolbox>, <Load>, <Save> or <None>!";
}
}
#$menupath =~ s%^<Toolbox>/Xtns/%__("<Toolbox>/Xtns/")%e;
#$menupath =~ s%^<Image>/Filters/%__("<Image>/Filters/")%e;
undef $menupath if $menupath eq "<None>";#d#
@_==0 or die __"register called with too many or wrong arguments\n";
@ -766,7 +777,8 @@ sub register($$$$$$$$$;@) {
Gimp::register_callback($function,$perl_sub);
push(@scripts,[$perl_sub,$function,$blurb,$help,$author,$copyright,$date,
$menupath,$imagetypes,$params,$results,$features,$code,$type]);
$menupath,$imagetypes,$params,$results,$features,$code,$type,
$defargs]);
}
=cut

View file

@ -26,23 +26,62 @@ if ($ARGV[0] ne "--writemakefile") {
do './config.pl'; die $@ if $@;
}
@otherdeps = qw(
povray imagemagick
);
@gtk_pins =
qw(
dataurl colorhtml avi PDB parasite-editor
); # miff should be in @pins(!) but detection of non-default arguments is broken
@pins =
qw(windify prep4gif webify PDB tex-to-float ditherize
xachlego xachshadow parasite-editor roundsel blended2
qw(
windify prep4gif webify tex-to-float ditherize
xachlego xachshadow roundsel blended2
scratches blowinout terral_text xachvision perlcc translogo
animate_cells image_tile yinyang stamps font_table sethspin
perlotine randomblends innerbevel fit-text guidegrid roundrectsel
repdup centerguide stampify goldenmean triangle mirrorsplit
layerfuncs randomart1 glowing_steel frame_reshuffle frame_filter
logulator miff gimpmagick guide_remove guides_to_selection burst
fire povray avi layerfuncs bricks dataurl colorhtml
logulator guide_remove guides_to_selection burst
layerfuncs bricks miff
);
@pdl_pins =
qw(
border gouge map_to_gradient pixelmap view3d
);
push @pins, @pdl_pins if $PDL;
fire
); # fire should use nmormal gradient map!
eval "use Gtk;"; $GTK = $@ eq "";
eval "use Parse::RecDescent;"; $PRD = $@ eq "";
$] >= 5.005 or print <<EOF;
NOTICE: You are using a version of perl older than 5.005. This will slightly
reduce the features available to the Gimp-Perl extension.
EOF
$GTK or print <<EOF;
NOTICE: unable to use the Perl-Gtk interface. Many features (like
Gimp::Fu) rely on this extension. You can build without it (and
many scripts will be disabled or run with reduced functionality
only), but it's better to install it (version 0.6123 or higher is
required, you can get it from ftp://ftp.gimp.org/pub/gtk/perl/ or
any CPAN mirror.
EOF
$PRD or print <<EOF;
NOTICE: Parse::RecDescent not found, scm2perl, the Scheme->Perl
translator, will not work. This is normally not a problem, since
it is quite unimportant for most people.
EOF
($major,$minor,$patch)=split /[._]/,$Gtk::VERSION;
require ExtUtils::MakeMaker;
import ExtUtils::MakeMaker;
@ -69,6 +108,9 @@ WARNING: You are using the experimental (and very broken) multithread support.
EOF
}
push @pins, @pdl_pins if $PDL;
push @pins, @gtk_pins if $GTK;
@INC = grep /^\//,@INC; # comment out as well?
if (0) { # comment out because it breaks
eval { $Gimp::no_SIG=1; require Gimp };
@ -111,37 +153,6 @@ EOF
}
}
eval "use Gtk;"; $GTK = $@ eq "";
eval "use Parse::RecDescent;"; $PRD = $@ eq "";
$] >= 5.005 or print <<EOF;
NOTICE: You are using a version of perl older than 5.005. This will slightly
reduce the features available to the Gimp-Perl extension.
EOF
$GTK or print <<EOF;
NOTICE: unable to use the Perl-Gtk interface. Many features (like
Gimp::Fu) rely on this extension. You can build without it (and
many scripts will be disabled or run with reduced functionality
only), but it's better to install it (version 0.6123 or higher is
required, you can get it from ftp://ftp.gimp.org/pub/gtk/perl/ or
any CPAN mirror.
EOF
$PRD or print <<EOF;
NOTICE: Parse::RecDescent not found, scm2perl, the Scheme->Perl
translator, will not work. This is normally not a problem, since
it is quite unimportant for most people.
EOF
($major,$minor,$patch)=split /[._]/,$Gtk::VERSION;
sub MY::install {
my $self=shift;
package MY;

View file

@ -19,7 +19,7 @@ if ($MSGFMT =~ /./) {
print "\n";
WriteMakefile(
NAME => 'i18n translation tables',
NAME => 'i18n',
macro => \%cfg,
realclean => { FILES => "gimp-perl.pot" },
clean => { FILES => "*.mo" },
@ -35,8 +35,8 @@ all :: update-pot
update-po: update-pot
$updatepo
update-pot: ./update.sh
./update.sh
update-pot:
\$(PERL) ../pxgettext `find .. -name '*.pm' -o -name '*.xs' -o -path './examples/*'` ../Perl-Server > gimp-perl.pot
install :: install-po

View file

@ -1,7 +1,6 @@
#!/bin/sh
cd ..
test -f MANIFEST || exec echo "must be started in plug-ins/perl/po"
test -f ../MANIFEST || exec echo "must be started in plug-ins/perl/po"
./pxgettext `find . -name '*.pm' -o -name '*.xs' -o -path './examples/*'` Perl-Server > po/gimp-perl.pot
make update-po