Commit 35cc6abc authored by Marc Lehmann's avatar Marc Lehmann
Browse files

see plug-ins/perl/Changes

parent 4f9745a6
......@@ -5,13 +5,14 @@ Revision history for Gimp-Perl extension.
do the translation.
- patch by Frank Loemker <floemker@TechFak.Uni-Bielefeld.DE> to fix
many missing :auto tags.
- Gimp.xs now defines fallback functions for gettext & friends.
(oops, this is not necessary, reverted).
- I removed the "old prefix" check that I was almost forced to
implement. This was not a good idea, is not a good idea, and
completely breaks on many occasions. Just do not do that. If
only people would trust me sometimes :(
- enabled gdrawable_id caching again.
- some minor Gimp::UI streamlining & bugfixes.
- more (undocumented) on_xxx hooks.
- got rid of the old & crufty callback system (who uses it anyways?).
1.17 Wed Nov 24 21:25:19 CET 1999
- re-fitted i18n translation for most plug-ins.
......
......@@ -192,18 +192,21 @@ sub N_($) { shift }
my @init_functions;
sub gtk_init() {
require Gtk;
Gtk->init;
Gtk::Rc->parse (Gimp->gtkrc);
Gtk::Gdk->set_use_xshm (Gimp->use_xshm);
Gtk::Preview->set_gamma (Gimp->gamma);
Gtk::Preview->set_install_cmap (Gimp->install_cmap);
Gtk::Preview->set_color_cube (Gimp->color_cube);
Gtk::Widget->set_default_visual (Gtk::Preview->get_visual);
Gtk::Widget->set_default_colormap (Gtk::Preview->get_cmap);
my $gtk_init = 1;
sub gtk_init() {
if ($gtk_init) {
require Gtk;
Gtk->init;
Gtk::Rc->parse (Gimp->gtkrc);
Gtk::Gdk->set_use_xshm (Gimp->use_xshm);
Gtk::Preview->set_gamma (Gimp->gamma);
Gtk::Preview->set_install_cmap (Gimp->install_cmap);
Gtk::Preview->set_color_cube (Gimp->color_cube);
Gtk::Widget->set_default_visual (Gtk::Preview->get_visual);
Gtk::Widget->set_default_colormap (Gtk::Preview->get_cmap);
$gtk_init = 0;
}
&{shift @init_functions} while @init_functions;
}
......@@ -299,7 +302,6 @@ if (@ARGV) {
}
my @log;
my $caller;
sub format_msg {
$_=shift;
......@@ -377,39 +379,49 @@ unless($no_SIG) {
my %callback;
sub call_callback {
my $req = shift;
sub cbchain($) {
my $cb = shift;
return () if $caller eq "Gimp";
if ($callback{$cb}) {
for(@{$callback{$cb}}) {
&$_;
}
} elsif (UNIVERSAL::can($caller,$cb)) {
&{"$caller\::$cb"};
} else {
die_msg __"required callback '$cb' not found\n" if $req;
}
$callback{$cb} ? @{$callback{$cb}} : ();
}
sub callback {
my $type = shift;
my @cb;
if ($type eq "-run") {
local $function = shift;
local $in_run = 1;
_initialized_callback;
call_callback 1,$function,@_;
@cb = (
@{$callback{run}},
@{$callback{lib}},
@{$callback{$function}},
);
die_msg __"required callback 'run' not found\n" unless @cb;
for (@cb) { &$_ }
} elsif ($type eq "-net") {
local $in_net = 1;
_initialized_callback;
call_callback 1,"net";
@cb = (
@{$callback{run}},
@{$callback{net}},
@{$callback{$function}},
);
die_msg __"required callback 'net' not found\n" unless @cb;
for (@cb) { &$_ }
} elsif ($type eq "-query") {
local $in_query = 1;
_initialized_callback;
call_callback 1,"query";
@cb = (
@{$callback{query}},
);
die_msg __"required callback 'query' not found\n" unless @cb;
for (@cb) { &$_ }
} elsif ($type eq "-quit") {
local $in_quit = 1;
call_callback 0,"quit";
@cb = (
@{$callback{quiet}},
);
for (@cb) { &$_ }
}
}
......@@ -419,9 +431,10 @@ sub register_callback($$) {
sub on_query(&) { register_callback "query", $_[0] }
sub on_net (&) { register_callback "net" , $_[0] }
sub on_lib (&) { register_callback "lib" , $_[0] }
sub on_run (&) { register_callback "run" , $_[0] }
sub main {
$caller=caller;
&{"$interface_pkg\::gimp_main"};
}
......@@ -726,6 +739,9 @@ callback (which is not yet available if you use Gimp::Fu).
=head1 CALLBACKS
THIS SECTION IS OUTDATED AND WILL BE REWORKED SOON. USE Gimp::Fu or READ
THE SOURCE :(
If you use the plain Gimp module (as opposed to Gimp::Fu), your program
should only call one function: C<main>. Everything else is going to be
B<called> from The Gimp at a later stage. For this to work, you should
......
......@@ -14,7 +14,6 @@ use Socket;
use strict;
use vars qw($use_unix $use_tcp $trace_res $server_quit $max_pkt $unix $tcp $ps_flags
$auth @authorized $exclusive $rm $saved_rm %stats);
# the '' might be required (i.e. no ()). why??
use Gimp qw(__ N_);
use Gimp::Net ();
......@@ -300,10 +299,12 @@ sub extension_perl_server {
}
}
sub query {
Gimp::register_callback extension_perl_server => \&extension_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", "1998-07-22",
"Marc Lehmann <pcg\@goof.com>", "Marc Lehmann", "1999-12-02",
N_"<Toolbox>/Xtns/Perl/Server", "*",&Gimp::PROC_EXTENSION,
[
[&Gimp::PARAM_INT32, "run_mode", "Interactive, [non-interactive]"],
......@@ -331,22 +332,7 @@ sub query {
[&Gimp::PARAM_STRING, "arg_num", "The name of the argument that this constant is used for"],
[&Gimp::PARAM_INT32, "default_value", "The default value for this constant"],
],[]);
}
sub quit {
}
exit &Gimp::main;
};
exit Gimp::main;
......@@ -33,16 +33,18 @@ olof
bugs
* put libs last, ignore gtk-config brokenness
* document on_xxx functions and regiter_callback
* fix Gimp::Feature::missing => on_query-dir!
[DONE] * put libs last, ignore gtk-config brokenness
* update logulator
* update frosty-logo.scm t-o-p-logo.scm starscape-logo.scm starburst-logo.scm
[KILL] * update frosty-logo.scm t-o-p-logo.scm starscape-logo.scm starburst-logo.scm
[DONE] * rate-limiting for gimp_message BEFORE 1.2
* on-query => remove gimp::fu parasite(?)
* bricks requires disable for pattern(?)
* better default argument-handlign via a "massage_args" callback from Gimp/UI/interact?
* installation & Feature system (?)
* map_to_gradient does not work on GRAYA thingies. Argh.
* perl_require_pv with _59?
[KILL] * perl_require_pv with _59?
* scroll behaviour, use clist instead of list?
* document Gimp::PDL and rect2, ...2 functions!
* document Gimp:PDL!!!
......
......@@ -239,7 +239,7 @@ sub set_preview {
}
sub new {
new Gtk::Widget @_;
Gtk::Object::new @_;
}
package Gimp::UI::BrushSelect;
......@@ -282,7 +282,7 @@ sub set_preview {
}
sub new {
new Gtk::Widget @_;
Gtk::Object::new @_;
}
package Gimp::UI::GradientSelect;
......@@ -309,7 +309,7 @@ sub new {
unless (defined %gradients) {
undef @gradients{Gimp->gradients_get_list};
}
new Gtk::Widget @_;
Gtk::Object::new @_;
}
package Gimp::UI::ColorSelectButton;
......@@ -427,8 +427,7 @@ sub cb_color_button {
}
sub new {
my $pkg = shift;
new Gtk::Widget $pkg, @_;
Gtk::Object::new @_;
}
1;
......
#!/usr/bin/perl
# THIS IS OUTDATED AND WILL NOT RUN WITH CURRENT GIMP VERSIONS!
# Send to me by Jason van Zyl <jason@bookshelf.ca>
# see the accompanying file image_list
......
......@@ -4,11 +4,11 @@
use Gimp;
sub query {
Gimp::on_lib {
print STDERR "$0: this script is not intended to be run from within the gimp!\n";
}
};
sub net {
Gimp::on_net {
# simple benchmark ;)
$img=new Gimp::Image(600,300,RGB);
......@@ -25,9 +25,8 @@ sub net {
$bg->edit_fill;
Display->displays_flush ();
}
# Gimp::Net::server_quit; # kill the gimp-perl-server-extension (ugly name)
}
};
exit main;
......@@ -22,16 +22,16 @@ sub plug_in_example_oo {
new Display($img);
}
sub net {
Gimp::on_run {
plug_in_example_oo;
}
};
sub query {
Gimp::on_query {
gimp_install_procedure("plug_in_example_oo", "a test plug-in in perl",
"try it out", "Marc Lehmann", "Marc Lehmann", "1998-04-27",
N_"<Toolbox>/Xtns/Perl Example Plug-in", "*", PROC_EXTENSION,
[[PARAM_INT32, "run_mode", "Interactive, [non-interactive]"]], []);
}
};
exit main;
#!/usr/local/bin/perl
# THIS IS OUTDATED AND WILL NOT RUN WITH CURRENT GIMP VERSIONS!
######################################################################
# This program is an automatic way of scaling and tiling lots of
# images in order to create an index image.
......
#!/usr/bin/perl
# THIS IS OUTDATED AND WILL NOT RUN WITH CURRENT GIMP VERSIONS!
# this test-plugin will create a simple button, and does automatically
# save it as an indexed gif in /tmp/x.gif
......
......@@ -144,17 +144,17 @@ sub extension_perl_control_center {
}
}
sub net {
Gimp::on_run {
extension_perl_control_center;
}
};
sub query {
Gimp::on_query {
Gimp->install_procedure("extension_perl_control_center", "the perl control center gives information about gimp-perl",
"The perl control center gives information about the status of gimp-perl and allows configuration of important system parameters",
"Marc Lehmann", "Marc Lehmann", $VERSION,
N_"<Toolbox>/Xtns/Perl/Control Center", "*", &Gimp::PROC_EXTENSION,
[[&Gimp::PARAM_INT32, "run_mode", "Interactive, [non-interactive]"]], []);
}
};
exit Gimp::main;
......@@ -13,6 +13,10 @@ msgstr ""
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
#, fuzzy
msgid "<Image>/Filters/Logulator/Starburst"
msgstr "<Image>/Filter/"
msgid "expected perl-server at other end of socket, got @r\n"
msgstr ""
......@@ -22,12 +26,13 @@ msgstr "zu viele"
msgid "$s: not an integer\n"
msgstr "$s: kein integer\n"
#, fuzzy
msgid "<Image>/Filters/Logulator/Blended"
msgstr "<Image>/Filter/"
msgid "<Image>/Filters/Render/Fit Text"
msgstr "<Image>/Filter/Render/Text Einpassen"
msgid "<Toolbox>/Xtns/Perl-Fu/Logos/Particle Trace"
msgstr "<Toolbox>/Xtns/Perl-Fu/Logos/Particle Trace"
msgid "Help for "
msgstr "Hilfe fr "
......@@ -58,12 +63,24 @@ msgstr ""
msgid "<Toolbox>/Xtns/Render/Povray/Texture"
msgstr "<Toolbox>/Xtn/Render/Povray/Textur"
#, fuzzy
msgid "<Image>/Filters/Logulator/Cool Metal"
msgstr "<Image>/Filter/"
msgid "<Toolbox>/Xtns/Render/Povray/Preferences"
msgstr "<Toolbox>/Xtn/Erzeuge/Povray/Einstellungen"
msgid "Unable to read temporary image tile $tmp: $!"
msgstr ""
#, fuzzy
msgid "<Image>/Filters/Logulator/Crystal"
msgstr "<Image>/Filter/"
#, fuzzy
msgid "<Image>/Filters/Logulator/Alien Glow"
msgstr "<Image>/Filter/"
msgid "run_mode must be INTERACTIVE, NONINTERACTIVE or RUN_WITH_LAST_VALS\n"
msgstr ""
"run_mode mu entweder INTERACTIVE, NONINTERACTIVE or RUN_WITH_LAST_VALS sein\n"
......@@ -100,9 +117,17 @@ msgstr ""
msgid "dunno how to return param type %d"
msgstr ""
#, fuzzy
msgid "<Image>/Filters/Logulator/Chip Away"
msgstr "<Image>/Filter/"
msgid "<Image>/Filters/Colors/Colour To Alpha"
msgstr ""
#, fuzzy
msgid "<Image>/Filters/Logulator/Bovination"
msgstr "<Image>/Filter/"
msgid "Image Types"
msgstr "Bildtypen"
......@@ -115,6 +140,10 @@ msgstr "Konnte den Gimp-Server nicht finden. L
msgid "More..."
msgstr "Mehr..."
#, fuzzy
msgid "<Image>/Filters/Logulator/Particle Trace"
msgstr "<Image>/Filter/"
msgid "interface=... tag is no longer supported\n"
msgstr ""
......@@ -136,10 +165,6 @@ msgstr "Konnte Gimp::Drawable nicht in Gimp::GDrawable konvertieren (id %d)"
msgid "Restore values to the previous ones"
msgstr "Parameter auf vorherige Werte zurcksetzen"
#, fuzzy
msgid "<Toolbox>/Xtns/Perl-Fu/Logos/Glowing Hot"
msgstr "<Toolbox>/Xtn/Perl/Kontrollcenter"
msgid "<Image>/Filters/Animation/Apply Perl Expression"
msgstr ""
......@@ -167,14 +192,6 @@ msgstr ""
msgid "register called with too many or wrong arguments\n"
msgstr "'register' mit zu vielen oder falschen Argumenten aufgerufen\n"
#, fuzzy
msgid "<Toolbox>/Xtns/Perl-Fu/Logos/Carved"
msgstr "<Toolbox>/Xtn/Perl/Server"
#, fuzzy
msgid "<Toolbox>/Xtns/Perl-Fu/Logos/Speed text"
msgstr "<Toolbox>/Xtn/Perl/Server"
msgid "Internal error: Gimp::Net #101, please report!"
msgstr ""
......@@ -204,9 +221,6 @@ msgstr ""
msgid "Internal error: stashname too long, please report!"
msgstr ""
msgid "<Toolbox>/Xtns/Perl-Fu/Logos/Glossy"
msgstr "<Toolbox>/Xtns/Perl-Fu/Logos/Glossy"
#, fuzzy
msgid "<Image>/Filters/Render/TeX String"
msgstr "<Image>/Filter/"
......@@ -232,14 +246,6 @@ msgstr ""
msgid "Close"
msgstr "Schlieen"
#, fuzzy
msgid "<Toolbox>/Xtns/Perl-Fu/Logos/Blended"
msgstr "<Toolbox>/Xtn/Perl/Kontrollcenter"
#, fuzzy
msgid "<Toolbox>/Xtns/Perl-Fu/Logos/Imigre-26"
msgstr "<Toolbox>/Xtn/Perl/Server"
msgid "unable to open $rgb_db_path"
msgstr "Konnte $rgb_db_path nicht ffnen"
......@@ -253,6 +259,10 @@ msgstr ""
msgid "<Image>/Filters/Render/Add Glow"
msgstr "<Image>/Filter/Render/Add Glow"
#, fuzzy
msgid "<Image>/Filters/Logulator/Basic I"
msgstr "<Image>/Filter/"
msgid "function name contains dashes instead of underscores"
msgstr "Funktionsname enthlt Minuszeichen anstatt Unterstrichen"
......@@ -261,10 +271,6 @@ msgid ""
"and _ allowed"
msgstr ""
#, fuzzy
msgid "<Toolbox>/Xtns/Perl-Fu/Logos/Crystal"
msgstr "<Toolbox>/Xtn/Perl/Kontrollcenter"
msgid ""
"Expected an INT32 but got '%s'. Add '*1' if you really intend to pass in a string"
msgstr ""
......@@ -308,32 +314,28 @@ msgid ""
"strict'"
msgstr ""
#, fuzzy
msgid "<Toolbox>/Xtns/Perl-Fu/Logos/Chrome"
msgstr "<Toolbox>/Xtn/Perl/Server"
msgid "[undefined]"
msgstr "[undefiniert]"
msgid "<Image>/Guides/Remove Guides"
msgstr ""
#, fuzzy
msgid "<Toolbox>/Xtns/Perl-Fu/Logos/Starscape"
msgstr "<Toolbox>/Xtn/Perl/Server"
msgid "WARNING: shared locking requested but not implemented"
msgstr ""
#, fuzzy
msgid "<Image>/Filters/Logulator/SOTA Chrome"
msgstr "<Image>/Filter/"
msgid "%s: procedural database execution failed"
msgstr "%s: PDB-Aufruf fehlgeschlagen"
msgid "<Image>/Filters/"
#, fuzzy
msgid "<Image>/Filters/Logulator/3D Outline"
msgstr "<Image>/Filter/"
#, fuzzy
msgid "<Toolbox>/Xtns/Perl-Fu/Logos/Newsprint text"
msgstr "<Toolbox>/Xtn/Perl/Kontrollcenter"
msgid "<Image>/Filters/"
msgstr "<Image>/Filter/"
msgid ", authorization required"
msgstr ", Autorisierung notwendig"
......@@ -351,13 +353,13 @@ msgstr ""
msgid "<Toolbox>/Xtns/Perl/Server"
msgstr "<Toolbox>/Xtn/Perl/Server"
#, fuzzy
msgid "<Toolbox>/Xtns/Perl-Fu/Logos/Chalk"
msgstr "<Toolbox>/Xtn/Perl/Kontrollcenter"
msgid "accepted unix connection"
msgstr "Unix-Verbindung angenommen"
#, fuzzy
msgid "<Image>/Filters/Logulator/Imigre-26"
msgstr "<Image>/Filter/"
msgid "gimp_tile_get_data is not yet implemented\n"
msgstr ""
......@@ -427,8 +429,8 @@ msgid "params and return_vals must be array refs (even if empty)!"
msgstr ""
#, fuzzy
msgid "<Toolbox>/Xtns/Perl-Fu/Logos/Basic I"
msgstr "<Toolbox>/Xtn/Perl/Kontrollcenter"
msgid "<Image>/Filters/Logulator/Newsprint text"
msgstr "<Image>/Filter/"
msgid "$_: illegal switch, try $0 --help\n"
msgstr "$_: Unbekannter Schlater, wie wr's mit $0 --help stattdessen?\n"
......@@ -440,10 +442,6 @@ msgstr "Konnte Referenz auf Typ '%s' nicht konvertieren"
msgid "<Toolbox>/Xtns/Render/Logos/Inner Bevel"
msgstr "<Toolbox>/Xtn/Erzeuge/Logo/Feuerlogo"
#, fuzzy
msgid "<Toolbox>/Xtns/Perl-Fu/Logos/Neon"
msgstr "<Toolbox>/Xtn/Perl/Kontrollcenter"
#, fuzzy
msgid "<Image>/Filters/Render/Random Blends"
msgstr "<Image>/Filter/"
......@@ -452,6 +450,10 @@ msgstr "<Image>/Filter/"
msgid "<Image>/Filters/Map/Pixelmap"
msgstr "<Image>/Filter/"
#, fuzzy
msgid "<Image>/Filters/Logulator/Starscape"
msgstr "<Image>/Filter/"
msgid "gimp procedure '%s' not found"
msgstr "Gimp-Funktion '%s' nicht gefunden"
......@@ -476,6 +478,10 @@ msgstr "Abk
msgid "<Image>/Filters/Render/Terral Text"
msgstr "<Image>/Filter/Render/Terraltext"
#, fuzzy
msgid "<Image>/Filters/Logulator/Speed text"
msgstr "<Image>/Filter/"
msgid "<Toolbox>/Xtns/PDB Explorer"
msgstr "<Toolbox>/Xtn/PDB-Buch"
......@@ -491,10 +497,6 @@ msgstr "Anfrage ohne Autorisierung empfangen, Verbindung abgebrochen"
msgid "%s: procedural database execution failed on invalid input arguments"
msgstr "%s: PDB-Aufruf fehlgeschlagen wegen ungltiger Argumente"
#, fuzzy
msgid "<Toolbox>/Xtns/Perl-Fu/Logos/Comic Book"
msgstr "<Toolbox>/Xtn/Perl/Kontrollcenter"
msgid "NAME"
msgstr ""
......@@ -505,6 +507,10 @@ msgstr ""
msgid "<Image>/Filters/Map/Xach Blocks"
msgstr "<Image>/Filter/"
#, fuzzy
msgid "<Image>/Filters/Logulator/Frosty"
msgstr "<Image>/Filter/"
msgid "FATAL: canonicalize_colour did not return a value!"
msgstr ""
......@@ -525,13 +531,13 @@ msgstr ""
msgid "<Image>/Layers/Center Layer"
msgstr "<Image>/Filter/"
#, fuzzy
msgid "<Image>/Filters/Logulator"
msgstr "<Image>/Filter/"
msgid "closing connection %d (%d requests in %g seconds)"
msgstr "Schliee Verbindung %d (%d Anfragen in %g Sekunden)"
#, fuzzy
msgid "<Image>/Filters/Logulator/Basic II"
msgstr "<Image>/Filter/"
msgid "Reset all values to their default"
msgstr "Auf Standardwerte zurcksetzen"
......@@ -552,10 +558,6 @@ msgstr ""
msgid "too many arguments"
msgstr "Zu viele Argumente"
#, fuzzy
msgid "<Toolbox>/Xtns/Perl-Fu/Logos/Basic II"
msgstr "<Toolbox>/Xtn/Perl/Kontrollcenter"
msgid "dimension mismatch, pdl has dimension %d but at most %d dimensions allowed"
msgstr "Ungltige Dimension: pdl hat die Dimension %d, hchstens %d erlaubt"
......@@ -615,16 +617,20 @@ msgstr "Die Farbangabe hat einen falschen Typ"
msgid "get current background colour from the gimp"
msgstr "bernehme die aktuelle Hintergrundfarbe von Gimp"