2001-01-09 Sven Neumann <sven@gimp.org>
Merged fix from gimp-1-2:
* app/gimpbrushlist.c
* app/gradient.c
* app/palette.c
* app/patterns.c: check for NULL pointers before doing strcmp on
default names. The default names for brushes, patterns, ... can
be NULL if they were not set in a readable gimprc file.
* app/gimprc.c: warn the user if the systemwide gimprc couldn't be
read.
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-12-19 Michael Natterer <mitch@gimp.org>
* app/patterns.c: uniquefy pattern names before inserting them
into the list. This way DND (which passes only the pattern's
name) works as expected. Fixes#35258.
2000-12-18 Sven Neumann <sven@gimp.org>
Jens Lautenbacher <jtl@gimp.org>
* app/Makefile.am
* app/gimpbrushlistP.h
* app/gimpbrushpipeP.h
* app/gimpobjectP.h: removed these three files
* app/parasitelistP.h
* app/channels_dialog.c
* app/docindex.c
* app/gimpdrawable.c
* app/gimpdrawableP.h
* app/gimpimage.c
* app/gimpimageP.h
* app/gimplist.[ch]
* app/gimpobject.c
* app/gimpobject.h
* app/gimpsetP.h: changed according to header removal
* app/airbrush.c
* app/brush_select.[ch]
* app/brushes_cmds.c
* app/gimpbrush.[ch]
* app/gimpbrushgenerated.[ch]
* app/gimpbrushlist.[ch]
* app/gimpbrushpipe.[ch]
* app/gimpcontextpreview.c
* app/paint_core.c
* app/paintbrush.c
* app/pencil.c
* tools/pdbgen/pdb/brushes.pdb: Big Brushes Cleanup.
The GimpBrush* object hierarchy and the file formats were broken by
"design". This made it overly difficult to read and write pixmap
brushes and brush pipes, leading to the situation that The GIMP was
not able to read it's very own file formats. Since the GimpBrush
format did support arbitrary color depths, the introduction of a
file format for pixmap brushes was unnecessary.
The GimpBrushPixmap object is dead. GimpBrush has an additional
pixmap temp_buf and handles pixmap brushes transparently. The file
format of pixmap brushes is not any longer a grayscale brush plus
a pattern, but a simple brush with RGBA data. The old brushes can
still be loaded, but the .gpb format is deprecated.
GimpBrushPipe derives from GimpBrush. The fileformat is still a text
header, followed by a number of brushes, but those brushes are stored
in the new GimpBrush format (no pattern anymore). The pipe does not
care about the depth of the contained GimpBrushes, so we get
grayscale BrushPipes for free. Since the brush loader still loads the
old format, old .gih files can also still be loaded.
Since the brushes in the GimpBrushPipe do not any longer contain a
pointer to the pipe object, we do only temporarily switch brushes
in the paint_core routines. This is not very elegant, but the best
we can do without a major redesign.
* app/patterns.[ch]: changed the loader to work with a filedescriptor
instead of a filehandle to make it work with the new brush loading
code.
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl
* plug-ins/common/gih.c: new plug-in that saves GIH files in the
new format (loader will follow soon)
* plug-ins/common/gpb.c: removed since Pixmap Brushes are no longer
supported as a special file format.
* plug-ins/common/gbr.c: load and save brushes in the new brush format
which allows RGBA brushes too.
* plug-ins/common/pat.c: load and save grayscale patterns too
2000-10-01 Michael Natterer <mitch@gimp.org>
* app/gimpbrush.c
* app/gimpbrushpipe.c
* app/pattern_header.h
* app/patterns.c: (Hopefully) fixed#8150.
- If something goes wrong during loading, free the resp. object
immediately and close it's FD.
- When destroying, check each pointer before freeing it.
- Never use if (!gimp_brush_load_brush() || !pattern_load())
but check the return values of both calls separately.
(the original code tried to free an already destroyed temp_buf).
- stuff like below (s/sz_PatternHeader/sizeof(PatternHeader)/g etc.)
1999-11-14 Michael Natterer <mitch@gimp.org>
* app/gimpdnd.c: special handling of a dropped "Standard"
brush/pattern/gradient because they are not part of their lists.
* app/pattern.c: fill the standard_pattern with a b/w grid.
1999-11-14 Michael Natterer <mitch@gimp.org>
* app/airbrush.c
* app/apptypes.h
* app/brushes_cmds.c
* tools/pdbgen/pdb/brushes.pdb
* app/bucket_fill.c
* app/clone.c
* app/gimpbrushpipe.c
* app/paint_core.c
* app/patterns.h
* app/patterns_cmds.c
* tools/pdbgen/pdb/patterns.pdb: removed the GimpBrushP and
GPatternP types and use ordinary pointers instead.
The following stuff makes the "no_data" behaviour consistent. As a
side-effect it should make the gimp work when there are _really_ no
brushes/patterns/gradients.
* app/brush_select.c
* app/pattern_select.c: set the initial brush/pattern name to "No
Brushes/Patterns available" instead of "Active".
* app/devices.c: set the device contexts' brush/pattern/gradient
names if we started with no_data, so we find them on refresh.
* app/gimpbrushlist.c: set the name of the standard_brush to
"Standard".
* app/gimpcontext.c: don't replace the current
brush/pattern/gradient's name if the new one to be set is the
standard one. Together with the change in devices.c, this ensures
that we get what is set in devicerc. Minor fixes.
* app/gradient.c: changed gradients_init() to work like the other
data init functions. Only insert a default gradient in the
gradients list when the editor is opened (this means that the
gradients now behave like brushes/patterns when we start with
"no_data").
New function gradient_update() avoids tons of useless redraws of
all clist gradient previews whenever the gradient editor wants to
update it's large preview.
* app/gradient_select.c: don't segfault when the user tries to
drag from an empty gradient list.
* app/patterns.c: set the index of the standard_pattern to -1 to
indicate that it's not part of the pattern list.
Mon Aug 23 00:56:59 EDT 1999 Adrian Likins <alikins@redhat.com>
* app/gimpbrushhose.c
* app/gimpbrushhose.h:
removed.
* app/gimpbrushpipe.c
* app/gimpbrushpipe.h:
New files to replace the above
* app/gimpbrushlist.c
* app/paintbrush.c
* app/pixmapbrush.c
* app/Makefile.am:
s/hose/pipe. Seems someone else uses that name,
so change it to pipe.
* app/gimpbrush.c
* app/gimpbrush.h
* app/gimpbrushpixmap.c
* app/patterns.c
* app/patterns.h
* app/pixmapbrush.c:
Added functions to do the actual loading of
brush/pattern data. Use them where approriate instead
of cut&pasting the same code all over the place.
* app/pixmapbrush.c: Fix the bug where masks and brush
data werent aligned. I didnt quite notice that
paint_core_get_paint_area returns an area with a 1 pixel
border larger than the brush. Ooops.
* TODO: just update a few things while I'm at it
(pixmap/pipe stuff in particular)
* app/appenv.h: added a G_PI_2
* app/brush_header.h
* app/pattern_header.h: prefixed each FILE_VERSION with
G{BRUSH,PATTERN} to avoid namespace collision
* app/patterns.c: reflect above change
* app/iscissors.[ch]: merged in Austin's iscissors rewrite.. still
unfinished, but it's not like the old one did anything useful
anyway ;)
-Yosh
1999-07-22 Michael Natterer <mitschel@cs.tu-berlin.de>
* app/channel_ops.[ch]: new ui for the "Layer Offset" dialog.
* app/channels_dialog.c
* app/layers_dialog.c: major code cleanup: Folded some callbacks
into common ones, "widget" instead of "w", indentation, ...
* app/commands.c
* app/interface.[ch]
* app/global_edit.c: the query boxes must be shown by the caller
now. There's no need to split up the string for the message box
manually as the Gtk 1.2 label widget handles newlines corectly.
Added the "edge_lock" toggle to the "Shrink Selection" dialog.
Nicer spacings for the query and message boxes.
* app/ink.c: tried to grab the pointer in the blob preview but
failed. Left the code there as a reminder (commented out).
* app/menus.c: reordered <Image>/Select.
I was bored and grep-ed the sources for ancient or deprecated stuff:
* app/about_dialog.[ch]
* app/actionarea.[ch]
* app/app_procs.c
* app/brush_edit.c
* app/brush_select.c
* app/color_select.c
* app/convert.c
* app/devices.c
* app/gdisplay.c
* app/gdisplay_ops.c
* app/histogram_tool.[ch]
* app/info_window.c
* app/install.c
* app/ops_buttons.c
* app/palette.c
* app/palette_select.c
* app/paths_dialog.c
* app/pattern_select.c
* app/resize.c
* app/scale_toolc.c
* app/text_tool.c:
s/container_border_width/container_set_border_width/g,
s/sprintf/g_snprintf/g, replaced some constant string lengths with
strlen(x).
* app/bezier_select.c
* app/blend.c
* app/boundary.c
* app/errors.[ch]
* app/free_select.c
* app/gimpbrushlist.c
* app/gimprc.c
* app/iscissors.c
* app/main.c
* app/patterns.[ch]
* app/text_tool.c: namespace fanaticism: prefixed all gimp error
functions with "gimp_" and formated the messages more uniformly.
* app/gradient.c
* app/gradient_select.c: same stuff as above for the ui
code. There are still some sub-dialogs which need cleanup.
Did some cleanup in most of these files: prototypes, removed tons
of #include's, i18n fixes, s/w/widget/ as above, indentation, ...
done in pieces, don't expect to be able to compile on Win32 from
these sources yet. Ans of course, the official version of GTk+
doesn't include the Win32 stuff yet.
Sun Jan 10 22:41:51 GMT 1999 Andy Thomas <alt@picnic.demon.co.uk>
New
* app/dialog_handler.c
* app/dialog_handler.h
Changed
* app/disp_callbacks.c
* app/gradient_select.c
* app/tools.c
* app/interface.c
* app/patterns.c
* app/gimpbrushlist.c
* app/palette.c
* app/layers_dialog.c
* app/devices.c
* app/errorconsole.c
Can now hide/show all main dialogs using the TAB key in any window.
However....
there is a bug in gtk that causes the Gimp the crash if you show
and then hide a lot of dialogs (eg if you have all dialogs visible
and press the TAB key repeatedly). I have email-ed an example to
the gtk bug list.
Also I can't seem to be able to catch the SHIFT-TAB combination
(suggestions welcome ;-) so the first press of the tab hide all
dialogs the second press reshows only the toolbox and the third
press reshows all. Comments please if you find this behaviour
non-intuitive.
Thu Oct 1 22:39:14 BST 1998 Andy Thomas <alt@picnic.demon.co.uk>
* app/patterns.c app/pattern_select.c app/internal_procs.c
* app/patterns.h app/pattern_select.h app/plug_in.c
* libgimp/gimpmenu.h libgimp/gimpmenu.c libgimp/Makefile.am
* plug-ins/gfig/gfig.c plug-ins/script-fu/scripts/test-sphere.scm
* plug-ins/script-fu/script-fu.c plug-ins/script-fu/script-fu-enums.h
* plug-ins/script-fu/script-fu-scripts.c
* New libgimp/gimppatternmenu.c
Pattern dialog can now be controlled via the PDB. New widget (not true
widget) type added to libgimpui (gimp_pattern_select_widget()). Plugins
should easily be able to control & select patterns. Script-fu
updated to use new widget. See the test script for example.
Tue Jun 9 19:47:19 1998 Owen Taylor <otaylor@gtk.org>
* app/brushes.c app/drawable.c app/patterns.c
app/procedural_db.c plug-ins/script-fu/script_fu_server.c
Fixes for warnings generated by changing GCompareFunc
and GHashFunc to take const arguments.
* redid the error message handling. g_message now calls message_box or prints
to console depending on whether the no_interface is set or not. gimp-message
is also exported to the PDB as a wrapper to g_message, and libgimp has a new
API: gimp_message. libgimp also overrides g_message for all plugins. Converted
lots of messages in app/* to g_message. Made script-fu a little friendlier.
* updated the regex code from grep 2.2
* said goodbye to the old script-fu logo in script-fu.h
-Yosh
* app/app_procs.c app/brush_select.c app/brushes.c
app/brushes.h app/convert.c app/gradient.c app/gradient.h
app/palette.c app/palette.h app/pattern_select.c app/patterns.c
app/patterns.h: Fixed up --no-data so that the various *_init()
routines always get called, and so that when in interactive mode
the data can be loaded by the user even when started with --no-data.
Fixes the blend bug too...
yeah, sven scooped me... but i think this is still a needed patch...
-adrian