In particular, we want the new Script-Fu plug-in to be able to handle
their progress status themselves, which is possible with
(gimp-progress-set-text) except that it is far too quickly overriden
because each procedure call generates a new progress message.
Change SF server to load /scripts, just like extensio-script-fu.
This restores SF server to v2 behaviour re:
1) the content of responses
2) the need for a run_mode arg in calls to scripts
Thus calls to scripts (submitted to the server)
are evaluated without a call via the PDB to extension-script-fu.
This means such a call yields the string repr
of the last evaluated expression of the script,
instead of the string repr of a call via the PDB,
which is #t since scripts are declared in the PDB as returning void.
This also means the run-mode argument is not required in such calls,
since it is a call to a run_func in Scheme, which has no run_mode arg.
This also means that the SF server will continue to run
even if extension-script-fu crashes.
A test is that a call to a simple "echo" script, installed to /scripts,
yields the same response from the server in both GIMP 2 and 3.
With the new API introduced int d1c4457f,
we next need to port all plug-ins using
the argument macros to functions.
This will allow us to remove the macros
as part of the 3.0 API clean-up.
This is the consequence of previous commit. Plug-ins' label and
documentation are now localized before sending these data to GIMP core.
In other words, we replace N_() macros with basic gettext calls.
Create new plugin file script-fu-server-plugin.c
with code extracted from script-fu.c, which is an omnibus plugin
implementing PDB proc extension-script-fu and other PDB procs.
Why:
1. extension-script-fu is smaller and doesn't doesn't link to socket libraries.
(GIMP always starts extension-script-fu and it stays running.)
2. packagers/admins can omit script-fu-server executable from an installation,
if they think letting users serve net ports is not secure.
3. crashing script-fu-server does not crash extension-script-fu,
which requires restart of GIMP
The changes are mostly a simple refactor, extracting code.
No functional change apparent to users.
Low risk of introduced bugs.
Extremely few users use script-fu-server anyway.
Added some logging.
While at it, use G_DECLARE_FINAL_TYPE