2006-04-10 Sven Neumann <sven@gimp.org>
* app/widgets/gimpactiongroup.[ch]: take const arrays of action
entries.
* app/actions/*-actions.c: declare action arrays as const.
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-07 Michael Natterer <mitch@gimp.org>
* app/pdb/gimp-pdb.c (gimp_pdb_register)
(gimp_pdb_unregister): ref all registered procedures.
* app/xcf/xcf.c
* tools/pdbgen/app.pl: unref newly created procedures after
registering them.
* app/core/gimp.[ch]: renamed member "plug_in_proc_defs" to
"plug_in_procedures". Renamed "proc_def" variables to "procedure".
* app/actions/plug-in-actions.c
* app/menus/plug-in-menus.c: changed accordingly.
* app/plug-in/plug-ins.[ch]: keep a reference to all procs which
are in gimp->plug_in_procedures.
(plug_ins_exit): unref them all and free the list. Apparently we
were leaking them before on exit.
* app/plug-in/plug-in-def.[ch]: s/proc_defs/procedures/. Ref
procedures added with plug_in_def_add_procedure(). Added
plug_in_def_remove_procedure() which unrefs them again. Removed
"free_proc_defs" parameter from plug_in_def_free() and always
unref the procedures.
* app/plug-in/plug-in.[ch]: added plug_in_add_temp_proc() and
plug_in_remove_temp() proc. Ref the added procedures.
* app/plug-in/plug-in-message.c: use the new APIs instead of
adding/removing procs and temp procs from their lists manually.
Unref the newly created procedure after adding then to the
plug_in_def or plug_in.
* app/plug-in/plug-in-rc.[ch]
* app/plug-in/plug-ins-query.c
* tools/pdbgen/pdb/plug_in.pdb: changed accordingly.
* app/pdb/*_cmds.c: regenerated.
2006-04-07 Sven Neumann <sven@gimp.org>
* app/core/gimpimage-merge.[ch] (gimp_image_merge_visible_layers):
allow to discard invisible layers as suggested in bug #337557.
* app/actions/image-commands.c
* app/dialogs/image-merge-layers-dialog.[ch]: added a check button
to the Merge Visible Layers dialog to control the new feature.
* app/file/file-open.c
* tools/pdbgen/pdb/image.pdb: pass FALSE for the new parameter.
* app/pdb/image_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.
2006-03-31 Michael Natterer <mitch@gimp.org>
* app/pdb/gimpprocedure.[ch]: added gimp_procedure_new() and
gimp_procedure_free() functions.
* app/plug-in/plug-in-proc-def.h (struct PlugInProcDef): use a
ProcRecord pointer instead of including the entire struct.
* app/plug-in/plug-in-proc-def.c: use the new() and free()
functions above to allocate/free the ProcRecord.
* app/actions/plug-in-actions.c
* app/actions/plug-in-commands.c
* app/menus/plug-in-menus.c
* 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/plug-in/plug-ins.c
* app/xcf/xcf.c: changed accordingly.
Unrelated:
* app/pdb/gimpprocedure.c (gimp_procedure_execute): be more verbose
when warning about out-of-bounds parameter values.
* tools/pdbgen/pdb/fileops.pdb: allow GIMP_RUN_WITH_LAST_VALS for
file_save because indirect saving (e.g. remote or compressed)
needs it.
* app/pdb/fileops_cmds.c: regenerated.
2006-03-30 Michael Natterer <mitch@gimp.org>
* app/pdb/procedural_db.[ch] (struct Argument): replace the value
union by a GValue.
(procedural_db_argument_init)
(procedural_db_compat_arg_init): new functions to initialize
an Argument. They call g_value_init() on the Argument's value.
(procedural_db_arguments)
(procedural_db_return_values): initialize the returned Argument
arrays so their GValues are ready to use. Allow to get the
(unsuccessful) return values of a NULL ProcRecord.
(procedural_db_destroy_args): g_value_unset() the values. Added a
"gboolean full_destroy" parameter. Its only effect is to destroy
PDB arrays, everything else is nicely memory managed by GValue.
(procedural_db_execute)
(procedural_db_run_proc): do GValue stuff. Added n_args and
n_return_vals parameters to execute().
(procedural_db_execute_proc): private function to execute a
procedure. Validates the passed in arguments using the registered
GParamSpecs before passing them to the resp. exec method.
* app/plug-in/plug-in-params.[ch] (plug_in_params_to_args): needs
an array of ProcArgs now in order to initialize the Arguments'
GValues correctly. Passing NULL ProcArgs uses
procedural_db_compat_arg_init(), so procedures (plug-ins)
returning more values than expected work.
(plug_in_args_to_params): do GValue stuff here too.
(plug_in_args_destroy): removed this function,
procedural_db_destroy_args() does the same now.
* app/plug-in/plug-in-message.c (plug_in_handle_proc_run):
simplified quite a bit because everything returns n_return_values
now. Call plug_in_params_to_args() only of the procedure was found.
(plug_in_handle_proc_return_priv): pass ProcRecs to
plug_in_params_to_args().
* app/batch.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-ins.c
* app/plug-in/plug-in-progress.c
* app/plug-in/plug-in-run.[ch]
* app/widgets/gimphelp.c
* app/widgets/gimppdbdialog.c
* app/xcf/xcf.c
* tools/pdbgen/pdb/fileops.pdb: changed accordingly: don't
g_new/g_free Argument arrays, always use procedural_db_foo()
functions. Use GValue functions to get/set Arguments.
* tools/pdbgen/pdb.pl: added get_value_func and set_value_func to
all PDB types. Removed id_func, id_ret_func and check_func. Added
flags which indicated that a type is an ID. Removed unused utility
functions.
* tools/pdbgen/lib.pl: use the flag instead of looking at
functions and value types.
* tools/pdbgen/app.pl: use the get_value_func and set_value_func
to marshal inargs and outargs. Removed all checks performed on
inargs because that's done by GParamSpec validation now. Added the
missing bits to register excluded values with GimpParamSpecEnum.
* app/pdb/*_cmds.c: regenerated.
2006-03-24 Sven Neumann <sven@gimp.org>
* app/actions/colormap-editor-actions.c
* app/actions/gradient-editor-actions.c
* app/actions/palette-editor-actions.c
* app/core/gimp-edit.c
* app/core/gimpchannel-select.c: some more string changes, mainly
avoiding the use of FG and BG in labels where there's no need for
being concise.
2006-03-18 Sven Neumann <sven@gimp.org>
* app/actions/context-actions.c: added more action blurbs.
* menus/image-menu.xml.in: moved toolbox and fg/bg color actions
to the bottom of the Tools menu.
2006-03-10 Sven Neumann <sven@gimp.org>
* app/actions/drawable-actions.c
* app/actions/image-actions.c
* app/actions/layers-actions.c: added tooltips, more to come here.
2006-03-10 Sven Neumann <sven@gimp.org>
* app/actions/plug-in-actions.c (plug_in_actions_add_proc): use
the procedure blurb as tooltip.
* plug-ins/common/blur.c
* plug-ins/common/gauss.c
* plug-ins/common/mblur.c: rephrased some blurbs and marked them
for translation.
* app/pdb/procedural-db-query.c: formatting.
2006-03-06 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplay.c (gimp_display_reconnect): keep a
reference on the old image until the display is connected to the
new one. Fixes bug #333568.
* app/display/gimpdisplay-handlers.c: fixed typo in comment.
* app/actions/file-commands.c: cosmetics.
2006-02-25 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimpstock.h: added a define for GIMP_STOCK_DETACH
to the list of missing icons.
* app/actions/dockable-actions.c: use GIMP_STOCK_DETACH instead of
GTK_STOCK_CONVERT.
* plug-ins/common/animationplay.c: unveiled a long-standing secret
feature of the Animation Playback plug-in by. Needs more love.
2006-02-21 Michael Natterer <mitch@gimp.org>
* app/plug-in/Makefile.am
* app/plug-in/plug-in-data.[ch]: new files which keep the
plug-in data list.
* app/pdb/procedural_db.[ch]: removed here, it only cluttered the
file with unrelated functionality.
* app/core/gimp.[ch]
* app/actions/plug-in-commands.c
* tools/pdbgen/pdb/procedural_db.pdb: changed accordingly.
* app/pdb/procedural_db_cmds.c: regenerated.
2006-02-20 Michael Natterer <mitch@gimp.org>
* app/actions/file-actions.c (file_actions_setup)
* app/actions/plug-in-actions.c (plug_in_actions_setup): use ""
instead of NULL for "no label" on an action (we can't rely on the
stock item to provide the label that prevents the gtk warning from
firing).
2006-02-20 Sven Neumann <sven@gimp.org>
* app/config/gimpcoreconfig.[ch]
* app/config/gimprc-blurbs.h
* app/core/gimp.[ch]: keep a history of recently used plug-ins.
* app/plug-in/plug-in-run.[ch] (plug_in_repeat): pass an index
into the plug-in history.
* app/actions/plug-in-actions.c
* app/actions/plug-in-commands.c
* app/menus/plug-in-menus.c
* menus/image-menu.xml.in: added a submenu with recently used
plug-ins to the Filters menu. Fixes bug #148855.
2006-01-12 Sven Neumann <sven@gimp.org>
* app/actions/actions.c
* app/actions/cursor-info-actions.c
* app/actions/dialogs-actions.c
* app/config/gimprc-blurbs.h
* app/dialogs/dialogs.c
* app/dialogs/preferences-dialog.c
* app/widgets/gimphelp-ids.h: use the term Pointer instead of
Cursor when refering to the mouse pointer (bug #326700).
2005-12-30 Sven Neumann <sven@gimp.org>
* app/actions/image-actions.c
* app/actions/view-actions.c
* app/dialogs/image-properties-dialog.c: use new stock icons from
GTK+ 2.8.
2005-12-29 Sven Neumann <sven@gimp.org>
* app/widgets/gimpdialogfactory.[ch]: split
gimp_dialog_factories_toggle() into two functions. Turned the
tri-state into a simple boolean state. Dialogs are now either
shown or not, without treating the toolbox any special.
* app/actions/dialogs-commands.c
* app/display/gimpdisplayshell-callbacks.c: changed accordingly.
2005-11-27 Michael Natterer <mitch@gimp.org>
Apparently, there was a reason for implementing the window actions
separately for views and docks, fixed the bugs resulting from the
merge:
* app/actions/dock-actions.c (dock_actions_update): only update
the dock actions if the update function is called in the context
of a dock (not in the context of an image window). Fixes docks
jumping to other screens on any action on an image window on that
screen.
* app/actions/view-actions.c (view_actions_setup): add the window
actions only to action groups that live in an image window or
global popup ui manager (not to action groups that belong to a
dock or dockable). Prevents bugs similar to the one above.
2005-11-21 Sven Neumann <sven@gimp.org>
* app/actions/context-actions.c (context_brush_radius_actions):
added default keyboard shortcuts for changing the brush radius
as suggested in bug #322028.
2005-11-17 Michael Natterer <mitch@gimp.org>
* app/actions/window-actions.[ch]: connect to GdkDisplayManager
and automatically add/remove move-to-screen actions when
displays are opened/closed.
* app/menus/window-menu.c: added similar code here to add/remove
menu items for the above actions.
* app/actions/Makefile.am
* app/actions/window-commands.[ch]: new files containing window
close and move-to-screen callbacks. There is no need to implement
these twice for GimpDock and GimpDisplay.
* app/actions/dock-commands.[ch]
* app/actions/view-commands.[ch]: remove the callbacks here.
* app/actions/dock-actions.c
* app/actions/view-actions.c: changed accordingly.
2005-11-15 Michael Natterer <mitch@gimp.org>
Allow to construct a group of radio actions in multiple chunks.
(not used yet).
* app/widgets/gimpactiongroup.[ch]
(gimp_action_group_add_radio_actions): added "GSList *radio_group"
parameter and return value.
* app/actions/dockable-actions.c
* app/actions/gradient-editor-actions.c
* app/actions/quick-mask-actions.c
* app/actions/text-editor-actions.c
* app/actions/view-actions.c
* app/actions/window-actions.c: pass NULL as radio_group.