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.
This commit is contained in:
Ell
2018-07-17 02:19:58 -04:00
parent e707e55f82
commit b4ac956859
17 changed files with 401 additions and 83 deletions

View File

@ -166,6 +166,10 @@
<title>Index of new symbols in GIMP 2.10.4</title>
<xi:include href="xml/api-index-2.10.4.xml"><xi:fallback /></xi:include>
</index>
<index role="2.10.6" id="api-index-2-10-6">
<title>Index of new symbols in GIMP 2.10.6</title>
<xi:include href="xml/api-index-2.10.6.xml"><xi:fallback /></xi:include>
</index>
<index role="deprecated" id="api-index-deprecated">
<title>Index of deprecated symbols</title>
<xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>

View File

@ -507,6 +507,7 @@ gimp_file_save_thumbnail
gimp_register_magic_load_handler
gimp_register_load_handler
gimp_register_save_handler
gimp_register_file_handler_priority
gimp_register_file_handler_mime
gimp_register_file_handler_uri
gimp_register_file_handler_raw