Commit 65e5597a authored by Marc Lehmann's avatar Marc Lehmann

see plug-ins/perl/Changes

parent 2e0fea53
Revision history for Gimp-Perl extension.
- testsuite failed when !HAVE_PDL (and the whole package broke on
systems with underpowered dynamic linkers).
- gtk-1.0.x and gimp < 1.0.4 are no longer "officially" supported.
1.091 Sun May 23 13:21:34 CEST 1999
- include a fake typemap.pdl.
......
......@@ -5,19 +5,14 @@ require Exporter;
@ISA=(Exporter);
@EXPORT = ();
my($gtk,$gtk_10,$gtk_11);
my $gtk;
sub _check_gtk {
return if defined $gtk;
eval { require Gtk }; $gtk = $@ eq "" && $Gtk::VERSION>=0.3;
if ($gtk) {
$gtk_10 = (Gtk->major_version==1 && Gtk->minor_version==0);
$gtk_11 = (Gtk->major_version==1 && Gtk->minor_version>=1) || Gtk->major_version>1;
$gtk_12 = (Gtk->major_version==1 && Gtk->minor_version>=2) || Gtk->major_version>1;
$gtk_13 = (Gtk->major_version==1 && Gtk->minor_version>=3) || Gtk->major_version>1;
unless (defined $gtk) {
eval { require Gtk }; $gtk = $@ eq "" && $Gtk::VERSION>=0.5;
}
$gtk;
}
my %description = (
......@@ -25,8 +20,12 @@ my %description = (
'gtk-1.1' => 'gtk+ version 1.1 or higher',
'gtk-1.2' => 'gtk+ version 1.2 or higher',
'gtk-1.3' => 'gtk+ version 1.3 or higher',
'gtk-1.4' => 'gtk+ version 1.4 or higher',
'gimp-1.1' => 'gimp version 1.1 or higher',
'gimp-1.2' => 'gimp version 1.2 or higher',
'gimp-1.3' => 'gimp version 1.3 or higher',
'perl-5.005' => 'perl version 5.005 or higher',
'pdl' => 'compiled-in PDL support',
'gnome' => 'the gnome perl module',
......@@ -59,17 +58,23 @@ sub present {
local $_ = shift;
if ($_ eq "gtk") {
_check_gtk; $gtk;
_check_gtk;
} elsif ($_ eq "gtk-1.1") {
_check_gtk; $gtk_11;
_check_gtk and (Gtk->major_version==1 && Gtk->minor_version>=1) || Gtk->major_version>1;
} elsif ($_ eq "gtk-1.2") {
_check_gtk; $gtk_12;
_check_gtk and (Gtk->major_version==1 && Gtk->minor_version>=2) || Gtk->major_version>1;
} elsif ($_ eq "gtk-1.3") {
_check_gtk; $gtk_13;
_check_gtk and (Gtk->major_version==1 && Gtk->minor_version>=3) || Gtk->major_version>1;
} elsif ($_ eq "gtk-1.4") {
_check_gtk and (Gtk->major_version==1 && Gtk->minor_version>=4) || Gtk->major_version>1;
} elsif ($_ eq "gimp-1.1") {
(Gimp->major_version==1 && Gimp->minor_version>=1) || Gimp->major_version>1;
} elsif ($_ eq "gimp-1.2") {
(Gimp->major_version==1 && Gimp->minor_version>=2) || Gimp->major_version>1;
} elsif ($_ eq "gimp-1.3") {
(Gimp->major_version==1 && Gimp->minor_version>=3) || Gimp->major_version>1;
} elsif ($_ eq "perl-5.005") {
$] >= 5.005;
} elsif ($_ eq "pdl") {
......
......@@ -203,9 +203,11 @@ static SV *new_gdrawable (gint32 id)
if (!gdr)
croak ("unable to convert Gimp::Drawable into Gimp::GDrawable (id %d)", id);
#if HAVE_PDL
/* this needs to be called once before ANY pdl functions can be called. */
/* placing this here will suffice. */
need_pdl ();
#endif
if (!stash)
stash = gv_stashpv (PKG_GDRAWABLE, 1);
......
......@@ -49,10 +49,10 @@ require Exporter;
);
#@EXPORT_OK = qw();
$VERSION=$Gimp::VERSION;
use Gimp;
$VERSION=$Gimp::VERSION;
##############################################################################
=pod
......
......@@ -10,6 +10,7 @@ make test TEST_VERBOSE=1
bugs
* Kommandozeilenmodus(!).
* don't start gimp in cmdline mode and error.
* KILL :auto from default(!)
* auto-flush of gdrawable when merge_shadow(?)
......
......@@ -2,7 +2,7 @@
#BEGIN {$^W=1};
use Gimp::Feature qw(perl-5.005 gtk);
use Gimp::Feature qw(perl-5.005 gtk-1.2);
use Gimp (':consts');
use Gimp::Fu;
use Gtk;
......@@ -10,8 +10,6 @@ use Gtk::Gdk;
Gtk->init;
$gtk_10 = Gtk->major_version==1 && Gtk->minor_version==0;
#Gimp::set_trace(TRACE_ALL);
my $ex; # average font width for default font
......@@ -393,11 +391,11 @@ sub create_main {
my $cs = new Gtk::ScrolledWindow undef,undef;
$cs->set_policy(-automatic,-automatic);
$gtk_10 ? $cs->add ($clist) : $cs->add_with_viewport ($clist);
$cs->add_with_viewport ($clist);
my $rs = new Gtk::ScrolledWindow undef,undef;
$rs->set_policy(-automatic,-automatic);
$gtk_10 ? $rs->add ($rlist) : $rs->add_with_viewport ($rlist);
$rs->add_with_viewport ($rlist);
$rs->set_usize(0,200);
$result = new Gtk::Entry;
......
......@@ -40,7 +40,7 @@ register "webify",
eval { $img->undo_group_end };
$new ? ($img->clean_all, $img) : undef;
$new ? ($img->clean_all, $img) : ();
};
exit main;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment