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.
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.
..."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.
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".
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.
Add the missing <Dynamics> menu location for script/plugin
registration.
modified: app/plug-in/gimppluginprocedure.c
(cherry picked from commit 9625dd92b4)
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.
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.
* 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-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
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 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-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-04-09 Michael Natterer <mitch@gimp.org>
* menus/image-menu.xml.in: add "File/New" submenu and an "Acquire"
placeholder inside it. Removed "File/Acquire". Removed the "Xtns"
menu.
* app/plug-in/plug-in-menu-path.[ch] (plug_in_menu_path_map):
add "menu_label" parameter and add support for mapping around
individual menu items while preserving their translation and
mnemonics. Add mappings for the known menus from "Xtns" and map
them to "File/New".
Map everything else in "Xtns" to "Filters/Extensions".
* app/plug-in/gimppluginmanager-menu-branch.c
(gimp_plug_in_manager_add_menu_branch): pass the menu_label so
menu branches can be mapped with their translation.
* app/plug-in/gimppluginprocedure.c
(gimp_plug_in_procedure_add_menu_path): pass NULL because mapping
menu items which have no submenu makes no sense and is redundant.
* app/actions/image-actions.c: remove the "Xtns" menu action.
* app/actions/file-actions.c: add action for the "File/New" menu
and removed the "File/Acquire" action.
* app/actions/edit-actions.c: rename "Paste as New" to
"From Clipboard".
* menus/image-menu.xml.in: add the "From Clipboard" action to the
"File/New" menu.
svn path=/trunk/; revision=25427
2008-03-20 Sven Neumann <sven@gimp.org>
* app/plug-in/gimppluginprocedure.c
(gimp_plug_in_procedure_set_file_proc): don't allow "file:" to be
registered as prefix. This seems to happen with the uri-gio plug-in
when no gvfs backends are installed.
svn path=/trunk/; revision=25139
2007-09-18 Michael Natterer <mitch@gimp.org>
* configure.in: replaced HAVE_GDK_QUARTZ conditional by
--disable-toolbox-menu configure switch which defaults to "yes"
normally and to "no" on quartz.
* app/widgets/gimptoolbox.c: changed #ifdef accordingly.
* app/plug-in/Makefile.am
* app/plug-in/plug-in-menu-path.[ch]: new generic machanism to map
around menu locations. If ENABLE_TOOLBOX_MENU is false, map
"Xtns" and "Help" from <Toolbox> to <Image>.
* app/plug-in/gimppluginmanager-menu-branch.c
* app/plug-in/gimppluginprocedure.c: run all menu paths through the
new mapping function.
* menus/Makefile.am
* menus/menus.xsl
* menus/image-menu.xml.in: add both the "Xtns" and "Help" menus to
the image menubar if TOOLBOX_MENU is false.
svn path=/trunk/; revision=23581
2007-04-24 Sven Neumann <sven@gimp.org>
* app/plug-in/gimppluginprocedure.[ch]: use GQuark for locale and
help domains to avoid duplicating the same strings many times.
* app/plug-in/gimppluginmanager-restore.c: removed FIXME.
svn path=/trunk/; revision=22304
2007-03-19 Michael Natterer <mitch@gimp.org>
* app/actions/plug-in-actions.c
* app/menus/plug-in-menus.c: GimpPlugInProcedure has a boolean
member "file_proc" now, use it instead of checking prefixes,
extensions and magics manually.
* app/plug-in/gimppluginprocedure.c
(gimp_plug_in_procedure_set_mime_type)
(gimp_plug_in_procedure_set_thumb_loader): set
plug_in_proc->file_proc to TRUE here too.
* plug-ins/common/pnm.c: register "image/x-portable-anymap" as
mime-type and "pnm" as extension for file-pnm-save so it's
recognized as file procedure.
svn path=/trunk/; revision=22152
2007-03-10 Sven Neumann <sven@gimp.org>
* app/plug-in/gimppluginprocedure.[ch]: cache the result of
gimp_plug_in_procedure_get_label() and made the return value
const.
* app/actions/plug-in-actions.c
* app/plug-in/gimpplugin-cleanup.c
* app/plug-in/gimppluginmanager.c
* app/widgets/gimpfiledialog.c
* app/widgets/gimpfileprocview.c
* app/widgets/gimpimagepropview.c: changed accordingly.
* app/file/file-open.c
* app/file/file-save.c: include the plug-in name (or actually
the
label) in the error messages.
svn path=/trunk/; revision=22095
2007-02-18 Michael Natterer <mitch@gimp.org>
* app/plug-in/gimppluginprocedure.[ch]: add "locale_domain" and
"help_domain" members and APIs to get/set them. Removed locale and
help domain parameters from all other functions.
* app/plug-in/gimpplugin.c (gimp_plug_in_add_temp_proc)
* app/plug-in/plug-in-def.c (plug_in_def_add_procedure)
(plug_in_def_set_locale_domain_name)
(plug_in_def_set_help_domain_name): make sure all plug-in procedures
have locale and help domains.
* app/plug-in/gimppluginmanager.[ch]: removed function
gimp_plug_in_manager_get_label().
* app/plug-in/gimppluginmanager.c
* app/plug-in/gimpplugin-cleanup.c
* app/actions/plug-in-actions.c
* app/widgets/gimpfiledialog.c
* app/widgets/gimpfileprocview.c
* app/widgets/gimpimagepropview.c: changed (simplified) accordingly.
svn path=/trunk/; revision=21937
2007-02-14 Sven Neumann <sven@gimp.org>
* app/actions/plug-in-actions.c
* app/plug-in/gimppluginprocedure.[ch]: added utility function to
retrieve the translated blurb of a plug-in procedure. Make sure
that gettext isn't called with the empty string.
svn path=/trunk/; revision=21917