Commit Graph

934 Commits

Author SHA1 Message Date
Jehan b4f7a90afe app: reorder function definitions/declarations.
Just make so that the declarations and definitions are in the same
order for easy maintenance.

(cherry picked from commit 91cb86d2ab)
2018-08-15 19:24:49 +02:00
Jehan 624edf9017 Issue #1809: update DLL directory for 32-bit plug-in run from 64-bit...
... Windows installation of GIMP.

Our default installer installs 32-bit version of the various DLLs in
32/bin/ (under the installation prefix). Currently this additional
folder is simply added in the PATH, so it works most of the time.
Unfortunately the PATH is searched last for DLLs, and in particular, it
is searched after system directories. So it means that if any misbehaved
application is installing DLLs in system dirs (and in particular
incompatible/older versions of the same DLLs a GIMP plug-in uses), it
breaks the 32-bit plug-in.

SetDllDirectoryW() bypasses this order and the set folder is searched in
between the binary directory and the system dirs. We were already
setting this for our main bin/ directory, which was good for 64-bit
plug-ins, but this was not protecting 32-bit plug-ins. Now our code to
run plug-ins check the bitness of the executable before running it, and
updates the DLL folder accordingly.
The alternative 32-bit folder can be overridden by the configure option
--with-win32-32bit-dll-folder (default: 32/bin/). This option can only
be set when building for 64-bit Windows obviously.

Alternatively we could have put copies of 32-bit DLLs in a subfolder
with each 32-bit plug-in, but this is at best a terrible workaround, as
we would duplicate DLLs for every such case. And this would not have
protected third-party plug-ins which wish to use some of our DLLs.
Last alternative is to use AddDllDirectory(), but it works since Windows
7 with a given update only. And our current official support is any
Windows since Windows 7. So we don't want to use this right now (also
I'm not sure it would actually be much better than current
implementation, and it seems to have a bit more limitations than
SetDllDirectoryW(), though I have not tested).

(cherry picked from commit 91c139f4d0)
2018-08-15 14:34:19 +02:00
Ell 534e8aa92c app: improve file-handler sorting
... by falling back to the procedure name as a last resort.
2018-07-18 09:27:22 -04:00
Ell bfc2681753 app: indentation fix in gimppluginmanager-restore.c 2018-07-17 03:18:13 -04:00
Ell b4ac956859 app, pdb: add gimp-register-file-handler-priority procedure
Add a gimp-register-file-handler-priority procedure, which can be
used to set the priority of a file-handler procedure.  When more
than one file-handler procedure matches a file, the procedure with
the lowest priority is used; if more than one procedure has the
lowest priority, it is unspecified which one of them is used.  The
default priority of file-handler procedures is 0.

Add the necessary plumbing (plus some fixes) to the plug-in manager
to handle file-handler priorities.  In particular, use two
different lists for each type of file-handler procedures: one meant
for searching, and is sorted according to priority, and one meant
for display, and is sorted alphabetically.
2018-07-17 02:56:18 -04:00
Michael Natterer 03feba0f35 libgimpbase, app: remove the plug-in menu_path compat code
Registering a full menu path as a procedure's menu label is now
forbidden and causes the procedure to be rejected.

Bump the plug-in protocol version so a pluginrc containing such cruft
is not used.
2018-07-13 14:07:44 +02:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Michael Natterer 6e971a3fe2 app: remove the <Toolbox> compat menu path for plug-ins
Plug-ins will now get an error when trying to register something
in <Toolbox> which has been deprecated for ages.
2018-07-10 11:49:05 +02:00
Michael Natterer 7db59e7af9 Issue #1719 - GIMP crashes with an invalid pluginrc
Fix 3 more crashes caused by accepting broken input, spotted by
Massimo.
2018-07-04 00:17:24 +02:00
Jehan 4ac9543f72 app: extensions can now contain plug-ins. 2018-07-03 00:23:32 +02:00
Michael Natterer c6aa613f9c Issue #1719 - GIMP crashes with an invalid pluginrc
Check the return value of gimp_file_new_for_config_path() and set
an error if it returns NULL.
2018-06-26 14:58:33 +02:00
Michael Natterer 63817485c0 app: when a plug-in procedure is not sensitive, show the reason in the tooltip
Return an optional tooltip from gimp_procedure_get_sensitive(), in
GimpPlugInProcedure, build that tooltip from the image types the
procedure works on.
2018-06-22 13:29:52 +02:00
Michael Natterer 8c9c091021 Issue #701 - Add the ability to embed the GIMP built-in sRGB profile...
...upon exporting an image

Step 1: make it configurable just like "Export EXIF" etc.

app, libgimp: add "export-color-profile" config option

Add it to the preferences dialog, and pass it on to plug-ins in the
GPConfig message. Add gimp_export_color_profile() to libgimp.

Nothing uses this yet.
2018-06-18 02:19:41 +02:00
Jehan 0af3ae81ff app: also search interpreters executable in $PATH.
Same as we did for binfmt-style lines, if the executable part (for
instance in `pygimp.interp`) is not an absolute path, let's allow
ourselves to find it in the environment $PATH.

(cherry picked from commit f3c5ed55c8)
2018-06-16 03:23:05 +02:00
Jehan c0cc5abe36 app: gimp_interpreter_db_add_extension() should check $PATH if needed.
So basically our binfmt set for Python simply never worked since we just
set 'python' and not a full path, but current code was not looking in
the $PATH environment. This was dead code. Now it's fixed.

(cherry picked from commit 6080178a39)
2018-06-16 02:07:02 +02:00
Jehan 51a8ff9c37 app: actually resolve the interpreter through extension as last resort.
Current code of gimp_interpreter_db_resolve() was only resolving the
interpreter by the file extension when the file could not be opened for
reading or if it was empty/coult not be read. This basically made this
test completely useless.
Let's fix this. Now it will be run all the time, but simply at the end,
if shebang and magic failed.

(cherry picked from commit 8509117fe6)
2018-06-16 02:07:02 +02:00
Michael Natterer b36205176e app, libgimp*: remove the config option to disable tooltips
Also remove all traces of it from the plug-in protocol and raise the
protocol version to 0x0100 (we now allow features and therefore
version bumps in stable, and the master protocol version should always
be higher). Fix the code that aborts plug-in startup on protocol
version mismatch, we can't use gimp_message() because we have no
protocol.
2018-06-06 19:23:30 +02:00
Ell 97925de8eb libgimpbase, libgimp, app: pass icon theme dir to plug-ins through config
Pass the current icon theme directory to plug-ins through the
config message, and add a gimp_icon_theme_dir() libgimp function
for retrieving it.  Note that we already have a similar
gimp_icon_get_theme_dir() PDB function, which we keep around, since
it can be used to dynamically query for the current icon dir,
unlike the former, and since it returns a dynamically-allocated
string, while the rest of the config-related functions return
statically allocated strings.

Use the new function, instead of gimp_get_icon_theme_dir(), in
gimp_ui_init().  This allows gimp_ui_init() to run without making
any PDB calls.  Consequently, this allows us to start plug-ins that
call gimp_ui_init() without entering the main loop in the main app.
We're going to add a plug-in that displays an interactive dialog
while the main app is blocking waiting for an operation to
complete, and we need to be able to start the plug-in without
entering the main loop, to avoid the possibility of arbitrary code
being executed during the wait.

Bump the protocol version.
2018-05-29 16:04:28 -04:00
Michael Natterer abdd69640d app: in testing mode, load plug-ins without subdirectories again
Fixes the export test.
2018-05-26 14:45:59 +02:00
Jehan ab982c6401 app: plug-ins must now be installed as subdirectories.
This will in particular fix the whole DLL hell problem since various
plug-ins are now asked to install all their mess (and in particular
their embedded DLLs on Windows) inside their subfolder, hence not
disturbing the correct functionning of other plug-ins installed side by
side.
2018-05-20 21:06:35 +02:00
Michael Natterer 7549b6efe4 Bug 794132 - Make the plug-in protocol version part of the plug-in command line
Also clean GPConfig struct from deprecated members and bump the
plug-in protocol version number.
2018-05-20 21:06:30 +02:00
Michael Natterer b9103bbc5f Revert "app: remove all deprecated threads_enter/leave code"
This reverts commit 94b028bc39c7250997ee9883793e6649bf2490c7.

Dunno what breaks here, it just crashes, leave the commits there
instead of rebasing them away, as reminder...
2018-05-20 21:06:30 +02:00
Michael Natterer 579cf4c428 app: remove all deprecated threads_enter/leave code 2018-05-20 21:06:30 +02:00
Michael Natterer 5ece7a8d1f Port a lot of stuff from GdkScreen/monitor_number to GdkMonitor
including some fixes for getting pointer coords, and needed
API changes in libgimpwidgets.
2018-05-20 21:06:30 +02:00
Michael Natterer 7e1df2c8c6 app: add layers/channels/vectors freeze/thaw to gimpplugin-cleanup
so plug-ins cannot thaw what they haven't frozen, and the code
can clean up frozen stuff left behind by crashed or broken plug-ins.

Also redo the cleanup code so it only keeps track of the undo group
counts and freeze counts of what *this* GimpPlugInProcFrame did
itself. That should make it even stricter against broken code that
could mess up internals.
2018-05-07 20:09:07 +02:00
Jehan 0fce8fdb3c app: expand/unexpand locale paths in pluginrc.
It doesn't look like it is actually much of a problem, but anyway it's
better to have non-absolute paths in config files when possible.

Thanks to jtojnar on IRC for reporting these (and MyPaint brush paths
from my previous commit).
2018-04-29 02:20:58 +02:00
Michael Natterer d528f80c16 app: cast g_object_ref() argument in gimp_plug_in_proc_frame_init() 2018-04-14 21:14:52 +02:00
luz.paz 7fdb963e01 Bug 794996 - Misc. typo fixes in comments in app/
Found via `codespell -q 3 --skip="./po*"`
2018-04-08 21:25:56 +02:00
Ell 1b1fba199a app, libgimp: don't close parent pipes in libgimp; use gimp_spawn_set_cloexec()
In gimp_plug_in_open(), use gimp_spawn_set_cloexec() to prevent the
parent's end of the read/write pipes from being inherited by the
spawned plug-in, instead of passing the corresponding file
descriptors to the plug-in as command-line arguments, and having
gimp_main() close them.

Adding new command-line arguments to plug-ins is problematic, since
their ability to handle them depends on their protocol version,
which is only communicated after the plug-in is spawned.

Regardless, this is much simpler.
2018-03-06 16:31:17 -05:00
Ell c6e8dd888c app: fix buffer overflow in gimp_plug_in_open()
Commit b9e629abbb added two more
command-line arguments when spawning plug-ins, but failed to expand
the args array...
2018-03-05 12:50:06 -05:00
Ell b9e629abbb app, libgimp: use gimp_spawn_async() when spawning plug-ins
In gimp_plug_in_open(), use gimp_spawn_async(), added in the
previous commit, instead of g_spawn_async().  See the previous
commit for the rationale.

Since gimp_spawn_async() doesn't provide a mechanism to perform any
cleanup in the child before exec()ing, move the closing of the
parent's end of the read/write pipes from the app to the plug-in's
gimp_main(), passing the relevant file descriptors to the plug-in
through argv.
2018-03-05 01:55:40 -05:00
Michael Natterer 539927ebfa app: replace all g_assert() by the newly added gimp_assert()
which is just a #define to g_assert for now, but can now easily be
turned into something that does some nicer debugging using our new
stack trace infrastructure. This commit also reverts all constructed()
functions to use assert again.
2018-02-11 22:23:10 +01:00
Jehan 4c4fa84f85 app, libgimp, libgimpbase: new gimp_export_(exif|xmp|iptc)() functions.
These allows plug-ins to know the preferences regarding metadata.
2018-01-11 22:17:32 +01:00
Massimo Valentini b118e8242b Bug 784647: Crash when choosing debug option Show Image Graph
The attached patch avoids CRITICALs when executing Debug actions
with no images open.
1) do not run projection benchmark unless there is an image
2) memsize of pluginmanager member was incorrectly computed using
   gimp_object functions for 2 GObjects
2018-01-10 17:06:56 +01:00
Ell f7d6805ebb */Makefile.am: add abbreviations to generated enum files
Update the dprod production of generated enum files to include
abbreviated value descriptions, as per the previous commits.

Add a comment for translators above the abbreviated descriptions,
specifying the full description they abbreviate.
2017-11-30 03:10:14 -05:00
Ell 58fdaae3ad enums: add intermediate generated enum files to .gitignore 2017-08-24 15:35:27 -04:00
Jehan 1941e5139e app: minor s/placeolder/placeholder/ 2017-07-28 22:57:09 +02:00
Michael Natterer 7a10afca39 app: turn magic matching debug output into GIMP_LOG() 2017-07-28 22:35:13 +02:00
Michael Natterer 713995e27d Bug 784261 - Have some nice error message for formats known to work...
...with known plugins

Add new plug-in file-raw-placeholder.c that registers itself for
loading all RAW formats from file-raw/file-formats.h, but does nothing
except returning an error message pointing to darktable and
RawTherapee.

When no real RAW loader is installed, this plug-in is selected
automatically as RAW loader, otherwise the first installed RAW loader
is used. Selecting another in prefs still works as before.
2017-07-24 22:19:53 +02:00
Michael Natterer 287cfb1413 app: some more g_clear_pointer() in gimp_plug_in_manager_finalize() 2017-07-24 22:18:54 +02:00
Massimo Valentini f2306abc0a Bug 761170: Warnings building with clang
Fix some of the warnings.
2017-07-15 21:05:56 +02:00
Michael Natterer 0cb3e75f79 app: use a lot of g_clear_object() and g_clear_pointer()
More than 2000 lines of code less in app/, instead of

if (instance->member)
  {
    g_object_unref/g_free/g_whatever (instance->member);
    instance->member = NULL;
  }

we now simply use

g_clear_object/pointer (&instance->member);
2017-07-15 18:42:44 +02:00
Ell 3ca48a0b30 enums: don't use comments in generated enum recipes
Works in bash, but apparently not portable.
2017-06-02 11:15:43 -04:00
Michael Natterer ea7f1ba024 app: reduce indentation depth in gimp_plug_in_manager_search_directory()
by removing one if() level each from the nested loops. Instead,
continue the loop early if the file is hidden. And plug a memory leak.
2017-05-26 18:47:13 +02:00
Jehan efae55a73e app: allow plugin inside first-level directories of plug-ins folders.
We don't search recursively but only at the first level. If a plugin is
in its own subdirectory, the entry point has to be named the same (minus
extension) as the directory. For instance my-plugin/my-plugin for a
binary, or my-plugin/my-plugin.(py|exe|…).
This way, a plugin can load shared objects (libraries, other script
files, etc.) without polluting the main plug-ins directories, and in
particular without interfering with other plug-ins.
This is a first step to fix bug 757057 (DLL files which were used in
various plugins).
2017-05-24 17:33:15 +02:00
Ell 5bcde32caf enums: run gimp-mkenums from the build dir
Commit 1e6acbd4e1 modified the
generated enum recipes to run gimp-mkenums from the source
directory, instead of the build directory, so that only the
basenames of the corresponding header files would appear in
the comment at the top of the generated files.  This was a
mistake -- $(GIMP_MKENUMS) is expecting to be invoked from the
build directory.

Switch back to running gimp-mkenums from the build directory.  To
avoid including the relative path from the build directory to the
source directory in the generated file, add a @basename@ production
variable to gimp-mkenums, which exapnds to the basename of the
input file, and use it instead of @filename@ in the recipes for the
generated enum files.
2017-05-22 20:29:18 -04:00
Ell f9fa0d1b18 enums: don't write generated enum files to src-dir if unchanged
When regenerating an enum file, don't copy it back to the source
directory if it hasn't actually changed.  This allows using a read-
only source directory where the enum header is newer than the
generated file, as long as they're not really out of sync.

OTOH, *do* touch the generated source-dir file even when unchanged,
in order to avoid re-running its recipe on the next build, however,
allow this to silently fail (which is harmless).
2017-05-22 17:58:04 -04:00
Ell 1e6acbd4e1 enums: generate enum files in source dir
We check them into git, so this makes it easier to keep them in
sync when using a separate build directory.

Case in point -- this commit also syncs a few enum files that went
out-of-sync with their headers.
2017-05-06 17:26:16 -04:00
Michael Natterer 7f33edea1b app, libgimp: allow to register more than one MIME type per procedure
GIMP will always use the first one from the list, but at least now
there is a way to register variants.
2017-05-04 23:22:37 +02:00
Michael Natterer 560340e8d6 app, pdb, libgimp: make the raw image importer configurable
Add "import-raw-plug-in" to gimprc, and a new procedure
gimp_register_file_handler_raw(). On startup, remove all load
procedures that are marked as "handles raw" but are not implemented by
the configured plug-in. Add the list of available plug-ins to prefs ->
import/export. Register all file-darktable procedures as handling raw.
2017-05-04 20:38:58 +02:00
Jehan bc344a9991 Bug 750180 - Fix different ways of writing Plug-in Plug-In Plugin.
It was agreed that we should write "plug-in" consistently. Only possibly
user-visible strings were updated.
Thanks to scootergrisen for a first patch which could not make it
after changing decision on the canonical writing.
2017-03-21 17:52:22 +01:00
Jehan 3fa016fb4b app: clean out tab indentations. 2016-12-21 04:05:32 +01:00
Michael Natterer e8309826b7 app, libgimpwidgets: use the new config path <-> GFile functions
Gets rid of temporary variables to hold both expanded and unexpanded
paths.
2016-09-30 22:07:00 +02:00
Michael Natterer 12ac114f71 app: use gimp_config_path_unexpand() when writing pluginrc
instead of the previous ad-hoc hack.
2016-09-01 00:44:19 +02:00
Michael Natterer 9f343f25eb app: try to store plug-in paths in terms of ${gimp_plug_in_dir}
so they get found without re-querying by relocatable GIMP packages.
2016-08-31 22:04:46 +02:00
Massimo Valentini a93cea0ef5 Bug 768273: Rapid sequence of commands causes crash
do not access progress object after destruction.

silence warnings like:

(gimp-2.8:1): GLib-GObject-WARNING **: gsignal.c:2635: instance '0x17083f0' has no handler with id '56146'

(gimp-2.8:1): Gimp-Plug-In-CRITICAL **: plug_in_icc_profile_apply_rgb: assertion 'progress == NULL || GIMP_IS_PROGRESS (progress)' failed
2016-07-03 18:26:37 +02:00
Michael Natterer 28e1a379e6 app: remove const qualifiers from all object parameters
They are unreliable because every type checking cast discards them,
they are useless anyway, visual clutter, added inconsistently, and
generally suck. Wanted to do this a long time ago, it was a bad idea
in the first place.
2016-05-19 23:54:14 +02:00
Michael Natterer 6b4dd30fca app: prefer magic-less file procedures again when matching a filename
This essentially reverts 1bf8eef14f
which tried to prefer file procedured that are GIO-enabled over
indirect loading via the file-uri plug-in. But file-uri is gone now so
we can treat all file procedured the same again, restoring the
original logic.

Now a file procedure which specifies only an extension is again
preferred over magic matching.
2016-05-01 18:41:21 +02:00
Michael Natterer eca44cc87d app: fix file_check_magic_list() to handle "and" matches again
where the magic is only supposed to match if all magics in the "and"
list match.
2016-04-25 01:04:07 +02:00
Michael Natterer 6af83a5a08 app: improve file magic matching
Change file magic matching from using a simple boolean "magic matches"
logic to using a matching quality. The quality is measured by the
number of bytes that matched.

Matching a single file procedure's magics now tries all magics and
returns the best match quality.

Searching a file procedure for a given file now tries all file
procedures and returns the one with the best match quality.

This fixes raw camera files being opened as TIFF, given a better magic
than just the generic TIFF magic is provided.
2016-04-24 23:56:57 +02:00
Michael Natterer 47ef3be145 Initialize GValues with G_VALUE_INIT instead of { 0, } 2016-03-26 15:59:26 +01:00
Massimo Valentini f44c77b4a2 Bug 761330: Gimp Drop Shadow window always opens...
...behind main window on windows

Windows requires that the process with the
foreground window explicitely allows long
lasting background processes showing their
windows as foreground/focused
2016-02-10 17:14:00 +01:00
Michael Natterer 7c0d7c6311 app: add new virtual function GimpProcedure::get_help_id()
Implement the new function in GimpPlugInProcedure and remove
gimp_plug_in_procedure_get_help_id().
2016-01-17 17:15:27 +01:00
Michael Natterer 3e18b3bbfb Bug 760306 - "Image header corrupt" error on start-up
gimp_plug_in_procedure_set_icon(): look at the passed icon_type,
not proc->icon_type. Introduced this when splitting the function
into set_icon() and take_icon() in d5255dc.
2016-01-08 13:55:59 +01:00
Michael Natterer 789e9f2cf4 app: remove /*< skip >*/ and /*< pdb-skip >*/ annotations from enums
where their headers are not even parsed by the affected scripts.
2016-01-07 17:44:46 +01:00
Michael Natterer dc53501ce9 app: add gimp_plug_in_manager_get_file_procedures() for the file dialogs
Change GimpFileDialog's file-procs properties to enum
GimpFileProcedureGroup and get them via the newly added API. Set
properties common to all dialogs in the parent class.
2016-01-06 15:07:41 +01:00
Michael Natterer 9480adc2d4 app: mention bug the # in the comment in the last commit 2016-01-06 02:45:08 +01:00
Michael Natterer 2cd6345c19 Bug 758685 - file-gbr-load/save, file-pat-load/save etc fail with...
..."Operation not supported"

Add argument validation in the GimpPlugInProcedure impls of
GimpProcedure::execute() and ::execute_async().

When a file procedure is executed and it handles URIs not filenames,
run the resp. arguments through file_utils_filename_to_file() which
turns both URIs and filenames into a valid GFile which we can ask for
its URI.
2016-01-06 02:35:54 +01:00
Michael Natterer 5455b8bfd0 app: move some stuff out of app/file/
file-procedure.[ch] is gone and its functions moved to
GimpPlugInManager where they belong (the manager keeps around the
lists of load, save and export procedures).

Utility functions from file-utils.[ch] that have nothing to do with
image files moved to core/gimp-utils.[ch].
2016-01-03 23:38:08 +01:00
Michael Natterer 784b37d115 app: allow plug-ins to register procedures in the <MyPaintBrushes> menu 2016-01-02 00:53:32 +01:00
Michael Natterer 926dd1dffb app: add GimpProcedure::get_sensntive()
to replace gimp_plug_in_procedure_get_seisitive().
2016-01-01 23:24:53 +01:00
Michael Natterer a998175289 app: use gimp_procedure_get_label() in file-save-dialog.c 2016-01-01 22:55:37 +01:00
Michael Natterer 78f5dbeac3 app: add GimpProcedure::get_menu_label()
which returns a procedure's *menu* label (not stripped of mnemonics
and ellipses). Use it to further reduce dependencies on
GimpPlugInProcedure.
2016-01-01 22:41:42 +01:00
Michael Natterer 1d3bf65934 app: turn get_label() and get_blurb() into virtual functions of GimpProcedure 2016-01-01 20:52:45 +01:00
Michael Natterer d5255dc133 app: derive GimpProcedure from GimpViewable
and remove redundant icon managing code from GimpPlugInProcedure
2016-01-01 20:05:32 +01:00
Michael Natterer e0ab721361 app: rename GimpPlugInAction to GimpProcedureAction
and make the filter history keep around a list of GimpProcedures
instead of GimpPlugInProcedures. Still WIP and unfinished...
2016-01-01 20:05:32 +01:00
Michael Natterer ac50da2ad4 Bug 759316 - "Recently used" menu not updated with gegl filters
This preparation commit only moves code around and renames it, the
history is still a list of plug-ins only:

- move app/core/gimp-filter-history.c
  to app/plug-in/gimppluginmanager-history.c and clean it up
- move the actions that create the submenus under "Filters"
  from the "plug-in" to the "filters" action group
- move the code that creates and updates the history actions
  to the "filters" action group
- add menu setup code for the "filters" menu
- move the "history-changed" signal from GimpPlugInManager to Gimp
2015-12-30 20:04:58 +01:00
Michael Natterer b17f3fbfce app: fix if() logic in gimp_plug_in_procedure_handle_return_values()
if (! x > 0) is not the same as if (! (x > 0)) and beyond that it's
much less stupid to write if (x == 0)...
2015-09-27 13:40:57 +02:00
Michael Natterer b51ee77ec0 app: implement the "Convert to RGB Working Space" import dialog in the core
Add gimp_image_import_color_profile(), a GUI vtable entry
query_profile_policy() and a new dialog which returns the profile
policy and the profile to convert to. Get rid of the wrapper that
calls the lcms plug-in for that dialog, the plug-in is now completely
unused.

This commit doesn't add any new features, it's just the former lcms
plug-in dialog implemented in app/ (except the little fix that it is
now aware of linear vs. gamma images).
2015-08-23 12:59:12 +02:00
Michael Natterer ba1318dda9 app, menus, plug-ins: add new Submenu Image -> Color Management
and move the color profile menu entries there. Add a mapping so 3rd
party plug-ins get moved to the new location automatically.

Also, add a separator after "Duplicate" and move the "Transform"
submenu to the top of the group that has "Scale", "Resize" etc.
2015-06-15 13:20:04 +02:00
Michael Natterer 3c4aead23f app: minor readability cleanup in plug_in_params_to_args() 2015-06-11 02:03:06 +02:00
Michael Natterer 2aec36a899 app: don't leak "buffer" in gimp_interpreter_db_add_binfmt_misc() 2014-10-06 20:34:56 +02:00
Jehan da4247d87c app: interpreter arguments for plugins not returned.
When a plugin file's shebang would start with "/usr/bin/env", the
interpreter's arguments were not returned by resolve_sh_bang().
2014-08-19 15:04:30 +02:00
Jehan 23245d2788 app: set win32 only code between #ifdef G_OS_WIN32
PATHEXT environment variable to determine whether a file is executable
or not is a Windows-only concept.
2014-08-19 02:12:56 +02:00
Simon Budig 56fa168ec3 fix parser for plugin image types
Spotted by Andrey Karpov using static code analysis:
   http://www.viva64.com/en/b/0273/
2014-08-16 00:37:14 +02:00
Jehan b8aabcac5c Do not use g_io_channel_unix_new() for the win32 platforms.
It is advised to use the more accurate g_io_channel_win32_new_fd() or
g_io_channel_win32_new_socket() because GLib can't differentiate between
file descriptors and sockets on Windows, which outputs a warning when
there is ambiguity.
2014-08-12 23:56:10 +00:00
Michael Natterer 980ba7f85a app: move memsize functions into their own files gimp-memsize.[ch] 2014-08-12 13:57:57 +02:00
Michael Natterer cafc316a47 app: port gimp_interpreter_db_resolve() to GIO 2014-08-12 13:15:44 +02:00
Jehan 66ea9e7ebd app: double free when plugin fails to execute. 2014-08-10 01:26:09 +00:00
Michael Natterer 9d54a94f53 app: port plug-in loading to GFileEnumerator 2014-08-04 02:39:52 +02:00
Michael Natterer 2b1735f784 app: move gimp_file_compare() to gimp-utils.[ch]
It's a GCompareFunc to be used for finding GFiles in lists.
2014-08-02 15:07:26 +02:00
Michael Natterer 0856382713 app: use gimp_directory_file() in gimp_plug_in_manager_get_pluginrc() 2014-07-29 12:37:08 +02:00
Michael Natterer b03d69dd40 libgimpbase, app: add variants of gimp_$foo_directory() which return GFiles
gimp_directory_file(), gimp_data_directory_file() etc. The new
functions take a variable list of path elements to the file,
the list has to be NULL-terminated. Remove the newly added
gimp_personal_rc_gfile(). Start using the new functions in app/.
2014-07-28 02:04:01 +02:00
Michael Henning 880299bd72 app: Request G_FILE_ATTRIBUTE_STANDARD_NAME when reading directories
g_file_enumerator_get_child needs it, and it's not available by default
on windows. See https://bugzilla.gnome.org/show_bug.cgi?id=733528
2014-07-21 22:37:53 -04:00
Michael Natterer 328e4eff18 app: add gimp_progress_set_text_literal()
and use it instead of set_text (progress, "%s", literal_message);
2014-07-20 23:32:19 +02:00
Michael Natterer 7e6a273275 app: port GimpInterpreterDB loading to GIO 2014-07-20 21:48:34 +02:00
Michael Natterer 9629fcd462 app: port GimpEnvironTable loading to GIO 2014-07-20 21:43:28 +02:00
Michael Natterer 93c19c20d4 app: fix a bunch of valgrind-found leaks 2014-07-20 21:40:57 +02:00
Michael Natterer 3ab1084df7 app: port GimpInterpreterDB and GimpEnvironTable loading to GFileEnumerator 2014-07-20 19:24:06 +02:00
Michael Natterer 08fdf55fe1 app: add --verbose output to GimpInterpreterDB and GimpEnvironTable 2014-07-14 22:55:53 +02:00
Michael Natterer a6601d563b app: some GimpProgress cleanup
- change start() and set_text() to use "format" and "..." instead of
  "message", allowing to format progress messages in place
- s/cancelable/cancellable/
- move "cancellable" to be the second argument of start()
2014-07-12 23:45:20 +02:00
Michael Natterer c3573c3c45 app: keep the plug-in executable path around as GFile 2014-07-08 21:09:35 +02:00
Michael Natterer 0f8d84d5e9 app: port all file_open() and file_save() functions to GFile 2014-07-07 23:58:11 +02:00
Michael Natterer f146d454e8 app: port the pluginrc code from filename to GFile 2014-07-03 00:04:58 +02:00
Michael Natterer de08267f06 libgimpbase, *: add enum value GIMP_ICON_TYPE_ICON_NAME
and keep GIMP_ICON_TYPE_STOCK_ID as a deprecated alias. Change all
plug-ins accordingly and increase the pluginrc file version number so
it gets regenerated with "icon-name" instead of "stock-id".
2014-05-11 23:56:30 +02:00
Michael Natterer 23037b5230 app: convert all stock IDs kept around by the core by icon names
Particularly GimpViewable's stock_id. Make sure old config files
containing stock IDs are still properly parsed.
2014-05-07 01:01:56 +02:00
Daniel Sabo cbf13b9e5d Fix typo in header guard
Causes a warning when building with clang
2014-05-02 19:48:47 -07:00
Michael Natterer 8356003fa2 app: pass the startup monitor to displays opened from the copmmand line
Change gimp_get_display_name() to also return the screen, and its
implementation in the GUI to return the initial monitor during
startup. Retrieve that information in app.c using a weird callback
construct and pass the monitor to file_open_from_command_line().

Half-related, add screen and monitor parameters to GimpDisplayShell
and use these initial values for calculating the canvas's initial
extents.

The image windows still don't position themselves correctly though
because we have no mechanism for that whatsoever just yet, but we now
at least pass the needed monitor information to the right objects.
2014-05-03 00:54:20 +02:00
Michael Natterer 89fe232735 app: remove plug_in_icc_profile_info() and _file_info()
because they are unused now.
2014-03-16 19:38:36 +01:00
Michael Natterer 3c918353fb app: add double precision support, for completeness
and because it makes us look utterly cool.
2014-03-09 00:43:55 +01:00
Michael Natterer 57da340f78 app, libgimp: pass "use-opencl" to plug-ins
and configure Gegl on the plug-in side accordingly. This bumps
the GIMP protocol version.
2014-02-25 21:25:40 +01:00
Michael Natterer fab7a994fc app: formatting in gimppluginmanager-restore.c 2013-11-06 21:20:00 +01:00
Michael Natterer 6e3495ff69 app: treat an empty ("" not NULL) plug-in proc_install->menu_path as NULL
gimp_plug_in_handle_proc_install(): don't set the new procedure's menu
path nor its menu label if proc_install->menu_path is "", so we don't
run into action and menu creating confusion later. Do it here and not
later so the "" string never enters the system.
2013-10-20 18:28:13 +02:00
Michael Natterer 697572ccc0 app,libgimp*: fix includes to follow our include policy
- don't include <gdk-pixbuf/gdk-pixbuf.h> in headers in app/
- instead, include it in many .c files instead of <glib-object.h>,
  finally acknowledging the fact that app/ depends on gdk-pixbuf almost
  globally
- fix up includes as if libgimpbase depended in GIO, which it soon will
2013-10-15 01:58:39 +02:00
Jehan c7aa623a55 app: clean out a big bunch of leading tabs.
For some unknown reason, most calls to gimp_message_literal() were
indented with tabs.
2013-09-15 04:59:20 +12:00
Michael Natterer 4ab02ea2dd app: store plug-in mtime as gint64 instead of time_t
This was an attempt to fix bug 703113 but didn't change anything,
however an explicit always-64 bit type is cleaner regardless, so here
it is.
2013-07-12 14:43:27 +02:00
Michael Natterer 3cf2c4dd87 app: use the "no-cpu-accel" command line option again
Call gimp_cpu_accel_set_use() in app_run(). Add "use_cpu_accel"
parameter to gimp_new() and keep it around in the Gimp instance. Pass
the flag to plug-ins again.
2013-06-19 20:45:17 +02:00
Mikael Magnusson 3c2cb65088 app: don't potentially overread buffer
If a file has more than 4kB on the first line and starts with #!, then
we would pass a non-null terminated string to strchr. Found by coverity.
2013-06-15 22:40:49 +02:00
Michael Natterer ec786816bb */Makefile.am: merge INCLUDES into AM_CPPFLAGS
automake-1.13 finally warns about this anachronism.
2013-06-05 20:48:37 +02:00
Michael Natterer 564e6010fd Bug 700675 - Missing menu locations for registration and other menu...
Remove the legacy <Toolbox>, <Load> and <Save> from the error message
that states which plug-in menu paths are valid, and add the missing
<Fonts> and <ToolPresets>. Also actually handle <ToolPresets>, this
was apparently forgotten.
2013-05-24 09:23:52 +02:00
Sven Claussner 0937953844 Bug 699886 - Missing <Dynamics> menu location for script/plugin
Add the missing <Dynamics> menu location for script/plugin
registration.
	modified:   app/plug-in/gimppluginprocedure.c
(cherry picked from commit 9625dd92b4)
2013-05-10 15:55:16 +02:00
Nils Philippsen 096c636b67 app: set error in case of error in ICC profile plug-in
The function plug_in_icc_profile_apply_rgb() didn't set the error object
when bailing out due to being called on a grayscale image, this could
lead to crashes in callers which just checked the return value, but not
whether or not an error had been set.
2013-03-18 13:37:17 +01:00
Michael Natterer 1ba0cfbf38 Bug 680132 - Unable to 'Save As' over smb share
file_procedure_in_group(): consider "file-uri-save" to be in both the
SAVE and the EXPORT groups.

gimp_plug_in_manager_register_save_handler(): allow a procedure to be
in both "save_procs" and "export_procs".

The logic in the file save/export dialog checks uri prefixes and
extensions just fine, so nothing bad seems to happen from this change,
I hope...
2013-02-13 23:44:36 +01:00
Michael Natterer 07f77e5ec8 pdb: allow file procedures to register themselves for handling URIs
and store the flag in pluginrc. There are no URIs passed to procedures
yet and no procedure registers as such, this is just preparation.
2012-11-17 16:01:52 +01:00
Michael Natterer c5f1fd1fda app: introduce a file format version for pluginrc
which is serialized to the file, so we can change/fix the file format
at any time, also in stable. The file is only a cache and can always
be regenerated.
2012-11-17 15:14:05 +01:00
Michael Natterer eac70cc513 Bug 686850 - Help system: GIMP crashes and closes without saving changes
When gimp_plug_in_close()ing a plug-in (such as when cancel is
clicked), make sure we don't leak the proc_frames of all temporary
procedures the plug-in is currently running. By properly disposing the
GimpPlugInProcFrame, the progress window and its cancel button in
above bug get destroed on first click, and the user has no chance of
trying to kill an already finalized plug-in again.
2012-11-05 01:12:21 +01:00
Michael Natterer dcaba4f1d1 Bug 677733 - Export image: duplicate list item for TIFF export
Don't mark a procedure as file procedure just because a mime-type or
thumbnail loader is registered for it. Only registering as load or
save handler should set the file_proc flag. This prevents plug-ins
from doing wrong things and would also fix the behavior fixed in the
commits below.
2012-11-01 19:23:44 +01:00
Mikael Magnusson f6f22ed431 Remove stray semicolons 2012-08-20 15:22:20 +02:00
Michael Natterer 47c987b09e Bug 676270 - cppcheck report
Fix a couple of harmless stuff pointed out in the report, and one
real bug: gimp_plug_in_close() was killing each process 10 times
on windows.
2012-08-04 03:20:36 +02:00
Michael Natterer 06c59973d3 app: remove the entire legacy composition code 2012-05-19 00:41:43 +02:00
Michael Natterer e30d5512e2 app: fix the build on OSX 2012-05-07 23:04:59 +02:00
Michael Natterer 20f3cba2b6 app: rename gimp_image_base_type() to gimp_image_get_base_type() 2012-05-07 21:57:33 +02:00
Michael Natterer 7610e299ae Use GimpValueArray and GimpParamSpecValueArray
instead of the deprecated stuff from GLib.
2012-05-04 00:51:50 +02:00
Michael Natterer 3ad73b3658 libgimpcolor: add GdkPixbuf <-> GeglBuffer utility functions
and update tons of includes in libgimp and app.
2012-05-03 03:37:20 +02:00
Michael Natterer 926f746b66 app: add gimp_babl_compat_u8_format() instead of having this code 5 times 2012-05-02 17:51:18 +02:00
Michael Natterer 58b56ecec6 app: increase the plug-in SHM size so it can hold a float RGBA tile 2012-05-02 17:51:17 +02:00
Michael Natterer e15702cbe5 app: create gimp-babl-compat.[ch] for gimp_babl_format_get_image_type()
and remove gimp_drawable_type().
2012-05-02 17:51:15 +02:00
Michael Natterer 21dfb8bd9f app/libgimp: enable plug-ins on high precision images
Add gimp_plugin_enable_precision() in libgimp which switches the
plug-in to deal with the drawables' real precision, call it from the
libgimp GeglBuffer and Babl format APIs. If it's not enabled, let the
core's plug-in convert the tiles to legacy formats when sending them
over the wire.
2012-05-02 17:51:14 +02:00
Michael Natterer f0daec882f app: use an explicit tile format when talking to plug-ins 2012-05-02 17:51:06 +02:00
Michael Natterer 872bfabc9b app: don't use gimp_drawable_type() in more places
that talk to the outside world.
2012-05-02 17:51:02 +02:00
Michael Natterer 3e140fd105 app: factor out GimpPlugIn's tile access emulation code to app/gegl/
so it can be used to access a GeglBuffer's "tiles" in the XCF code.
2012-05-02 17:50:53 +02:00
Michael Natterer 3e119c5af7 libgimpcolor: add gimp_rgb[a]_set,get_pixel()
which converts from/to any pixel format using Babl. Added tons of
includes and CFLAGS now that libgimpcolor publically uses Babl.
2012-05-02 17:50:43 +02:00
Michael Natterer 867da8f293 app: add gimp_context_get_foreground,background_pixel()
which takes a Babl format to convert from/to.
Include <gegl.h> in a million places.
2012-05-02 17:50:41 +02:00
Michael Natterer c8481fd19e app: increase the tile size for plug-ins to 128x128 2012-05-02 17:50:39 +02:00
Michael Natterer 2e33fc15b5 app: remove includes from app/plug-in/ 2012-05-02 17:50:37 +02:00
Michael Natterer acd3ce41b0 app: port the entire plug-in tile communication to using GeglBuffers
which means we are now completely independent of TileManager tile
sizes. The "tile" size used to talk to plug-ins is now defined as:
2012-05-02 17:50:37 +02:00
Michael Natterer 99ae46b4ed app: turn the drawable's shadow tiles into a shadow buffer 2012-05-02 17:46:10 +02:00
Michael Natterer 5a7b7d9a4b app: add gimp_gegl_buffer_get_tile_manager()
and ust it in some get_memsize() functions instead of having a
FIXME. So many files changed because they need to inlcude <gegl.h>
now.
2012-05-02 17:46:07 +02:00
Michael Natterer f2f1eab753 app: add "ERROR" to the values of enum GimpPdbErrorCode
so they are now GIMP_PDB_ERROR_FOO instead of just GIMP_PDB_FOO,
because it was just too confusing wrt enum GimpPdbStatusType.
2012-03-05 19:36:59 +01:00
Michael Natterer 056e09a6cb Remove the makefile.msc build system, it is unmaintained since 2008 2011-12-16 15:53:56 +01:00
Mukund Sivaraman 1c9231a44a app (plug-in): Remove duplicate assignment 2011-10-10 10:08:12 +05:30
Michael Natterer cc47b2a600 libgimpwidgets/color: move the cairo color utility functions to libgimpcolor
Add CAIRO_CFLAGS to a lot of Makefiles to make this possible, and
because they pull in cairo via the libgimp headers.
2011-04-28 15:50:39 +02:00
Martin Nordholts 5f48111af9 app: Support using plug-ins from build dir
When we run our tests we want to use plug-ins from the build dir so
the tests can pass also when no make install have been made.

Use the environment variables GIMP_TESTING_PLUGINDIRS and
GIMP_TESTING_PLUGINDIRS_BASENAME_IGNORES for this.
2011-04-08 08:50:59 +02:00
Michael Natterer fcfb7cf160 Use the new g_[s]list_free_full() instead of foreach() and free() 2011-03-07 17:11:28 +01:00
Michael Natterer f4af9b549e Globally switch to saying "window_id" instead of just "window"
when dealing with native window handles. Also get rid of using
GdkNativeWindow and simply consistently use guint32 all over the
place. This is more obvious and consistent and keeps the diff to the
gtk3-port branch smaller.
2011-02-06 12:07:55 +01:00
Sven Neumann 868fdcf99f app: remove min-colors and install-colormap properties from gimprc 2010-10-19 10:13:01 +02:00
Michael Natterer bdc2d4520b app: make sure to always show error messages returned by plug-ins
gimp_plug_in_handle_proc_return(): if there is no plug-in main loop
running (the plugin was running asynchronously from a menu), show the
plug-in's error message here, because nobody else will show it
otherwise.
2010-09-07 16:21:40 +02:00
Michael Natterer 2066545b91 app: add GimpPDBContext which holds more state available to procedures
Initially contains antialias, feather and feather radius for the
upcoming gimp-item-to-selection preocedure. Keeping states in the
context reduces the number of parameters of procedures, and both the
state API and the API using the states can be changed/deprecated
independently. Make sure that all procedures and all plug-ins get
GimpPDBContexts instead of plain GimpContexts passed.
2010-09-04 22:17:01 +02:00
Michael Natterer 2d6f808ff8 pdb: add a new PDB group "item" and move lots of functions to it
The item groups has all the duplicated functionality from drawable
and vectors (name, visible, linked etc).

Hijack the unused GIMP_PDB_REGION and turn it into GIMP_PDB_ITEM;
change all protocol aware files accordingly and bump the protocol
version number. Change script-fu to handle the new type.
2010-07-09 09:34:44 +02:00
Sven Neumann 9de1d97fb3 Bug 615071 - invalid menu path crashes GIMP
Check that gimp-plugin-menu-register is only used with procedures
that have registered with a label.
2010-04-07 21:27:51 +02:00
Michael Natterer 9a4bf10d30 Bug 609026 - leaks shared memory
Move calling gimp_plug_in_shm_free() from gimp_plug_in_manager_finalize()
to gimp_plug_in_manager_exit() so it's also called in stable GIMP
releases which simply call exit() at some point instead of taking the
time to shut down everything completely.
2010-02-10 19:37:46 +01:00
Michael Natterer 74c01d7a10 app: add log output when attaching/detaching shared memory
Also put the call to shmdt() out of the IPC_RMID_DEFERRED_RELEASE ifdef.
2010-02-10 19:24:40 +01:00
Michael Natterer 09c897262e Move all undo-related members to GimpImagePrivate
Also add some new API to access them.
2010-02-04 20:06:49 +01:00
Michael Natterer 1735f86d25 Kill plug-ins that write to tiles of locked drawables or group layers
Yes this is pretty lame, but we must prevent write access to these
items under all circumstances, and we have no other way but killing
the plug-in (it should not write to the drawable directly anyway)
2009-09-02 19:48:46 +02:00
Michael Natterer a3558e3cb8 Remove GIMP_OBJECT() casts when calling gimp_object_get_name() 2009-08-31 22:47:18 +02:00
Martin Nordholts 957cf2cfa9 app: Always use gimp_object_get_name()
Begin to consider GimpObject::name as private and always use
gimp_object_get_name(). Change gimp_object_get_name() to take an
untyped pointer so we don't have to do so awfully many casts. There is
a runtime check for the type inside the function anyway.
2009-08-29 12:41:29 +02:00
Michael Natterer b141bcdb60 Minor plug-in sensitivity refactoring
* app/plug-in/gimppluginprocedure.[ch]
  (gimp_plug_in_procedure_get_sensitive): change GimpImageType
  parameter to GimpDrawable and do the type check internally.

* app/actions/plug-in-actions.c (plug_in_actions_update): pass the
  active drawable instead of its type.
2009-08-22 11:03:05 +02:00
Martin Nordholts 51cd8c2981 app: Only show 'File->Overwrite' if the source URI has an exporter 2009-08-21 21:40:32 +02:00
Martin Nordholts acef48602c app: Separate save procs from export procs
In gimp_plug_in_manager_register_save_handler(), separate save procs
from export procs.
2009-05-16 09:48:12 +02:00
Martin Nordholts 58eda13548 app: Add GimpPlugInManager::export_procs member
Add GimpPlugInManager::export_procs member that will later contain all
the export procedures.
2009-05-16 09:48:11 +02:00
Martin Nordholts 4d7a6b10d1 Added .gitignore files generated with git svn create-ignore.
svn path=/trunk/; revision=27972
2009-01-31 11:37:44 +00:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
2009-01-17  Michael Natterer  <mitch@gimp.org>

	* all files with a GPL header and all COPYING files:

	Change licence to GPLv3 (and to LGPLv3 for libgimp).

	Cleaned up some copyright headers and regenerated the parsers in
	the ImageMap plugin.


svn path=/trunk/; revision=27913
2009-01-17 22:28:01 +00:00
Sven Neumann c61f677536 use the GIMP_PLUG_IN_ERROR domain.
2008-11-12  Sven Neumann  <sven@gimp.org>

	* app/plug-in/plug-in-icc-profile.c: use the GIMP_PLUG_IN_ERROR
	domain.


svn path=/trunk/; revision=27627
2008-11-12 10:25:43 +00:00
Sven Neumann 33eb18a479 app/pdb/gimppdberror.h added generic error codes.
2008-11-12  Sven Neumann  <sven@gimp.org>

	* app/pdb/gimppdberror.h
	* app/plug-in/gimppluginerror.h: added generic error codes.

	* app/pdb/gimpprocedure.c
	* app/plug-in/gimppluginprocedure.c: use the GIMP_PDB_ERROR and
	GIMP_PLUG_IN_ERROR domains.


svn path=/trunk/; revision=27626
2008-11-12 10:06:07 +00:00
Sven Neumann 02817081ff use NC_() to mark enum values for translation. Use a lower-case short form
2008-11-06  Sven Neumann  <sven@gimp.org>

	* tools/gimp-mkenums: use NC_() to mark enum values for 
translation.
	Use a lower-case short form of the type name as translation 
context.

	* libgimp/libgimp-intl.h: define the NC_() macro as noop.

	* libgimpbase/gimpbasetypes.[ch]
	* libgimpbase/gimpbase.def: added new functions to set and
	get a translation context on an enum type.

	* app/base/Makefile.am
	* app/core/Makefile.am
	* app/display/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* app/text/Makefile.am
	* app/tools/Makefile.am
	* app/widgets/Makefile.am
	* libgimp/Makefile.am
	* libgimpbase/Makefile.am:
	* libgimpconfig/Makefile.am
	* libgimpthumb/Makefile.am
	* libgimpwidgets/Makefile.am: register the translation context
	with the enum types.

	* app/display/display-enums.h
	* libgimpbase/gimpbaseenums.h
	* libgimpconfig/gimpcolorconfig-enums.h: removed old-style 
explicit
	translation context.

	* app/base/base-enums.c
	* app/core/core-enums.c
	* app/display/display-enums.c
	* app/paint/paint-enums.c
	* app/plug-in/plug-in-enums.c
	* app/text/text-enums.c
	* app/tools/tools-enums.c
	* app/widgets/widgets-enums.c
	* libgimpbase/gimpbaseenums.c
	* libgimpconfig/gimpcolorconfig-enums.c
	* libgimpwidgets/gimpwidgetsenums.c: regenerated.


svn path=/trunk/; revision=27562
2008-11-06 08:28:28 +00:00
Sven Neumann 4762b73403 bumped minimum required version of GLib to 2.18.0.
2008-11-04  Sven Neumann  <sven@sven>

	* configure.in: bumped minimum required version of GLib to 
2.18.0.

	* INSTALL: document the updated dependency.

	* app/core/gimp.[ch]: introduced gimp_message_literal(), a 
variant
	of gimp_message() that takes a literal string.

	* app/errors.[ch]: removed format arguments from 
gimp_fatal_error()
	and gimp_terminate() and let them take a literal string instead.

	* app/tools/gimptool.[ch]: introduced 
gimp_tool_message_literal(),
	a variant of gimp_tool_message() that takes a literal string.

	* app/actions/documents-commands.c
	* app/actions/drawable-commands.c
	* app/actions/edit-commands.c
	* app/actions/error-console-commands.c
	* app/actions/file-commands.c
	* app/actions/gradients-commands.c
	* app/actions/image-commands.c
	* app/actions/layers-commands.c
	* app/actions/palettes-commands.c
	* app/actions/plug-in-commands.c
	* app/actions/select-commands.c
	* app/actions/vectors-commands.c
	* app/config/gimprc.c
	* app/core/gimp-modules.c
	* app/core/gimp-parasites.c
	* app/core/gimp-templates.c
	* app/core/gimp-units.c
	* app/core/gimpchannel.c
	* app/core/gimpcontainer-filter.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage.c
	* app/core/gimpimagefile.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimplayer.c
	* app/core/gimpselection.c
	* app/dialogs/convert-dialog.c
	* app/dialogs/dialogs.c
	* app/dialogs/palette-import-dialog.c
	* app/dialogs/preferences-dialog.c
	* app/dialogs/quit-dialog.c
	* app/dialogs/stroke-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/file/file-open.c
	* app/file/file-procedure.c
	* app/file/file-save.c
	* app/file/file-utils.c
	* app/gegl/gimpcurvesconfig.c
	* app/gegl/gimplevelsconfig.c
	* app/gui/gui-message.c
	* app/gui/gui.c
	* app/gui/session.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpclone.c
	* app/paint/gimpheal.c
	* app/paint/gimpperspectiveclone.c
	* app/paint/gimpsourcecore.c
	* app/pdb/gimppdb-utils.c
	* app/pdb/gimpprocedure.c
	* app/plug-in/gimpplugin-message.c
	* app/plug-in/gimpplugin.c
	* app/plug-in/gimppluginmanager-restore.c
	* app/plug-in/gimppluginprocedure.c
	* app/text/gimptextlayer.c
	* app/tools/gimp-tools.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdesaturatetool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpgegltool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimpimagemaptool-settings.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimppainttool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimpsourcetool.c
	* app/tools/gimpthresholdtool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c
	* app/widgets/gimpactionview.c
	* app/widgets/gimpcontrollerlist.c
	* app/widgets/gimpcontrollers.c
	* app/widgets/gimpdataeditor.c
	* app/widgets/gimpdevices.c
	* app/widgets/gimpdnd-xds.c
	* app/widgets/gimperrordialog.c
	* app/widgets/gimphelp.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimppdbdialog.c
	* app/widgets/gimpsettingsbox.c
	* app/widgets/gimpvectorstreeview.c
	* app/widgets/gimpwidgets-utils.c
	* app/xcf/xcf-load.c
	* tools/pdbgen/pdb/convert.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/floating_sel.pdb
	* tools/pdbgen/pdb/image.pdb: use the _literal variants for
	g_set_error(), gimp_message() and gimp_tool_message().

	* app/pdb/convert-cmds.c
	* app/pdb/edit-cmds.c
	* app/pdb/floating-sel-cmds.c
	* app/pdb/image-cmds.c: regenerated.


svn path=/trunk/; revision=27548
2008-11-04 12:33:09 +00:00
Sven Neumann fe520925b7 app/base/Makefile.am app/core/Makefile.am app/display/Makefile.am
2008-11-03  Sven Neumann  <sven@gimp.org>

	
	* app/base/Makefile.am
	* app/core/Makefile.am
	* app/display/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* app/text/Makefile.am
	* app/tools/Makefile.am
	* app/widgets/Makefile.am
	* libgimp/Makefile.am
	* libgimpbase/Makefile.am: 
	* libgimpconfig/Makefile.am
	* libgimpthumb/Makefile.am
	* libgimpwidgets/Makefile.am: micro-optimization in the 
generated
	enum registration code.

	* app/base/base-enums.c
	* app/core/core-enums.c
	* app/display/display-enums.c
	* app/paint/paint-enums.c
	* app/plug-in/plug-in-enums.c
	* app/text/text-enums.c
	* app/tools/tools-enums.c
	* app/widgets/widgets-enums.c
	* libgimpbase/gimpbaseenums.c
	* libgimpconfig/gimpcolorconfig-enums.c
	* libgimpwidgets/gimpwidgetsenums.c: regenerated.


svn path=/trunk/; revision=27538
2008-11-03 21:38:13 +00:00
Michael Natterer d3d9724ee1 set proc_frame->procedure to NULL *after* calling gimp_plug_in_cleanup().
2008-10-23  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/gimppluginprocframe.c
	(gimp_plug_in_proc_frame_dispose): set proc_frame->procedure to
	NULL *after* calling gimp_plug_in_cleanup(). Fixes the crash on
	windows in bug #557061 (but not the bug).


svn path=/trunk/; revision=27376
2008-10-23 17:13:19 +00:00
Sven Neumann b6ae85b74c app/core/gimpimagefile.c formatting.
2008-10-22  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimagefile.c
	* app/plug-in/gimpplugin-progress.c: formatting.


svn path=/trunk/; revision=27357
2008-10-22 06:00:06 +00:00
Michael Natterer 5503e6a055 Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h had a
2008-10-09  Michael Natterer  <mitch@gimp.org>

	Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h
	had a GEGL dependency (they will have in the next commit, but I
	wanted to keep the commit separate).

	* app/dialogs/Makefile.am
	* app/file/Makefile.am
	* app/gui/Makefile.am
	* app/menus/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* app/text/Makefile.am
	* app/vectors/Makefile.am
	* app/widgets/Makefile.am
	* app/xcf/Makefile.am: add GEGL_CFLAGS.

	* app/actions/*.c
	* app/core/*.c
	* app/dialogs/*.c
	* app/display/*.c
	* app/file/*.c
	* app/gui/*.c
	* app/menus/*.c
	* app/paint/*.c
	* app/pdb/gimppdb-utils.c
	* app/pdb/gimpprocedure.c
	* app/plug-in/*.c
	* app/text/*.c
	* app/tools/*.c
	* app/vectors/*.c
	* app/widgets/*.c
	* app/xcf/*.c: add <gegl.h> or replace <glib-object.h> by <gegl.h>
	to all files which include a drawable subclass or gimpimage.h

	* tools/pdbgen/app.pl: include <gegl.h> instead of <glib-object.h>
	in all generated files.

	* app/pdb/*-cmds.c: regenerated.

	* data/images/gimp-splash.png: the goat is still sleeping.
	By Aurore Derriennic.


svn path=/trunk/; revision=27202
2008-10-09 20:24:04 +00:00
Michael Natterer 62e7dcc640 reorder sections consistently. Remove redundant CFLAGS.
2008-10-07  Michael Natterer  <mitch@gimp.org>

	* app/*/Makefile.am: reorder sections consistently. Remove
	redundant CFLAGS.


svn path=/trunk/; revision=27163
2008-10-07 11:58:14 +00:00
Michael Natterer 6f1b06e065 add a fallback mapping from <Toolbox> to <Image> so we catch really
2008-10-06  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-in-menu-path.c (menu_path_mappings): add a
	fallback mapping from <Toolbox> to <Image> so we catch really
	everything that wants to go to <Toolbox>.


svn path=/trunk/; revision=27147
2008-10-06 20:35:41 +00:00
Michael Natterer 14aad7c222 app/plug-in/gimpplugin-cleanup.c #include <glib-object.h>, not
2008-10-05  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/gimpplugin-cleanup.c
	* app/vectors/gimpanchor.c: #include <glib-object.h>, not
	"glib-object.h".


svn path=/trunk/; revision=27137
2008-10-05 20:06:16 +00:00
Michael Natterer 184fe0a30b keep a reference to the proc_frame's procedure. We can't asume it's always
2008-10-02  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/gimppluginprocframe.c: keep a reference to the
	proc_frame's procedure. We can't asume it's always there since it
	could be a temporary one and its plug-in might die during
	procedure execution, taking the temp_proc with it.


svn path=/trunk/; revision=27112
2008-10-02 17:13:58 +00:00
Tor Lillqvist 0eb68211f3 Don't #define _GNU_SOURCE on Windows as it confuses newest mingw headers.
2008-10-01  Tor Lillqvist  <tml@novell.com>

	* app/plug-in/gimpplugin.c: Don't #define _GNU_SOURCE on Windows
	as it confuses newest mingw headers.


svn path=/trunk/; revision=27096
2008-10-01 12:27:32 +00:00
Sven Neumann c7af52b846 renamed "file-new-menu" to "file-create-menu" and changed the menu label
2008-09-19  Sven Neumann  <sven@gimp.org>

	* app/actions/file-actions.c: renamed "file-new-menu" to
	"file-create-menu" and changed the menu label from "New" to 
"Create".

	* app/plug-in/plug-in-menu-path.c
	* menus/image-menu.xml.in
	* plug-ins/common/screenshot.c
	* plug-ins/script-fu/script-fu.c
	* plug-ins/script-fu/scripts/*.scm
	* plug-ins/twain/twain.c
	* plug-ins/win-snap/winsnap.c: changed accordingly.


svn path=/trunk/; revision=27013
2008-09-19 12:01:12 +00:00
Sven Neumann 1a8859805c app/plug-in/gimppluginprocedure.c minor cleanups.
2008-09-18  Sven Neumann  <sven@gimp.org>

	* app/plug-in/gimppluginprocedure.c
	* libgimp/gimp.c: minor cleanups.


svn path=/trunk/; revision=26999
2008-09-18 16:25:39 +00:00
Tor Lillqvist 25ecbc063d Use INVALID_HANDLE_VALUE instead of INVALID_FILE_HANDLE which was an
2008-09-18  Tor Lillqvist  <tml@novell.com>

	* app/plug-in/gimppluginshm.c: Use INVALID_HANDLE_VALUE instead of
	INVALID_FILE_HANDLE which was an misunderstanding.


svn path=/trunk/; revision=26989
2008-09-18 09:35:00 +00:00
Michael Natterer a270381096 made the "args" parameter const.
2008-09-05  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/gimpplugindebug.[ch] (gimp_plug_in_debug_argv): made
	the "args" parameter const.

	* app/plug-in/gimpplugin.c (gimp_plug_in_open): made some strings
	const.


svn path=/trunk/; revision=26877
2008-09-05 15:46:00 +00:00
Sven Neumann 2552aa2b37 if INVALID_FILE_HANDLE is undefined, define it as the constant that we
2008-09-02  Sven Neumann  <sven@gimp.org>

	* app/plug-in/gimppluginshm.c: if INVALID_FILE_HANDLE is 
undefined,
	define it as the constant that we used to use here.


svn path=/trunk/; revision=26839
2008-09-02 20:52:25 +00:00
Sven Neumann 5ed7a372ee use the constant INVALID_FILE_HANDLE instead of 0xFFFFFFFF. Fixes shared
2008-09-01  Sven Neumann  <sven@gimp.org>

	* app/plug-in/gimppluginshm.c (gimp_plug_in_shm_new): use the
	constant INVALID_FILE_HANDLE instead of 0xFFFFFFFF. Fixes shared
	memory tile transport on 64bit Windows systems.


svn path=/trunk/; revision=26827
2008-09-01 20:55:31 +00:00
Sven Neumann 2b1bf9b77a app/plug-in/gimppluginprocedure.[ch] moved error handling for asynchronous
2008-08-21  Sven Neumann  <sven@gimp.org>

	* app/plug-in/gimppluginprocedure.[ch]
	* app/plug-in/gimptemporaryprocedure.c: moved error handling for
	asynchronous procedure calls to a central place. Use the plug-in
	label instead of the procedure name for the error message.


svn path=/trunk/; revision=26703
2008-08-21 18:09:41 +00:00
Sven Neumann 5e95e896b1 app/plug-in/gimppluginprocedure.c don't just free the return values when
2008-08-21  Sven Neumann  <sven@gimp.org>

	* app/plug-in/gimppluginprocedure.c
	* app/plug-in/gimptemporaryprocedure.c: don't just free the 
return
	values when running procedures asynchronously. Instead examine
	them and display the error message if there's one.

	* app/plug-in/gimppluginmanager-call.c
	(gimp_plug_in_manager_call_run_temp): return NULL if
	procedure->plug_in is not set.

	* app/plug-in/gimpplugin-message.c: comment.


svn path=/trunk/; revision=26700
2008-08-21 16:27:06 +00:00
Michael Natterer 960b30cd9e app/plug-in/gimpplugin.[ch] (struct GimpPlugIn) move the error_handler
2008-08-19  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/gimpplugin.[ch] (struct GimpPlugIn)
	* app/plug-in/gimppluginprocframe.[ch] (struct GimpPlugInProcFrame):
	move the error_handler from the plug-in to the proc-frame.

	* app/plug-in/gimppluginprocframe.c
	* app/plug-in/gimpplugin-message.c: changed accordingly.


svn path=/trunk/; revision=26661
2008-08-19 08:24:48 +00:00
Sven Neumann 369d991fd2 Complements the fix for bug #344818:
2008-08-19  Sven Neumann  <sven@gimp.org>

	Complements the fix for bug #344818:

	* libgimpbase/gimpbaseenums.[ch]: added new enum 
GimpPDBErrorHandler.

	* tools/pdbgen/enums.pl: regenerated.

	* app/plug-in/gimpplugin.[ch]: added error_handler to 
GimpPlugIn.

	* app/plug-in/gimpplugin-message.c 
(gimp_plug_in_handle_proc_run):
	only display an error message for a failed procedure call if the
	plug-in's error-handler is set to 
GIMP_PDB_ERROR_HANDLER_INTERNAL.
	
	* tools/pdbgen/pdb/plug_in.pdb: added PDB getter and setter for
	the plug-in's error-handler.

	* app/pdb/plug-in-cmds.c
	* app/pdb/internal-procs.c
	* libgimp/gimpenums.c.tail
	* libgimp/gimpplugin_pdb.[ch]: regenerated.

	* plug-ins/common/file-compressor.c
	* plug-ins/file-uri/uri.c: set the error-handler to
	GIMP_PDB_ERROR_HANDLER_PLUGIN as these plug-ins are forwarding 
the
	error with their return values.


svn path=/trunk/; revision=26656
2008-08-18 22:54:26 +00:00
Sven Neumann 04539e92ed renamed gimp_plug_in_proc_frame_get_return_vals() to
2008-08-17  Sven Neumann  <sven@gimp.org>

	* app/plug-in/gimppluginprocframe.[ch]: renamed
	gimp_plug_in_proc_frame_get_return_vals() to
	gimp_plug_in_proc_frame_get_return_values().

	* app/plug-in/gimppluginmanager-call.c: changed accordingly.

svn path=/trunk/; revision=26619
2008-08-17 12:08:52 +00:00
Sven Neumann 51d56e3a43 introduced a utility function to reduce code duplication.
2008-08-17  Sven Neumann  <sven@gimp.org>

	* app/plug-in/gimpplugin-progress.c
	(gimp_plug_in_progress_cancel_callback): introduced a utility
	function to reduce code duplication.

	* app/pdb/gimppdb.c (gimp_pdb_execute_procedure_by_name): 
changed
	to use g_error_new_literal().


svn path=/trunk/; revision=26616
2008-08-17 11:00:41 +00:00
Sven Neumann c4f3f05df4 removed the term 'PDB' from the user-visible error messages.
2008-08-16  Sven Neumann  <sven@gimp.org>

	* app/plug-in/gimpplugin-message.c 
(gimp_plug_in_handle_proc_run):
	removed the term 'PDB' from the user-visible error messages.


svn path=/trunk/; revision=26601
2008-08-16 17:11:22 +00:00
Sven Neumann f84608d539 If a procedure call fails, pass a string describing the error as the
2008-08-16  Sven Neumann  <sven@gimp.org>

	If a procedure call fails, pass a string describing the error as
	the second return value. First step towars fixing bug #344818.

	* app/pdb/gimpprocedure.[ch] (gimp_procedure_get_return_values):
	added a GError parameter. If it is set, pass the error message 
to
	the return values.

	* app/pdb/gimppdberror.h: added some more error codes.

	* app/pdb/gimppdb.c
	* app/xcf/xcf.c: pass errors to 
gimp_procedure_get_return_values().

	* app/plug-in/gimpplugin-message.c 
(gimp_plug_in_handle_proc_run):
	show a different error message for execution vs. calling errors.

	* app/plug-in/gimpplugin-progress.c
	(gimp_plug_in_progress_cancel_callback): pass the error
	GIMP_PDB_CANCELLED to gimp_procedure_get_return_values().

	* app/plug-in/gimppluginmanager-call.[ch]
	(gimp_plug_in_manager_call_run): removed the 
'destroy_return_vals'
	parameter.

	* app/plug-in/gimppluginprocedure.c: destroy the return values 
here.

	* app/plug-in/gimppluginprocframe.c: pass an error to
	gimp_procedure_get_return_values().

	* tools/pdbgen/app.pl
	* tools/pdbgen/pdb/fileops.pdb: generate code that passes the
	error to gimp_procedure_get_return_values().

	* app/pdb/*-cmds.c: regenerated.
	
	* plug-ins/pygimp/pygimp-pdb.c: extract the error message from 
the
	return values and pass it to the exception that is thrown.


svn path=/trunk/; revision=26593
2008-08-16 13:57:57 +00:00
Sven Neumann ada401fe48 use G_STRFUNC in another error message that I missed earlier.
2008-08-14  Sven Neumann  <sven@gimp.org>

	* app/plug-in/gimpplugin-message.c 
(gimp_plug_in_handle_proc_run):
	use G_STRFUNC in another error message that I missed earlier.


svn path=/trunk/; revision=26570
2008-08-14 21:57:39 +00:00