Turn all ID param specs into object param specs (e.g. GimpParamImageID
becomes GimpParamImage) and convert between IDs and objects in
gimpgpparams.c directly above the the wire protocol, so all of app/,
libgimp/ and plug-ins/ can deal directly with objects down to the
lowest level and not care about IDs.
Use the actual object param specs for procedure arguments and return
values again instead of a plain g_param_spec_object() and bring back
the none_ok parameter.
This implies changing the PDB type checking functions to work on pure
integers instead of IDs (one can't check whether object creation is
possible if performing that check requires the object to already
exist).
For example gimp_foo_is_valid() becomes gimp_foo_id_is_valid() and is
not involved in automatic object creation magic at the protocol
level. Added wrappers which still say gimp_foo_is_valid() and take the
respective objects.
Adapted all code, and it all becomes nicer and less convoluted, even
the generated PDB wrappers in app/ and libgimp/.
Change all action callbacks so they can be invoked by a GAction:
- add GimpActionCallback typedef:
void (* cb) (GimpAction*, GVariant*, gpointer)
- change all action callbacks to the GimpActionCallback signature
- add "gimp-activate" and "gimp-change-state" signals to GimpAction,
with the same signature as the resp. GAction signals
- remove all other custom action signals and only use the new
GimpAction signals
- pass around appropriate GVariants containing booleans, int32,
strings
- badly hack around to force a GimpProcedure pointer into a
uint64 variant
- remove all G_CALLBACK() casts from all action callbacks,
they all have the same signature now
which gets added automatically by procedure_commands_get_display_args().
Move the non-interactive and run-with-last-vals code to
gimp_gegl_procedure_execute() (not execute_async()) because it makes
more sence to call it synchronously anyway (not implemented yet).
This commit should change no behavior.
Try to sort all GIMP_ICON_* defines into FDO categories like in
https://specifications.freedesktop.org/icon-naming-spec/latest/ar01s04.html
Add defines for all icons we override, rename some icons to their FDO
standard names, and mark the ones we duplicate with a comment so we
don't forget to rename those to standard names in 3.0.
Nobody has them anymore, and they are deprecated in GTK+ 3.x. This
also fixes all conflicting mnemonics except those I missed, but we can
fix them now.
Add GimpGeglProceure to keep track of recently used GEGL operations in
the filter history. The new procedure also takes care of running the
op in the GEGL tool, so filters-commands.c is almost empty now.
Change gimp-filter-history.c to find procedures by name instead of
comparing pointers.
The only thing missing now is rerunning a GEGL op with the last
settings (not just showing its UI).
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
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-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
2007-04-12 Sven Neumann <sven@gimp.org>
* app/actions/plug-in-commands.c: if a plug-in or script
registered with a DISPLAY argument after the run-mode argument,
then pass the ID of the active display to the script, optionally
followed by image and drawable IDs.
* plug-ins/script-fu/scheme-wrapper.c
* plug-ins/script-fu/script-fu-enums.h
* plug-ins/script-fu/script-fu-interface.c
* plug-ins/script-fu/script-fu-scripts.c
* plug-ins/script-fu/script-fu-types.h: added SF-DISPLAY parameter.
svn path=/trunk/; revision=22241
2006-11-17 Simon Budig <simon@gimp.org>
* app/core/gimpparamspecs.c: Hack up gimp_value_set_item() to do
the correct thing for subtypes of GimpItems.
* app/actions/plug-in-commands.c: Don't rely on the GimpValues for
type checking, pass the param specs to the _collect functions and
use them for typechecking.
2006-10-29 Michael Natterer <mitch@gimp.org>
* app/actions/plug-in-actions.c (plug_in_repeat_action): use the
"value" field for the GimpRunMode, it used to be "0" to reference
the first plug-in in the history.
* app/actions/plug-in-commands.[ch] (plug_in_repeat_cmd_callback):
always pick the first item from the history and use the passed
value as GimpRunMode instead of determining it from the action's
name.
2006-10-29 Michael Natterer <mitch@gimp.org>
* app/actions/plug-in-actions.c: use GimpPlugInActions instead of
GimpEnumActions so the menu items show any kind of icons (not only
stock-id icons). Now if any plug-in that shows up in the history
registered non-stock-id icons, this change would be actually
useful ;) Fixes bug #338525.
* app/actions/plug-in-commands.[ch] (plug_in_history_cmd_callback):
new callback for the history, much simpler than
plug_in_repeat_cmd_callback().
2006-09-06 Sven Neumann <sven@gimp.org>
* app/actions/plug-in-commands.c (plug_in_run_cmd_callback)
(plug_in_repeat_cmd_callback): also add the procedure to the
history if it is called from the "Repeat" or "Re-Show" menus.
* plug-ins/common/vpropagate.c: changed progress text.
2006-08-08 Sven Neumann <sven@gimp.org>
* app/plug-in/Makefile.am
* app/plug-in/gimppluginmanager-history.[ch]: new files that
deal
with the history of plug-in procedures.
* app/actions/plug-in-actions.[ch]
* app/plug-in/gimppluginmanager.[ch]: changed accordingly.
2006-08-08 Sven Neumann <sven@gimp.org>
* app/actions/plug-in-commands.c (plug_in_run_cmd_callback): add
all procedures that take an image paramter to the history of
last-used procedures. Fixes bug #348243.
(plug_in_repeat_cmd_callback): use
plug_in_collect_drawable_args()
to construct the procedure arguments.
* app/actions/plug-in-actions.c
* app/plug-in/gimppluginmanager.[ch]: renamed "last_plug_ins" to
"history"; it's actually a list of procedures.
2006-06-16 Michael Natterer <mitch@gimp.org>
Allow plug-ins to register in <Layers>, <Channels>, <Vectors> and
<ColormapEditor>:
* app/pdb/gimppluginprocedure.c
(gimp_plug_in_procedure_add_menu_path): added the argument type
checks for the new locations. Factored out duplicated code.
* app/menus/menus.c (menus_init): add the "plug-in" action
group to the resp. UI managers.
* app/menus/plug-in-menus.c (plug_in_menus_menu_path_added):
support them here too.
* app/widgets/gimpimageeditor.[ch]
* app/widgets/gimpitemtreeview.[ch]: added get_image() functions.
* app/actions/plug-in-commands.c: added new utility functions
which collect plug-in arguments from GimpImageEditor and
GimpItemTreeView widgets.
* menus/channels-menu.xml
* menus/colormap-editor-menu.xml
* menus/layers-menu.xml
* menus/vectors-menu.xml: added separators.
* menus/image-menu.xml.in: added a "Colormap" placeholder in
Colors/Map
* plug-ins/common/colormap-remap.c (query): register a menu
entry in <ColormapEditor> and moved the existing one to the
"Colormap" placeholder. Also register an icon to make this
menu item clearly distinct from the others in that menu.
Unrelated:
* plug-ins/common/colormap-remap.c (run): cleaned up quite a
bit. Fixed last-vals code and simplified map handling.
(remap_swap): removed, folded into run().
(remap_dialog): use the passed map to initialize the dialog so it
starts with the last-vals. Tweaked layout to have 16 columns
and simplified cell renderer creation.
2006-05-22 Sven Neumann <sven@gimp.org>
* app/actions/plug-in-commands.c (plug_in_collect_image_args):
removed debugging output.
* app/tools/gimpscaletool.c: create the GimpSizeBox in the
prepare() method to make entering relative sizes work.
2006-05-17 Michael Natterer <mitch@gimp.org>
* app/actions/plug-in-commands.c: moved the collection of plug-in
args to a utilty function. Add another function that is called
when the plug-in lives in <Brushes>, <Palettes> etc. and pass the
active object's name to the plug-in.
* plug-ins/pygimp/plug-ins/Makefile.am
* plug-ins/pygimp/plug-ins/palette-offset.py
* plug-ins/pygimp/plug-ins/palette-sort.py
* plug-ins/pygimp/plug-ins/palette-to-gradient.py: added new
scripts written by Joao S. O. Bueno Calligaris and fixed by Carol
Spears. Changed them myself again. The stuff doesn't work as
expected because python-fu has too much asumptions in its
register() code, and the sort script doesn't implement all modes
of Adrian's palette sorting perl script. Addresses bug #104639.
2006-04-27 Michael Natterer <mitch@gimp.org>
* app/actions/plug-in-commands.c (plug_in_repeat_cmd_callback):
truncate the value array to the number of actually set parameters.
2006-04-07 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in-run.[ch]: made plug_in_run_temp() public and
changed its parameters to match the ones of plug_in_run().
* app/pdb/gimpprocedure.[ch]: added GimpProcedure::execute_async()
which takes an additional display_ID parameter and returns nothing.
* app/pdb/gimppluginprocedure.c
* app/pdb/gimptemporaryprocedure.c: implement it, using
plug_in_run() and plug_in_run_temp().
* app/core/gimp-utils.[ch]: added gimp_value_array_truncate()
which takes a GValueArray and the number of values to truncate the
array to.
* app/actions/plug-in-commands.c
* app/actions/vectors-commands.c
* app/pdb/gimp-pdb.c
* app/plug-in/plug-ins.c
* app/widgets/gimphelp.c: use gimp_procedure_execute_async()
instead of plug_in_run() and don't #include "plug-in-run.h".
Truncate GValueArray passed to plug-ins again, and don't just pass
some default values to the noninteractive args.
Unrelated:
* tools/pdbgen/pdb/plug_in.pdb: don't call
gimp_menus_create_branch() here.
* app/plug-in/plug-ins.c (plug_ins_menu_branch_add): call it here
instead.
* app/pdb/plug_in_cmds.c: regenerated.
2006-04-06 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in-run.[ch]: removed plug_in_repeat()...
* app/actions/plug-in-commands.c: ...and merged it into
plug_in_repeat_cmd_callback(). It's essentially the same code as
plug_in_run_cmd_callback() and there's no reason (except
historical ones) to keep its implementation separate.
2006-04-05 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in-types.h
* app/plug-in/plug-in-proc-def.[ch]: renamed to GimpPlugInProcedure
and made a GObject derived from GimpProcedure (instead of having
a pointer to a GimpProcedure). Added image_types and file_magic
utility functions taken from plug-ins.[ch]. Still lives in the
same crappy files because I am undecided where to put it...
* app/pdb/gimpprocedure.c (gimp_procedure_real_execute): removed
switch() statement and always call the internal marshaller because
GimpProcedure::execute() is properly overridden by
GimpPlugInProcedure now.
* app/plug-in/plug-ins.[ch]: removed the mime_type and file_magic
utilities added to GimpPlugInProcedure.
* app/actions/file-commands.c
* app/actions/plug-in-actions.[ch]
* app/actions/plug-in-commands.[ch]
* app/core/gimp-gui.[ch]
* app/core/gimp.[ch]
* app/core/gimpimage.[ch]
* app/dialogs/file-open-dialog.c
* app/dialogs/file-save-dialog.c
* app/dialogs/print-size-dialog.c
* app/file/file-open.[ch]
* app/file/file-save.[ch]
* app/file/file-utils.[ch]
* app/gui/gui-vtable.c
* app/menus/plug-in-menus.[ch]
* app/plug-in/plug-in-def.[ch]
* app/plug-in/plug-in-message.c
* app/plug-in/plug-in-rc.c
* app/plug-in/plug-in-run.c
* app/plug-in/plug-in.c
* app/plug-in/plug-ins-query.c
* app/widgets/gimpactiongroup.[ch]
* app/widgets/gimpdnd-xds.c
* app/widgets/gimpfiledialog.[ch]
* app/widgets/gimpfileprocview.[ch]
* app/widgets/gimppluginaction.[ch]
* app/xcf/xcf.c
* tools/pdbgen/pdb/fileops.pdb
* tools/pdbgen/pdb/plug_in.pdb: changed addordingly.
* app/pdb/fileops_cmds.c
* app/pdb/plug_in_cmds.c: regenerated.
2006-04-03 Michael Natterer <mitch@gimp.org>
* app/core/gimpparamspecs.[ch]: added a shitload of new GTypes and
corresponding GParamSpecs to use them as PDB arguments.
Each GimpPDBArgType has one or more corresponding GTypes in the
core now.
* app/pdb/gimpargument.[ch] (struct GimpArgument)
(struct GimpArgumentSpec): removed "value" member because the
GValue's/GParamSpec's GType carries just as much information now.
(gimp_argument_type_to_pdb_arg_type): new function which maps
GTypes to GimpPDBArgType.
(gimp_pdb_arg_type_to_string): formerly known as
procedural_db_type_name().
* app/pdb/gimpprocedure.[ch]
* app/pdb/procedural_db.[ch]: completely switch to GValue. Use the
new GParamSpecs for procedure arguments. GimpPDBArgType is only
used for adding compat args/values of plug-in procedures.
(procedural_db_run_proc): the va_list expects a sequence of
(GType, value, GType, value, ..., G_TYPE_NONE) now.
* app/plug-in/plug-in-params.[ch]: changed accordingly.
(plug_in_param_defs_check): removed this function.
* app/plug-in/plug-in-message.c (plug_in_handle_proc_install): use
plug_in_proc_args_check() instead and initialize the GimpProcedure
before doing so.
* tools/pdbgen/app.pl
* tools/pdbgen/pdb.pl: use the new param spec types and their
utility functions. Changed argument/value registration
accordingly.
* app/pdb/procedural-db-query.c
* app/actions/plug-in-commands.c
* app/actions/vectors-commands.c
* app/core/gimppdbprogress.c
* app/dialogs/about-dialog.c
* app/file/file-open.c
* app/file/file-save.c
* app/plug-in/plug-in-progress.c
* app/plug-in/plug-in-rc.c
* app/plug-in/plug-ins.c
* app/widgets/gimpbrushselect.c
* app/widgets/gimpfontselect.c
* app/widgets/gimpgradientselect.c
* app/widgets/gimphelp.c
* app/widgets/gimppaletteselect.c
* app/widgets/gimppatternselect.c
* tools/pdbgen/pdb/fileops.pdb
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/procedural_db.pdb: changed accordingly.
* app/pdb/*_cmds.c: regenerated.