Commit Graph

734 Commits

Author SHA1 Message Date
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