2002-02-05 Michael Natterer <mitch@gimp.org>
Removed pointer grabbing from all tools:
* app/tools/gimptool.[ch]: added "gboolean perfectmouse" which
defaults to FALSE but can be set to TRUE in a tool's instance_init
function.
* app/display/gimpdisplayshell-callbacks.c: look at
active_tool->perfectmouse and gimprc.perfectmouse and do the
pointer grab/ungrab here. The pointer is now grabbed right before
dispatching the button_press to the tool and ungrabbed after
the tool's button_release has returned. It is also grabbed
*always*, not only if tool->state got ACTIVE by button_press,
which makes it all much simpler...
* app/tools/gimpbezierselecttool.c
* app/tools/gimpblendtool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpbycolorselecttool.c
* app/tools/gimpclonetool.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpcroptool.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpfliptool.c
* app/tools/gimpfreeselecttool.c
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimpinktool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimpmagnifytool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimpmovetool.c
* app/tools/gimppainttool.c
* app/tools/gimppathtool.c
* app/tools/gimprectselecttool.c
* app/tools/gimpselectiontool.c
* app/tools/gimptexttool.c
* app/tools/gimptransformtool.c: removed
gdk_pointer_grab()/ungrab() calls all over the place. Also removed
inclusion of "display/gimpdisplayshell.h" from most of them.
2002-02-04 Michael Natterer <mitch@gimp.org>
* app/tools/gimptool.[ch]: added fields for both the tool's
toggled and untoggled GdkCursorType, GimpToolCursorType and
GimpCursorModifier. Added a default implementation of
gimp_tool_cursor_update() which uses the new fields. Added
gimp_tool_set_cursor() as simple wrapper around the resp.
GimpDisplayShell functions so tools don't need to know them.
Tool implementations can either set the new fields in their
cursor_update() function and chain up or call the new wrapper.
* app/tools/gimpbezierselecttool.c
* app/tools/gimpblendtool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpbycolorselecttool.c
* app/tools/gimpclonetool.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpconvolvetool.c
* app/tools/gimpcroptool.c
* app/tools/gimpdodgeburntool.c
* app/tools/gimperasertool.c
* app/tools/gimpfliptool.c
* app/tools/gimpinktool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimpmagnifytool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimpmovetool.c
* app/tools/gimppainttool.[ch]
* app/tools/gimppathtool.c
* app/tools/gimpselectiontool.c
* app/tools/gimpsmudgetool.c
* app/tools/gimptexttool.c
* app/tools/gimptransformtool.c: changed accordingly:
- set default values in the tools' instance_init functions.
- changed the cursor_update() stuff.
- removed inclusion of subclasses in gimppainttool.c
- the cursor_update() functions are better than before but still evil.
- i probably broke some of them...
2002-02-03 Michael Natterer <mitch@gimp.org>
* app/display/Makefile.am
* app/display/display-types.h
* app/display/gimpstatusbar.[ch]: new widget derived from
GtkStatusbar. Contains the coordinates display, a progress bar
which is also used for status message display and a cancel button.
Added a simplified API for pushing/popping messages which takes a
string as context_id and does the conversion to guint internally
on each call.
* app/display/gimpdisplayshell.[ch]: removed the status bar code.
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell-handlers.c
* app/display/gimpdisplayshell-scale.c
* app/gui/view-commands.c
* app/gimpprogress.c: changed accordingly.
Removed knowledge about GimpDisplayShell from tools:
* app/tools/gimptool.[ch]: added gimp_tool_push_status() and
gimp_tool_pop_status() so tools don't need to fiddle with
display details.
* app/tools/gimpdrawtool.[ch]: pass a GimpDisplay instead of
a GdkWindow to gimp_draw_tool_start() (the window passed was
always gdisp->shell->canvas->window).
* app/tools/gimpbezierselecttool.c
* app/tools/gimpblendtool.[ch]
* app/tools/gimpclonetool.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpcroptool.[ch]
* app/tools/gimpeditselectiontool.c
* app/tools/gimpfreeselecttool.c
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimpmagnifytool.c
* app/tools/gimpmeasuretool.[ch]
* app/tools/gimpmovetool.c
* app/tools/gimppainttool.[ch]
* app/tools/gimppathtool.c
* app/tools/gimprectselecttool.[ch]
* app/tools/gimptransformtool.c: changed accordingly:
- pass GimpDisplay to gimp_draw_tool_start().
- use GimpTool's new status push/pop functions.
- removed the statusbar context_id from all tool structs.
* app/gui/dialogs-constructors.[ch]: a bit cleanup in preparation
of dockable editor dialogs.
2001-12-14 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.[ch]: added
GIMP_IMAGE_TYPE_IS_[RGB|GRAY|INDEXED]() and
GIMP_IMAGE_TYPE_BASE_TYPE() macros.
* app/plug-in/plug-in.[ch]: new enum PlugInImageType instead of
multiple #defines.
* app/gui/file-dialog-utils.[ch]: file_dialog_update_menus(): take
a GimpImageType instead of the PlugInImageType.
* app/core/gimpdrawable-preview.c
* app/core/gimpdrawable-transform.c
* app/core/gimpdrawable.c
* app/core/gimpimage-contiguous-region.c
* app/core/gimpimage-mask.c
* app/core/gimpimage-merge.c
* app/core/gimplayermask.c
* app/core/gimppalette-import.c
* app/display/gimpdisplay-handlers.c
* app/display/gimpdisplayshell-render.c
* app/gui/file-save-dialog.c
* app/gui/toolbox.c
* app/tools/gimpclonetool.c
* app/tools/gimpcolorpickertool.c
* tools/pdbgen/pdb/convert.pdb
* tools/pdbgen/pdb/image.pdb: use the new macros, cleanups like
storing GimpImageType in GimpImageType variables, not just gint.
* app/pdb/convert_cmds.c
* app/pdb/image_cmds.c: regenerated.
* app/widgets/gimpdialogfactory.c: save the state of the "Auto"
button in sessionrc.
2001-11-22 Michael Natterer <mitch@gimp.org>
* app/tools/gimpclonetool.c
* app/tools/gimpconvolvetool.c
* app/tools/gimpcroptool.c
* app/tools/gimpdodgeburntool.c
* app/tools/gimpmagnifytool.c
* app/tools/paint_options.c
* app/tools/transform_options.c: removed the remaining cases of
we-rely-on-the-radio-buttons-being-in-the-same-order-as-the-enum
and use gimp_radio_group_set_active() instead.
Use GINT_TO_POINTER(gint) instead of (gpointer)gint all over
the place.
2001-11-20 Michael Natterer <mitch@gimp.org>
* app/tools/tools-types.h: added GimpToolRegisterFunc,
GimpToolRegisterCallback and GimpToolOptionsNewFunc typedefs
which are used to register tools.
* app/tools/tools.c: put the register funcs in an array of
GimpToolRegisterFuncs. Pass a Gimp pointer *plus* a
GimpToolRegisterCallback (which is tool_manager_register_tool())
to the tools' register functions.
* app/tools/tool_manager.[ch]: added a GimpToolOptionsNewFunc to
the parameters of tool_manager_register_tool(). Create the tool
options here, not in each tool.
* app/tools/paint_options.[ch]
* app/tools/selection_options.[ch]
* app/tools/tool_options.[ch]
* app/tools/transform_options.[ch]: all _init() and _new()
functions take a GimpToolInfo pointer now. The _reset() func needs
to be set manually now.
* app/tools/[all_tools].[ch]: changed accordingly:
- pass GimpToolOptionsNewFuncs to the register callback.
- don't create the tool options in the tools' _init() function.
- removed all static tool options variables.
- get the options from the tool system in the cases i missed
in my last commit.
- added minor hacks to get rid of the static options pointer
in some pathological cases :) (i.e. the ink tool).
2001-11-20 Michael Natterer <mitch@gimp.org>
* app/core/gimp.c: put a g_object_ref() on a different line.
* app/core/gimpdrawable-bucket-fill.c
* app/core/gimpmodules.c: ne need to #include "core/..." here.
* app/display/gimpdisplay-handlers.c: added debugging output
because we have an image refcounting problem :(
* app/display/gimpdisplayshell-handlers.c: fixed a signal
disconnection.
* app/tools/gimpbezierselecttool.[ch]
* app/tools/gimpblendtool.c
* app/tools/gimpbucketfilltool.c
* app/tools/gimpbycolorselecttool.c
* app/tools/gimpclonetool.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpcroptool.c
* app/tools/gimpellipseselecttool.c
* app/tools/gimpfreeselecttool.c
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimpinktool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimpmagnifytool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimprectselecttool.c
* app/tools/gimpsmudgetool.c: get the tool's options via
tool->tool_info->tool_options, not from the local statis pointer.
Some minor cleanups & function reordering.
* app/widgets/gimpdockbook.c: return TRUE from the notebook tabs'
"button_press" handler, connect DND before cnnecting to
"button_press" because we now stop it's emission.
2001-11-12 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-callbacks.c: use
gimp_display_shell_[install|remove]_override_cursor() to set the
middle mouse button move cursor so we get the original cursor back
after scrolling.
* app/tools/gimpdrawtool.[ch]: added lots of drawing functions
(gimp_draw_tool_draw_rectangle() etc.) which work in image (or
active drawable) coordinates.
* app/tools/gimpblendtool.c
* app/tools/gimpclonetool.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpellipseselecttool.c
* app/tools/gimpfreeselecttool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimpmagnifytool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimppainttool.c
* app/tools/gimppathtool.c
* app/tools/gimprectselecttool.c
* app/tools/gimptransformtool.[ch]
* app/tools/path_tool.[ch]: use the new functions. Removed tons of
gdk_draw_foo() and gdisplay_transform_foo() calls. Most drawing
functions look *much* nicer now. Ported some tools to detect
handle clicks in display coordinates while I was on it, misc
fixes.
* app/tools/gimpmovetool.[ch]: derive from GimpDrawTool instead
of drawing manually.
2001-11-08 Michael Natterer <mitch@gimp.org>
* app/Makefile.am: build display/ before tools/.
* app/devices.c: devices_check_change(): added all events
which have a GdkDevice pointer.
* app/gimpprogress.c: include "display-types.h" instead of
"core-types.h".
* app/core/Makefile.am
* app/core/gimpdrawable-bucket-fill.[ch]: new files: the bucket_fill
stuff taken from tools/gimpbucketfilltool.[ch].
* app/core/core-types.h: added "BucketFillMode".
* app/core/gimpimage-mask-select.[ch]: cleanup.
* app/core/gimpmarshal.list: added more marshallers for GimpTool's
new signal signatures.
* app/core/gimpmarshal.[ch]: regenerated.
* app/display/Makefile.am
* app/display/gimpdisplayshell-dnd.[ch]
* app/display/gimpdisplayshell-layer-select.[ch]: new files: the
canvas drop callbacks from gimpdisplayshell-callbacks.[ch] and
the stuff formerly knows as gui/layer-select.[ch].
* app/display/gimpdisplay.h: don't include "gui/gui-types.h".
* app/display/gximage.c: include "display-types.h".
* app/display/gimpdisplay-foreach.c
* app/display/gimpdisplayshell.[ch]: call gdsplay_delete(), don't
destroy the shell widget.
* app/gui/Makefile.am
* app/gui/layer-select.[ch]: removed.
* app/gui/gradients-commands.c: fixed "Save as POV" fprintf()s.
* app/gui/preferences-dialog.c: removed the layer_select stuff
because it is useless with the new preview system.
* app/gui/tool-options-dialog.c: send the correct data to the
close_callback.
* app/gui/tools-commands.c: changed to follow the new
gimp_tool_initialize() semantics (see below).
Tool & canvas event handling chainsawing:
* app/tools/tools-types.h: new struct GimpCoords which contains
x, y, pressure, tilt etc.
* app/display/gimpdisplayshell-callbacks.[ch]: added utility
functions which transparently retreive the current event's
GimpCoords or take it from the device directly if the event has
none. Pass GimpCoords _in_image_coordinates_ to all tool
functions.
Most important: don't pass GdkEvents and display coordinates to
tools any more.
* app/tools/gimptool.[ch]: changed virtual functions to take
GimpCoords, time and state separately instead of GdkEvents.
* app/tools/gimpbezierselecttool.c
* app/tools/gimpblendtool.c
* app/tools/gimpbucketfilltool.[ch]
* app/tools/gimpbycolorselecttool.c
* app/tools/gimpclonetool.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpconvolvetool.c
* app/tools/gimpcroptool.[ch]
* app/tools/gimpcurvestool.c
* app/tools/gimpdodgeburntool.c
* app/tools/gimpdrawtool.c
* app/tools/gimpeditselectiontool.[ch]
* app/tools/gimperasertool.c
* app/tools/gimpfliptool.c
* app/tools/gimpfreeselecttool.[ch]
* app/tools/gimpfuzzyselecttool.c
* app/tools/gimpinktool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimpmagnifytool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimpmovetool.c
* app/tools/gimppainttool.c
* app/tools/gimppathtool.[ch]
* app/tools/gimprectselecttool.c
* app/tools/gimprotatetool.c
* app/tools/gimpselectiontool.[ch]
* app/tools/gimpsmudgetool.c
* app/tools/gimptexttool.c
* app/tools/gimptransformtool.[ch]
* app/tools/path_tool.[ch]
* app/tools/selection_options.c: tons and tons of changes:
- changed to use the new virtual function parameters.
- removed zillions of gdisplay_untransform_coords().
- get the active drawable's offsets manually in many cases.
(questionable, but IMHO ok because it's obvious and not simply a
"TRUE" passed to some function)
- reordered some functions to be consistent across tools.
- some tools had to be changed to work on image coords, not
display ones (esp. crop).
- fixed strange rotate tool behaviour which should be backported
to stable.
- some stuff i came across.
- indentation and other paranoia.
- rounding of coordinated may be broken in some tools.
- new bugs guaranteed.
* app/tools/tool_manager.[ch]: new semantic of
tool_manager_initialize_active() (looked at the places where it
was used from and put common code together). Should be a bit
better now :)
* app/tools/gimpblendtool.c
* app/tools/transform_options.c: use the new GTK+ feature that a
widget (toggle button) can be a frame's title for this tools' tool
options.
* app/widgets/widgets-types.h: stuff.
* themes/Default/gtkrc: s/GtkDialog/GimpDialog/.
* tools/pdbgen/Makefile.am: don't scan tools/gimpbucketfilltool.h
any more.
* tools/pdbgen/enums.pl: regenerated.
* tools/pdbgen/pdb/tools.pdb: changed bucket_fill wrapper.
* app/pdb/tools_cmds.c: regenerated.
2001-10-29 Michael Natterer <mitch@gimp.org>
Cleanup weekend...
* app/app_procs.c: pass "no_interface" to gimp_new().
* app/core/gimp.[ch]: added "gboolean no_interface" and the
load_procs and save_procs GSLists.
* app/core/gimptoolinfo.[ch]: added a "Gimp" pointer to the
GimpToolInfo object so more functions find their context without
accessing the global "the_gimp" variable.
* app/display/display-types.h: removed the GDisplay -> GimpDisplay
typedef.
* app/display/gimpdisplay.c: look at gimp->no_interface, don't
include "appenv.h".
* app/file/file-open.[ch]
* app/file/file-save.[ch]: don't use "the_gimp" any more. Instead,
pass around lots of "Gimp" pointers. Removed the global load_procs
and save_procs variables here. Use access() to find out whether a
file is readable/writable, removed the manual voodoo and it's
Win32 wrappers. Added an optional (can be NULL) "PlunInProcDef"
parameter to file_save(), removed file_save_with_proc().
* app/gui/menus.c: Use the unused "gpointer data" parameter of the
GtkItemFactory callbacks to pass a "Gimp" pointer to all of them.
This reduces the usage of the global "the_gimp" hack to zero
in app/gui/... yeah.
* app/gui/channels-commands.c
* app/gui/edit-commands.c
* app/gui/file-commands.c
* app/gui/image-commands.c
* app/gui/layers-commands.c
* app/gui/palettes-commands.c
* app/gui/select-commands.c
* app/gui/test-commands.c
* app/gui/tools-commands.c
* app/gui/view-commands.c: use the passed "Gimp" pointer.
* app/gui/color-area.[ch]
* app/gui/convert-dialog.c
* app/gui/dialogs-constructors.c
* app/gui/file-new-dialog.[ch]
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.[ch]
* app/gui/gui.c
* app/gui/info-window.[ch]
* app/gui/module-browser.[ch]
* app/gui/palette-editor.c
* app/gui/palette-import-dialog.[ch]
* app/gui/paths-dialog.c
* app/gui/preferences-dialog.[ch]
* app/gui/resize-dialog.[ch]
* app/gui/tool-options-dialog.[ch]
* app/gui/toolbox.c: pass around lots more "Gimp" and
"GimpContext" pointers and don't use "the_gimp" any more.
* app/tools/gimptool.h: added a pointer to the corresponding
GimpToolInfo object (which in turn has a pointer to a Gimp).
* app/tools/tool_manager.[ch]: set the pointer after creating the
tool object. Removed tool_manager_get_info_by_tool() as there is a
tool->tool_info pointer now.
* app/tools/gimpbezierselecttool.c
* app/tools/gimpblendtool.c
* app/tools/gimpbrightnesscontrasttool.c
* app/tools/gimpclonetool.c
* app/tools/gimpcolorbalancetool.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpconvolvetool.c
* app/tools/gimpcroptool.c
* app/tools/gimpcurvestool.c
* app/tools/gimpdodgeburntool.c
* app/tools/gimpdrawtool.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpellipseselecttool.c
* app/tools/gimperasertool.c
* app/tools/gimpfliptool.c
* app/tools/gimphistogramtool.c
* app/tools/gimphuesaturationtool.c
* app/tools/gimpinktool.c
* app/tools/gimplevelstool.c
* app/tools/gimpmagnifytool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimpmovetool.c
* app/tools/gimppainttool.c
* app/tools/gimppathtool.c
* app/tools/gimpperspectivetool.c
* app/tools/gimpposterizetool.c
* app/tools/gimprectselecttool.c
* app/tools/gimprotatetool.c
* app/tools/gimpscaletool.c
* app/tools/gimpsheartool.c
* app/tools/gimptexttool.c
* app/tools/gimpthresholdtool.c
* app/tools/path_tool.c
* app/tools/xinput_airbrush.c: s/GDisplay/GimpDisplay/g.
Use tool->tool_info and tool_info->gimp in some places to get
rid of using "the_gimp".
Removing the remaining ones involves changing the tool options
system and is scheduled next...
* app/widgets/gimpdnd.c
* app/widgets/gimpdocumentview.c: pass a "Gimp" pointer to all
file_open_*() functions.
* app/gdisplay_color.[ch]
* app/gdisplay_color_ui.[ch]
* app/image_map.[ch]
* app/nav_window.[ch]
* app/path.c
* app/path_bezier.c
* app/path_transform.h
* app/qmask.[ch]: s/GDisplay/GimpDisplay/g
* tools/pdbgen/pdb/fileops.pdb: load_procs and save_procs are
members of the "Gimp" object now.
* tools/pdbgen/pdb/plug_in.pdb: use gimp->no_interface, don't
include "appenv.h".
* app/pdb/fileops_cmds.c
* app/pdb/plug_in_cmds.c: regenerated.
2001-08-14 Michael Natterer <mitch@gimp.org>
* app/gdisplay.h: an evil temp_hack which lets GimpContext managing
the active display withoug including "gdisplay.h". Will go away as
soon ad context properties are registered dynamically.
* app/module_db.c: cleaned up the object code in preparation of
moving it to core/.
* app/path.c: connect to GimpImage's
* app/core/gimpobject.[ch]: derive it from GObject, not from
GtkObject any more (yeah :-)
* app/core/*.c: #include <glib-object.h> instead of <gtk/gtk.h>,
removed some remaining GtkObject-isms.
(left in a few #include <gtk/gtk.h> where bigger changes are needed
to get rid of the UI dependency).
* app/core/core-types.h: #include <gdk-pixbuf/gdk-pixbuf.h> here
temporarily.
* app/core/gimp.c (gimp_create_display): unref the image after
creating it's first display.
* app/core/gimpbrush.[ch]: disabled the parts of the code which
depend on GimpPaintTool.
* app/core/gimpbrushgenerated.c
* app/core/gimpbrushpipe.c: changed accordingly.
* app/core/gimpcontext.[ch]: evil hack (see above) to manage the
active display without including "gdisplay.h"
* app/core/gimpimage-mask.[ch]: pass a context to
gimage_mask_stroke() and get the current tool's PDB string from
there.
* app/core/gimpedit.c: changed accordingly.
* app/core/gimpimage.c: use gimp_image_update() instead of
gdisplays_update_full().
* app/gui/color-area.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-constructors.c
* app/gui/edit-commands.c
* app/gui/image-commands.c
* app/gui/toolbox.c: changed accordingly (don't use Gtk methods on
GObjects).
* app/gui/menus.c: fix some const warnings by explicit casting.
* app/tools/*.[ch]: ported all tools to GObject, some minor
cleanup while i was on it.
* app/widgets/gimpdialogfactory.[ch]: ported to GObject.
* app/widgets/gimplayerlistview.h: added FOO_GET_CLASS() macro.
* tools/pdbgen/app.pl: added a "widgets_eek" hack like "tools_eek"
which inserts #include "widgets/widgets-types.h" before ordinary
includes.
* tools/pdbgen/pdb/brush_select.pdb
* tools/pdbgen/pdb/edit.pdb
* app/pdb/brush_select_cmds.c
* app/pdb/edit_cmds.c: changed according to the stuff above.
2001-08-11 Michael Natterer <mitch@gimp.org>
* app/core/gimp.c: split "destroy" up in "dispose" and "finalize".
* app/core/gimpcontext.c: objects need to be passed around with
g_param_spec_object() or bad things will happen.
* app/gui/channels-commands.c
* app/gui/edit-commands.c
* app/gui/file-commands.c
* app/gui/gui.c
* app/gui/layers-commands.c
* app/gui/resize-dialog.c
* app/gui/select-commands.c
* app/tools/gimpclonetool.c
* app/widgets/gimpdatafactoryview.c
* app/widgets/gimppreview.c: removed many connections to
"destroy": Connect to "dispose" or use g_object_weak_ref()
instead.
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-17 Michael Natterer <mitch@gimp.org>
* app/path.[ch]: removed path_to_beziersel() so this file can be
safely included from core/.
* app/tools/gimpbezierselecttool.[ch]: added it here.
* app/core/core-types.h: added a GimpToolOptions typedef. Removes
deps into tools/ and will later be a core object anyway.
* app/tools/tools-types.h: removed the ToolOptions typedef here.
* app/core/gimpimage-duplicate.c
* app/core/gimpimage-mask.c
* app/core/gimpimage.c
* app/core/gimptoolinfo.[ch]: removed deps into tools/, misc stuff.
* app/tools/tool_manager.[ch]: some ugly temp hacks. Please ignore.
* app/widgets/gimpdialogfactory.[ch]: added a "remember_if_open" field
to the GimpDialogFactoryEntry so we can manage dialogs which should
not be re-opened on startup.
* app/gui/dialogs-constructors.c
* app/gui/dialogs.c: register & create all editor dialog with the
"global_dialog_factory".
* app/gui/tool-options-dialog.c
* app/tools/*: s/ToolOptions/GimpToolOptions/
2001-07-07 Michael Natterer <mitch@gimp.org>
* app/tools/tool_manager.[ch]: put all tool_manager variables into
a struct which is attached to a "Gimp". Pass a Gimp* to all
tool_manager functions.
* app/disp_callbacks.c
* app/gdisplay.c
* app/gimage.c
* app/scale.c
* app/scroll.c
* app/undo.c
* app/gui/convert-dialog.c
* app/gui/edit-commands.c
* app/gui/tool-options-dialog.c
* app/gui/tools-commands.c: changed accordingly.
* app/tools/gimpbezierselecttool.c
* app/tools/gimpbrightnesscontrasttool.c
* app/tools/gimpbycolorselecttool.c
* app/tools/gimpclonetool.c
* app/tools/gimpcolorbalancetool.c
* app/tools/gimpcroptool.c
* app/tools/gimpcurvestool.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimphistogramtool.c
* app/tools/gimphuesaturationtool.c
* app/tools/gimplevelstool.c
* app/tools/gimpposterizetool.c
* app/tools/gimptexttool.c
* app/tools/gimpthresholdtool.c
* app/tools/gimptool.c
* app/tools/gimptransformtool.c: mostly bad hacks for tool dialogs
which exist without a real context. Needs some more review.
2001-07-07 Michael Natterer <mitch@gimp.org>
* app/Makefile.am
* app/context_manager.[ch]: removed.
* app/app_procs.c: call tool_mananger instead of context_manager
functions, pass "the_gimp" to some more functions.
* app/drawable.[ch]: pass a GimpContext to drawable_fill().
* app/errors.c: behave according to "stack_trace_mode" when using
the debugging signal handler.
* app/gimprc.[ch]: removed the core/ config variables.
* app/selection.c: set the selection's state to INVISIBLE in
selection_pause().
* app/core/Makefile.am
* app/core/gimpcoreconfig.[ch]: new files (the configuration
variables used by core/).
* app/core/gimpcontext.[ch]: removed the global contexts (user,
default, ...) and their functions. It's no longer possible to pass
NULL to the context functions to manipulate the current context
(gimpcontext.c doesn't know the current context any more).
* app/core/gimp.[ch]: added them here. The functions are now called
gimp_[set|get]_*_context(). Added gimp_create_context() which is
the only function to create contexts now.
* app/gui/dialogs.[ch]
* app/gui/gui.[ch]: pass "gimp" to all functions.
* app/tools/tool_manager.[ch]
* app/tools/tools.[ch]: pass "gimp" to lots of functions. Added
the "global_tool_context" logic and the global/non-global paint
options switching from the context_manager. Pass "gimp" to all
tools' "register" functions.
* app/tools/*: changed accordingly.
* app/devices.c
* app/disp_callbacks.c
* app/file-open.[ch]
* app/file-save.c
* app/gdisplay.c
* app/gimage.c
* app/libgimp_glue.c
* app/module_db.c
* app/nav_window.c
* app/plug_in.c
* app/qmask.c
* app/undo.c
* app/base/base-config.c
* app/core/gimpbrushpipe.c
* app/core/gimpdrawable-offset.c
* app/core/gimpgradient.c
* app/core/gimpimage-duplicate.c
* app/core/gimpimage-mask.c
* app/core/gimpimage-new.c
* app/core/gimpimage.c
* app/core/gimppalette.c
* app/core/gimptoolinfo.[ch]
* app/core/gimpundo.c
* app/gui/brush-select.c
* app/gui/channels-commands.c
* app/gui/color-area.c
* app/gui/dialogs-constructors.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradient-select.c
* app/gui/info-window.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/palette-editor.c
* app/gui/palette-import-dialog.c
* app/gui/palette-select.c
* app/gui/paths-dialog.c
* app/gui/pattern-select.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.c
* app/gui/test-commands.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* app/xcf/xcf-load.c
* app/xcf/xcf-save.c
* app/widgets/gimpchannellistview.c
* app/widgets/gimpdnd.c
* app/widgets/gimpdrawablelistview.[ch]
* app/widgets/gimpimagedock.c
* app/widgets/gimplayerlistview.c
* app/pdb/brushes_cmds.c
* app/pdb/drawable_cmds.c
* app/pdb/gradient_select_cmds.c
* app/pdb/gradients_cmds.c
* app/pdb/palette_cmds.c
* app/pdb/patterns_cmds.c
* app/pdb/procedural_db.c
* tools/pdbgen/pdb/brushes.pdb
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/gradient_select.pdb
* tools/pdbgen/pdb/gradients.pdb
* tools/pdbgen/pdb/palette.pdb
* tools/pdbgen/pdb/patterns.pdb: changed accordingly: remove usage
of gimp_context_[get|set]_*(NULL), create contexts with
gimp_create_context(). Get the user/current context with
gimp_get_[user|current]_context(). Added/removed access to the
global "the_gimp" variable in some places. Get the core's config
variables from "core_config".
2001-05-15 Michael Natterer <mitch@gimp.org>
* configure.in: new directory app/base/
* app/Makefile.am
* app/boundary.[ch]
* app/brush_scale.[ch]
* app/gimpchecks.h
* app/gimplut.[ch]
* app/pixel_processor.[ch]
* app/pixel_region.[ch]
* app/pixel_surround.[ch]
* app/temp_buf.[ch]
* app/tile.[ch]
* app/tile_cache.[ch]
* app/tile_manager.[ch]
* app/tile_manager_pvt.h
* app/tile_pvt.h
* app/tile_swap.[ch]: moved to base/
* app/base/Makefile.am
* app/base/base-types.h
* app/base/*: new directory for the sub-object pixel maniplation
and storage stuff. Does not include Gtk+ or anything outside
base/. Did some cleanup in all files.
* app/appenums.h
* app/apptypes.h
* app/core/gimpimage.h: removed types which are now in
base/base-types.h.
* app/base/base-config.[ch]
* app/gimprc.[ch]: put the config variables for base/ to their own
file so base/ doesn not have to include gimprc.h (does not yet
work, i.e. the variables are un-configurable right now)
* app/main.c: set a log handler for "Gimp-Base".
* app/paint-funcs/Makefile.am
* app/paint-funcs/paint-funcs.[ch]: removed the color hash which
maps RGB to color indices because it's a totally standalone system
which has nothing to do with the paint-funcs and introduced a
GimpImage dependency.
paint-funcs/ should be considered on the same sub-object
(glib-only) level as base/, only in a different directory.
* app/core/Makefile.am
* app/core/gimpimage-colorhash.[ch]: put the color hash here.
* app/gimage.c: don't invalidate the color hash here...
* app/core/gimpimage.c: ... but in the colormap_changed() default
inplementation. Initialize the hash in class_init().
* tools/pdbgen/Makefile.am: scan app/base/base-types.h for enums.
* tools/pdbgen/enums.pl: regenerated.
* app/[lots]
* app/core/[of]
* app/gui/[files]
* app/pdb/[all]
* app/tools/[over]
* app/widgets/[the]
* tools/pdbgen/pdb/[place]: changed #includes accordingly. And use
base_config->value instead of the stuff from gimprc.h.
2001-05-14 Sven Neumann <sven@gimp.org>
* app/Makefile.am
* app/pixmaps2.h: removed this file ...
* app/tools/Makefile.am
* app/tools/icons.h: ... and readded it here with some changes.
* app/tools/*.c: include the new icons.h file
* app/pdb/procedural_db.[ch]: declare name as const
2001-02-24 Michael Natterer <mitch@gimp.org>
* TODO.xml: updated.
* app/appenums.h
* app/apptypes.h: prefixed the cursor stuff with "Gimp", added
the new stock tool cursor enum. Removed the old ToolType enum.
* app/cursorutil.[ch]
* app/gdisplay.[ch]: removed the old ToolType enum and prefixed
the functions with "gimp_". Also stripped all "toggle cursor"
stuff from the cursor code, so the new API is easier and not
depending on the tool system.
All existing tool cursors can be used via the new stock tool
cursor enum, so no tool has to fiddle around with bitmap cursors.
There will be an cursorutil function for registering stock tool
cursor types on the fly.
* app/disp_callbacks.c
* app/scroll.[ch]: moved the display scrollbar callbacks from
scroll.[ch] to disp_callbacks.c. Removed some crap from scroll.h
* app/tools/tool.[ch]: removed the BitmapCursor pointers from the
tool class struct and add cursor and toggle cursor IDs to the
GimpTool struct. Work in progress.
* app/dialog_handler.c
* app/tools/bezier_select.c
* app/tools/blend.c
* app/tools/bucket_fill.c
* app/tools/by_color_select.c
* app/tools/clone.c
* app/tools/color_picker.c
* app/tools/convolve.c
* app/tools/crop.c
* app/tools/dodgeburn.c
* app/tools/edit_selection.c
* app/tools/ellipse_select.c
* app/tools/flip_tool.c
* app/tools/free_select.c
* app/tools/fuzzy_select.c
* app/tools/ink.c
* app/tools/iscissors.c
* app/tools/magnify.c
* app/tools/measure.c
* app/tools/move.c
* app/tools/paint_core.[ch]
* app/tools/perspective_tool.c
* app/tools/rect_select.c
* app/tools/rotate_tool.c
* app/tools/scale_tool.c
* app/tools/shear_tool.c
* app/tools/text_tool.c
* app/tools/transform_core.[ch]: changed accordingly. Did this
"blind" for most tools because they don't compile. The changes are
minimal, so there should be no conflicts.
2001-01-29 Michael Natterer <mitch@gimp.org>
* app/apptypes.h: removed the "Layer" typedef.
* app/layer.[ch]: removed the defines of the old function names.
Don't implement methods of the parent class (get_name, get_tattoo, ...)
but define them as macros. They will go to a separate "pdb_glue.h"
header because they are used only by the PDB to simplify code
generation (no application file should say gimp_layer_get_tattoo()
but always gimp_drawable_get_tatoo()).
* app/channel.h
* app/channel_ops.c
* app/channels_dialog.c
* app/commands.c
* app/convert.c
* app/disp_callbacks.c
* app/floating_sel.[ch]
* app/gdisplay.c
* app/gimage.c
* app/gimage_mask.c
* app/gimage_mask.h
* app/gimpdnd.c
* app/gimpdrawable.h
* app/gimpimage.[ch]
* app/gimplayermask.h
* app/global_edit.c
* app/image_new.c
* app/layer_select.c
* app/layers_dialog.c
* app/resize.c
* app/undo.c
* app/xcf.[ch]
* app/pdb/drawable_cmds.c
* app/pdb/floating_sel_cmds.c
* app/pdb/image_cmds.c
* app/pdb/layer_cmds.c
* app/tools/bucket_fill.c
* app/tools/by_color_select.c
* app/tools/clone.c
* app/tools/crop.c
* app/tools/edit_selection.c
* app/tools/ink.c
* app/tools/move.c
* app/tools/paint_core.c
* app/tools/rect_select.c
* app/tools/text_tool.c
* app/tools/transform_core.c
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/floating_sel.pdb
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/layer.pdb: changed accordingly, cleanup.
2001-01-24 Michael Natterer <mitch@gimp.org>
* Makefile.am
* configure.in
* gimptool.in: added the new library below.
* libgimpwidgets/Makefile.am
* libgimpwidgets/gimpchainbutton.[ch]
* libgimpwidgets/gimpcolorarea.[ch]
* libgimpwidgets/gimpcolorbutton.[ch]
* libgimpwidgets/gimpdialog.[ch]
* libgimpwidgets/gimpfileselection.[ch]
* libgimpwidgets/gimphelpui.[ch]
* libgimpwidgets/gimppatheditor.[ch]
* libgimpwidgets/gimppixmap.[ch]
* libgimpwidgets/gimpquerybox.[ch]
* libgimpwidgets/gimpsizeentry.[ch]
* libgimpwidgets/gimpunitmenu.[ch]
* libgimpwidgets/gimpwidgets.[ch]
* libgimpwidgets/gimpwidgets.def
* libgimpwidgets/gimpwidgetstypes.h: new shared library.
Currently there are some ugly dependencies into libgimp. These
will be removed and go to a "libgimpglue" library which will be
a library for functions which share a common interface between
plug-ins and the app but have different implementations.
Include "libgimp/gimpunit.h" from "libgimpwidgets/gimpwidgetstypes.h"
to simulate this upcoming separation.
* libgimp/Makefile.am
* libgimp/gimpchainbutton.[ch]
* libgimp/gimpcolorarea.[ch]
* libgimp/gimpcolorbutton.[ch]
* libgimp/gimpdialog.[ch]
* libgimp/gimpfileselection.[ch]
* libgimp/gimphelpui.[ch]
* libgimp/gimppatheditor.[ch]
* libgimp/gimppixmap.[ch]
* libgimp/gimpquerybox.[ch]
* libgimp/gimpsizeentry.[ch]
* libgimp/gimpunitmenu.[ch]
* libgimp/gimpwidgets.[ch]: removed from here.
* libgimp/gimpui.h
* libgimp/gimpuitypes.h
* libgimp/makefile.mingw.in
* libgimp/makefile.msc: changed accordingly.
* app/[all ui files]
* app/pdb/palette_cmds.c
* app/pdb/tools_cmds.c
* tools/pdbgen/pdb/palette.pdb
* tools/pdbgen/pdb/tools.pdb: #include "libgimpwidgets/gimpwidgets.h"
and removed useless includes.
* app/apptypes.h: #include "libgimpwidgets/gimpwidgetstypes.h"
* app/Makefile.am
* plug-ins/[all makefiles which link against libgimpui]:
link against libgimpwidgets.la
* po-libgimp/POTFILES.in: changed file locations.
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-04-26 Michael Natterer <mitch@gimp.org>
* app/color_select.c
* app/colormaps.[ch]
* app/context_manager.c: removed unused global variables
[foreground|background]_pixel and [old|new]_color_pixel.
Initialize the colormap and visual stuff with GdkRGB instead of
GtkPreview functions (which are deprecated).
* app/[62 files]: removed #include's (started with colormaps.h and
couldn't stop). Also ordered them consistently and did some small
unrelated cleanups.
Removed variuos <stdlib.h> et.al. but checked the files carefully
before doing so. If I was too radical and you get warnings on your
platform, please flame me or just put them back :)
2000-01-25 Michael Natterer <mitch@gimp.org>
* app/appenv.h: removed BOUNDS, MINIMUM and MAXIMUM. No need to
include both <glib.h> and <gtk/gtk.h>.
* app/*
* tools/pdbgen/pdb/text_tool.pdb: s/BOUNDS/CLAMP/,
same for MIN and MAX.
* app/preferences_dialog.c: the "Check Size" widget was connected
to the transparency_type variable.
* plug-ins/common/sobel.c: removed definitions of MIN and ROUND.
* libgimp/gimp.h: #include "gimplimits.h" and "gimpcolorspace.h".
* plug-ins/*: don't include the two files.
1999-12-25 Garry R. Osgood <gosgood@idt.net>
Season's Greetings!
* app/clone.c
* app/paint_core.c
* app/paint_core.h
* MAINTAINERS
MAINTAINERS: Updated my entry (it wasn't there ;)
app/paint_core.[ch] supplied new PaintTool states to clone_paint_func() so that
writes of temporary markings made directly to the window are not
clobbered by buffered writes stemming from gdisplay_flush_xxx()
routines. clone_tool_paint_func() has been modified to take advantage
of these new states, retiring bug #2184 in a way that does not change
user interface semantics. There are small additions to the PaintCore
interface that do not affect clientele unaware of added semantics.
These changes are detailed at http://idt.net/~gosgood/gimp-patch/patch03.html.
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.