* plug-ins/plugin-helper/*: prototype for an extension that allows
gmodules as plugins. Known bug: crashes on gmodules with a static "query" function
* app/tools/tool.c
* app/tools/tool.h: created new GimpTool object. Did away with ToolInfo.
Most tools still need to be ported over to the new api.
* plug-ins/script-fu/script-fu-scripts.c: fixed typo in comment. Pathetic, huh?
2000-12-29 Michael Natterer <mitch@gimp.org>
* app/Makefile.am
* app/channel_pvt.h
* app/drawable_pvt.h
* app/gdisplayF.h
* app/gimpdrawableP.h
* app/gimpimageP.h
* app/layer_pvt.h
* app/toolsF.h: removed these files.
* app/apptypes.h
* tools/pdbgen/enums.pl: added tons of opaque typedefs and enums.
* tools/pdbgen/pdb/brush_select.pdb
* tools/pdbgen/pdb/brushes.pdb
* tools/pdbgen/pdb/channel.pdb
* tools/pdbgen/pdb/color.pdb
* tools/pdbgen/pdb/convert.pdb
* tools/pdbgen/pdb/display.pdb
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/fileops.pdb
* tools/pdbgen/pdb/gradient_select.pdb
* tools/pdbgen/pdb/gradients.pdb
* tools/pdbgen/pdb/help.pdb
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/layer.pdb
* tools/pdbgen/pdb/pattern_select.pdb
* tools/pdbgen/pdb/patterns.pdb
* tools/pdbgen/pdb/selection.pdb
* tools/pdbgen/pdb/tools.pdb
* app/*: chainsaw #include cleanup:
- Never (never!!) include stuff in header files except where we
need access to structures' contents (like derived objects).
- Added prototypes and proper formating in many files.
- The #include order in *all* *.c files is as follows:
#include "config.h"
#include <system stuff>
#include <gtk/gtk.h>
#include "apptypes.h"
#include "gimp stuff"
#include "libgimp stuff"
#include "libgimp/gimpintl.h"
By following this scheme we can easily see a file's dependencies
from it's #include's and can grep for the inclusion to find out
where a file is used.
* tools/pdbgen/app.pl: changed to follow the include scheme above.
* libgimp/Makefile.am
* libgimp/gimpuitypes.h: new file, included from libgimp/gimpui.h
and from app/apptypes.h.
* libgimp/gimpcolorbutton.[ch]
* libgimp/gimpdialog.[ch]
* libgimp/gimphelpui.[ch]
* libgimp/gimpparasite.[ch]
* libgimp/gimppatheditor.[ch]
* libgimp/gimpprotocol.c
* libgimp/gimpquerybox.[ch]
* libgimp/gimpsizeentry.[ch]
* libgimp/gimptypes.h
* libgimp/gimpui.h
* libgimp/gimpunit.h
* libgimp/gimpunitmenu.[ch]
* libgimp/gimpwidgets.[ch]: changed accordingly.
* plug-ins/FractalExplorer/Dialogs.c
* plug-ins/gdyntext/message_window.c
* plug-ins/imagemap/imap_default_dialog.c
* plug-ins/imagemap/imap_file.c: these files used to include
"libgimp/gimpui.h" without including "libgimp/gimp.h". This is
no longer possible because the libgimpui headers don't inlcude
"libgimp/gimpunit.h" any more.
2000-06-14 Michael Natterer <mitch@gimp.org>
* Makefile.am
* app/cursorutil.[ch]
* app/tools.c
* cursors/*: added lots of new cursors and removed old ones.
* app/gdisplay.[ch]: enabled the cursor setting parameters in
gdisplay_install_tool_cursor().
* app/bezier_select.c
* app/blend.c
* app/bucket_fill.c
* app/by_color_select.c
* app/clone.c
* app/color_picker.c
* app/crop.c
* app/disp_callbacks.c
* app/edit_selection.c
* app/eraser.c
* app/flip_tool.c
* app/ink.c
* app/iscissors.c
* app/magnify.c
* app/measure.c
* app/move.c
* app/paint_core.c
* app/rect_select.c
* app/text_tool.c
* app/transform_core.c: use the new cursors. Only the transform
tools are still using old cursors.
* app/layers_dialog.c: a tooltip for "Keep Trans."
* app/user_install.c: set the ctree's selection mode to BROWSE.
2000-05-20 Sven Neumann <sven@gimp.org>
* app/transform_core.c (transform_core_cut): when transforming
a selection in an indexed image, we used to create an indexed
tile_buffer. This gives strange (black) results later when we
use layer_new_from_tiles() since that function assumes that a
TileManager is always RGB or GRAY. Eeek!!
Instead of fixing it correctly by changing the TileManager
struct, I've unset the keep_indexed flag when calling
gimage_mask_extract(), so whatever layer_new_from_tiles()
assumes becomes true. Fixes bug #10762.
--Sven
2000-03-27 Michael Natterer <mitch@gimp.org>
* app/transform_core.c: the button_press and cursor_update
functions were still doing checks on the active layer instead of
the active drawable.
Fixing this automatically made the layers mask transformable.
2000-03-26 Michael Natterer <mitch@gimp.org>
* app/gimage_mask.[ch] (gimage_mask_extract): add an "add_alpha"
parameter to allow selected regions to be extracted without having
an alpha channel added.
* app/global_edit.c: pass add_alpha = TRUE.
* app/transform_core.[ch]: made the transform core work on
non-layer drawables even if no selection is present. Fixes#7485
and #7555.
- transform_core_cut(): extract the mask without alpha if
operating on a non-layer without having a selection.
- transform_core_paste(): return a boolean indicating success
instead of a layer and handle channels correctly.
- transform_core_do(): if the "floating_tiles" passed to the
function are from an un-floated non-layer, treat the whole
non-layer as alpha channel and never enter the loop which
transforms the (not present) color channels.
Also clip the result to ensure that the channel never grows
larger then the image.
* app/tools_cmds.c
* tools/pdbgen/pdb/tools.pdb: transform_core_paste() returns a
gboolean now.
2000-01-11 Garry R. Osgood <gosgood@idt.net>
* app/disp_callbacks.c
* app/gimage_mask.c
* app/global_edit.c
* app/interface.c
* app/layer.c
* app/layer.h
* app/transform_core.c Followup to #4708. Some clients
of layer_new_from_tiles() need to specify the
kind of layer they need; added a GimpImageType
parameter for this purpose. Closes#5045.
* app/paths_dialog.c paths_dialog_set_default_op()
now checks for the existence of the path_dialog
before manipulating its internals. Closes#5049;
2000-01-05 Michael Natterer <mitch@gimp.org>
* PLUGIN_MAINTAINERS: I'm maintaining the helpbrowser (Sven, I
dared to add your name, too :-)
* app/context_manager.c
* app/flip_tool.[ch]
* app/perspective_tool.[ch]
* app/rotate_tool.[ch]
* app/scale_tool.[ch]
* app/shear_tool.[ch]
* app/transform_core.[ch]
* app/transform_tool.[ch]
* app/tools_cmds.c
* tools/pdbgen/pdb/tools.pdb
- Show the correct help pages in the transform tools' dialogs.
- The transform tool button of the toolbox is now always pressed
if a transform tool is active (not only for "rotate").
- Replaced the transform action (CREATING, HANDLE_1, ...) and the
transform state (INIT, MOTION, ...) #define's with typed enums.
- Changed the return type of the *_recalc functions to "void"
instead of "void *" and the return type of the *_transform
functions to "TileManager *" instead of "void *".
(I probably removed an artefact here because all *_recalc
functions returned "(void *) 1").
- Use gboolean instead of int where appropriate.
- Code cleanup, indentation.
1999-09-27 Michael Natterer <mitch@gimp.org>
* app/Makefile.am
* app/gimphelp.[ch]
* app/gimpui.[ch]: new files
* app/interface.[ch]
* app/preferences_dialog.[ch]
The GIMP Help System part 1: Press "F1" in any dialog to pop up
the help page for this dialog.
Moved the widget constructors from preferences_dialog.[ch] and the
query boxes from interface.[ch] to gimpui.[ch].
The dialog constructors take a help_func and a help_data
parameter and install the "F1" accelerator which emits the new
"help" signal.
The "help" signal callback calls help_func(help_data) which finally
has to call gimp_help() which in turn invokes the help browser.
Still have to find a proper way to (1) prevent "F1" being assigned
to some menu item and (2) to catch "F1" while browsing the menu
trees in order to pop up the help for the selected item.
* app/menus.c: a <Toolbox>/File/Help... menu item.
* app/commands.[ch]: a command callback for the "Help..." menu item.
* app/gimprc.[ch]: new boolean gimprc variable "use_help".
* app/info_dialog.[ch]: pass a help function and data to the info
dialog constructor.
* app/tools.[ch]: store the tools help page names in the tool info
structure. Export a special tools_help_func() which shows the help
page for the active tool.
* app/[all files calling a dialog constructor]: pass the dialog's
help page to the constructor.
Most dialogs are now created by gimp_dialog_new() which also sets
up the action_area and the WM delete event callback, so I removed
the resp. code from these files.
Fixed some minor bugs and did some other stuff but didn't change
any logic except dialog creation.
* plug-ins/helpbrowser/helpbrowser.c: don't try to call a running
help browser and don't install any menu path (all done in
app/gimphelp.[ch] now).
1999-09-01 Tor Lillqvist <tml@iki.fi>
* app/appenv.h
* libgimp/gimpmath.h: New file. Includes <math.h>. Move G_PI,
RINT(), ROUND() etc from app/appenv.h here, so plug-ins can
use them, too. Remove some commented-out old stuff in appenv.h.
* libgimp/gimp.h: Include gimpmath.h.
* libgimp/gimp.c (gimp_main): Win32: Don't install signal
handlers, we can't do anything useful in the handler ourselves
anyway (it would be nice to print out a backtrace, but that seems
pretty hard to do, even if not impossible). Let Windows inform the
user about the crash. If the plug-in was compiled with MSVC, and
the user also has it, she is offered a chance to start the
debugger automatically anyway.
* app/*several*.c: Include gimpmath.h for G_PI etc. Don't include
<math.h>, as gimpmath.h includes it.
* plug-ins/*/*many*.c: Include config.h. Don't include <math.h>.
Remove all the duplicated definitions of G_PI and rint(). Use
RINT() instead of rint().
* app/app_procs.[ch]: app_exit() takes a gboolean.
* app/batch.c
* app/commands.c
* app/interface.c: Call app_exit() with FALSE or TRUE.
* app/main.c (on_error): Call gimp_fatal_error. (main): Don't
install any signal handler on Win32 here, either.
* app/errors.c (gimp_fatal_error, gimp_terminate): Win32: Format
the message and call MessageBox with it. g_on_error_query doesn't
do anything useful on Win32, and printf'ing a message to stdout or
stderr doesn't do anything, either, in a windowing application.
* app/gimprc.[ch]: removed cubic_interpolation variable.
* app/transform_core.c: use the interpolation_type variable
instead of the old cubic_interpolation variable.
* app/transform_core.c: Use RINT instead of rint.
* plug-ins/common/curve_bend.c
* plug-ins/sel2path/spline.c: Workarounds for gccisms, thanks to
Hans Breuer.
* app/makefile.msc
* plug-ins/makefile.msc: Misc fixes.
* app/appenv.h: Define ROUND(), RINT(), SQR(), G_PI and
G_PI_4. The latter two will presumably eventually be in
GLib. RINT() calls rint() if we have it, otherwise adds 0.5 and
calls floor().
* app/*.c: Remove the multiple identical definitions of M_PI. Use
G_PI instead of M_PI. Remove ROUND() and rint() definitions. Use
RINT() instead of rint().
app/paint_core.c: Improvements to the transform_core_do and cubic
routines by David Hodson <hodsond@acm.org>
"This fixes a number of annoying inaccuracies in transform_core.
The identity transform now leaves all pixels unchanged; previously
it shifted the image by 1/2 pixel left and up. All edges of an
image are now correctly antialiased after a transform. The cubic
interpolation function has been changed to a slightly smoother one.
The code has been tidied and rearranged for some minor improvements
in efficiency, but the basic logic and tile handling have not changed."
* app/paint_funcs.c, app/transform_core.c: replace the cubic
functions with a better/faster version supplied by
David Hodson <hodsond@acm.org>
* app/brush_select.c: double clicking on a brush preview now opens up
the brush editor. Update the text displayed when the active brush
changes size.
* app/paint_funcs.c: slight modification to overlay_pixels.
Fri Jul 9 16:47:04 MEST 1999 Sven Neumann <sven@gimp.org>
* libgimp/gimpmatrix.[ch]: added a few functions to test for
matrix properties
* app/transform_core.c: if we are doing a simple transformation
(e.g. rotating by 90 degrees), turn off interpolation
* app/rotate_tool.c: persuade the slider that a rotate angle of
180 degrees is perfectly ok
--Sven
1999-07-02 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/[all tools]: the Tool structure is now allocated by a common
constructor which sets default values and provides default tool
action functions. To get rid of much code duplication there should
be a object hierarchy of tools.
* app/context_manager.c
* app/tools.[ch]: create and destroy private contexts for the
paint tools on startup and exit. They are not used yet.
* app/interface.c
* app/menus.c
* app/tools.h: num_tools is now exported in tools.h
* app/commands.c
* app/gdisplay.c
* app/menus.c: made "Toggle Selection" a toggleable menu item.
1999-06-26 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/[all tool related files]
* app/commands.c
* app/disp_callbacks.c
* app/gdisplay.c
* app/gimage.c
* app/interface.c: hopefully fixed the bugs that appeared with my
last fix. And some more changes...
- Slightly changed the conditions which cause the tools to be
re-initialized on button_press events and the global
initialisation functions.
- The dialog tools now explicitly set tool->gdisp_ptr so they can
be properly hidden on display deletion.
- Create the crop info dialog only once and avoid ugly redraw bugs
by blocking the sizeentries' signal when initializing them.
- Standardized the tools_new_<tool>() functions. They are
scheduled to be moved to a common constructor in tools.c
- Various stuff...
1999-06-21 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/context_manager.c: namespace cleanups.
* app/commands.[ch]
* app/menus.c: moved the "Toggle Selection" menu entry to "View",
sprinkled some separators and made the layers/channels/paths popup
menus consistent with Tigert's last ops buttons change.
* app/fileops.c
* app/plug_in.c: check for gdisplay_active() returning NULL in
some more places.
* app/[all tool related files]:
- Turned the ToolAction and ToolState #define's into typedef'ed
enums, so the compiler can do some more sanity checking.
- Removed one more unused global variable "active_tool_layer".
- Removed some #include's from tools.c.
- Standardized the individual tools' structure names.
- Moved showing/hiding the tool options to separate functions.
- Stuff...
* app/commands.c
* app/disp_callbacks.c
* app/gdisplay.c
* app/tools.c: fixed the segfaults which happened when the image
of one of the tools which have dialogs (levels/posterize/...) was
deleted. My approach was to do stricter sanity checking and to set
some gdisplay pointers correctly where appropriate, so I can't
tell exactly where the bug was.
The curves tool now(??) updates on every _second_ display change
only, which is really obscure.
Finding/changing the display to operate on should definitely be
done by connecting to the user context's "display_changed"
signal.
* app/gimpset.c: emit the "remove" signal _after_ removing the
pointer from the set. If this was not a bug but a feature, please
let me know, we'll need two signals then.
1999-06-06 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/Makefile.am
* app/lc_dialog.[ch]
* app/lc_dialogP.h
* app/paths_dialogP.h: new files
* app/channels_dialog.[ch]
* app/layers_dialog.[ch]
* app/layers_dialogP.h
* app/paths_dialog.[ch]
* app/menus.[ch]
* app/file_new_dialog.c: modified
- Moved the toplevel L&C dialog code to lc_dialog.[ch]. Only
these files need knowledge about how to create/update/...
the sub-dialogs, so the corresp. functions are defined in
lc_dialogP.h.
- The popup menus are now created by menus.c. The command
callbacks are defined in [layers|channels|paths]_dialog.h.
- Private functions to be used by "friend files" are defined in
[layers|paths]_dialogP.h.
- Changed the order of the ops_buttons in the paths dialog to
match the order in the layers and channels dialogs.
- The paint mode menu and preview stuff still needs to go out of
layers_dialog.[ch].
- I'm not sure about the keybindings in the layer dialog's "Stack"
submenu because the list widget has it's own idea of PageUp/Down.
- Hopefully fixed the update problem with new images by calling
lc_dialog_flush() after creating a new image.
* app/app_procs.c
* app/bezier_select.c
* app/commands.c
* app/floating_sel.c
* app/gdisplay.c
* app/gimage.c
* app/gimage_mask.c
* app/paint_core.c
* app/preferences_dialog.c
* app/transform_core.c
* app/undo.c: changed #include's according to the new L&C file
structure.
1999-05-31 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/info_dialog.c
* app/rotate_tool.c
* app/scale_tool.c: fixed some very strange grid redraw bugs which
were caused by unblocked sizeentry signals. It's generally a bad
idea to connect to a sizeentry's signal before initialization.
Removed the workaround for the gdk assert failures about
"gc != NULL" because the signals were the real reason.
* app/transform_core.c: originally wanted to fix the bug here but
ended up with just some function headers made ansii compliant.
Thu May 27 22:00:58 BST 1999 Andy Thomas <alt@gimp.org>
* app/transform_core.c
Bezier curve display during transformation works
with corrective type of transform.
Wed May 26 21:14:15 BST 1999 Andy Thomas <alt@gimp.org>
* app/bezier_select.c
* app/bezier_selectP.h
* app/paths_dialog.c
* app/rotate_tool.c
* app/scale_tool.c
* app/transform_core.c
* app/transform_core.h
* app/transform_tool.c
* app/transform_tool.h
Add option to show currently selected path to be displayed
during the transform tool operations. (Note if > 1 path locked
only the last selected path will be shown).
Reduced flashing of control points during update drawing of paths.
Fixed problem in transform tool rotate/scale when changing
layer (used to get many gdk assert failures about "gc != NULL")
Tue Apr 13 22:17:23 BST 1999 Andy Thomas <alt@gimp.org>
Changed:-
* app/bezier_select.c
* app/bezier_select.h
* app/pathsP.h
* app/paths_dialog.c
* app/transform_core.c
* app/transform_core.h
* app/undo.c
New:-
* pixmap/locked.xpm
New image. (Your welcome to improve upon it...)
Paths can now be locked down for transformations. Click next to the
paths preview and a icon will appear. This path will "locked" during
transformations (via the transforms tool). Undo for these path
transformations is also available.
Fixed bug when creating a path for the first time when no paths dialog
visible.
Sun Jan 17 16:56:25 GMT 1999 Adam D. Moss <adam@gimp.org>
* app/blend.c app/bucket_fill.c app/convert.c app/crop.c
app/cursorutil.c app/cursorutil.h app/dialog_handler.c
app/dialog_handler.h app/fuzzy_select.c app/gdisplay.c
app/gimage_cmds.c app/gimpimage.c app/scroll.c
app/transform_core.c app/xcf.c
Hourglasses also apply to all registered dialogs. Hourglasses
added in a couple more important places. New hack lets
hourglasses be added and automagically removed again when
gimp/gtk re-enters the idle loop.
Sun Jan 11 00:24:21 GMT 1999 Austin Donnelly <austin@greenend.org.uk>
Bit of a large checkin this - it's basically three things:
1 - GimpModules using gmodules to dynamically load and
initialise modules at gimp start of day.
2 - Color selectors now register themselves with a color
notebook.
3 - progress bars have been cleaned up a bit, so now have
progress indictations on all transform tool and gradient
fill operations. Not done bucket fill, but that seems to
be the next candidate.
New directories:
* modules/: new directory for dynamically loadable modules.
New files:
* modules/.cvsignore
* modules/Makefile.am
* modules/colorsel_gtk.c: GTK color selector wrapped up as a
color selector the gimp can use.
* app/gimpprogress.[ch]: progress bars within gimp core, either as
popups, or in the status bar. This is mainly code moved out
of plug-in.c
* app/color_notebook.[ch]: color selector notebook, implementing
very similar interface to color_select.h so it can be used as
a drop-in replacement for it.
* libgimp/color_selector.h: API color selectors need to implement
to become a page in the color_notebook.
* libgimp/gimpmodule.h: API gimp modules need to implement to be
initialised by gimp at start of day.
Modified files:
* Makefile.am: add modules/ to SUBDIRS
* libgimp/Makefile.am: install gimpmodule.h and color_selector.h
* app/gimprc.[ch]: recognise module-path variable.
* gimprc.in: set module-path variable to something sensible
(currently "${gimp_dir}/modules:${gimp_plugin_dir}/modules").
* app/Makefile.am: build color notebook and gimpprogress
* app/app_procs.c: register internal GIMP color selector with
color notebook.
* app/asupsample.c: call progress function less frequently for
better performance.
* app/asupsample.h: progress_func_t typedef moved to gimpprogress.h
* app/blend.c: make callbacks to a progress function
* app/color_area.c: use a color notebook rather than a color selector
* app/color_panel.c: ditto
* app/color_select.c: export color selector interface for notebook
* app/color_select.h: color_select_init() prototype
* app/flip_tool.c: flip the image every time, rather than every
second click.
* app/interface.c: move progress bar stuff out to
gimpprogress.c. Make the code actually work while we're at it.
* app/interface.h: move prototypes for progress functions out to
gimpprogress.h
* app/plug_in.c: load and initialise modules (if possible). Move
progress bar handling code out to gimpprogress.c
* app/plug_in.h: keep only a gimp_progress * for each plugin, not
a whole bunch of GtkWidgets.
* app/scale_tool.c
* app/rotate_tool.c
* app/shear_tool.c
* app/perspective_tool.c: progress bar during operation.
De-sensitise the dialog to discourage the user from running
two transforms in parallel.
* app/transform_core.c: recalculate grid coords when bounding box
changes. Only initialise the action area of the dialog once,
to avoid multiple "ok" / "reset" buttons appearing. Undraw
transform tool with correct matrix to get rid of handle
remains on screen. Call a progress function as we apply the
transform matrix. A few new i18n markups. Invalidate
floating selection marching ants after applying matrix.
* app/transform_core.h: transform_core_do() takes an optional
progress callback argument (and data).
* plug-ins/oilify/oilify.c: send progress bar updates after every
pixel region, not only if they processed a multiple of 5
pixels (which was quite unlikely, and therefore gave a jerky
progress indication).
Sun Jan 10 23:31:45 GMT 1999 Adam D. Moss <adam@gimp.org>
* app/blend.c app/bucket_fill.c app/convert.c app/crop.c
app/cursorutil.c app/cursorutil.h app/fuzzy_select.c
app/gdisplay.c app/gdisplay.h app/gimage_cmds.c
app/gimpimage.c app/transform_core.c app/xcf.c:
Most lengthy UI-blocking operations now put up an
hourglass so the user can see that GIMP is working.
Let me know if there are other vital cases.
* i18n markings from Daniel Egger (mostly removal of tags around
PDB stuff), some constification
* I went on a sprintf pogrom. Use g_snprintf or g_strdup_printf
where applicable, to prevent overflows, especially with filenames
and translated strings. suid gimp is now more secure. ;)
-Yosh