This fixes bug #65198
* app/core/Makefile.am
* app/core/core-types.h:
* app/core/gimpgrid.[ch]: added new class GimpGrid.
* app/core/core-enums.[ch]: added new enum GimpGridType.
* app/core/gimpimage-guides.[ch]: removed the gimp_image_snap_*()
functions...
* app/core/gimpimage-snap.[ch]: ...and added them here since they
are no longer guide specific.
* app/core/gimpimage-undo-push.[ch]: added
gimp_image_undo_push_image_grid()
* app/display/gimpdisplayshell-handlers.c:
* app/core/gimpimage.[ch]: added grid member to _GimpImage. Added
new signal "grid_changed", added gimp_image_grid_changed(),
gimp_image_get_grid() and gimp_image_set_grid().
* app/display/gimpdisplayshell-appearance.[ch]: added
gimp_display_shell_set_show_grid(),
gimp_display_shell_get_show_grid(),
gimp_display_shell_set_snap_to_grid() and
gimp_display_shell_get_snap_to_grid().
* app/display/gimpdisplayshell-callbacks.c: added call to
gimp_display_shell_draw_grid()
* app/display/gimpdisplayshell.[ch]: added grid member to
_GimpDisplayShellVisibility, added snap_to_grid and grid_dialog
members to _GimpDisplayShell, added
gimp_display_shell_draw_grid(), modified
gimp_display_shell_snap_coords() to use the new
gimp_image_snap_*() functions.
* app/gui/image-menu.c: added grid entries to
image_menu_entries[].
* app/gui/view-commands.[ch]: added
view_configure_grid_cmd_callback(),
view_toggle_grid_cmd_callback() and
view_snap_to_grid_cmd_callback().
* app/gui/Makefile.am
* app/gui/grid-dialog.[ch]: added a grid dialog.
2003-06-23 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in.[ch]: added separate GMainLoops for waiting
for extension_ack and for procedure_run's return value. The stack
of main loops is currently unused, it will be used for temp_proc
return values (which are currently disabled for no good reason).
Removed the boolean "recurse" and "starting_ext" states because
they are redundant now (we check for the presence of the dedicated
main loops instead).
* app/plug-in/plug-in-message.c
* app/plug-in/plug-in-progress.c
* app/plug-in/plug-in-run.c: changed accordingly.
2003-06-21 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainertreeview.c: disable workarounds for
bugs #110737 and #108956 for GTK+ >= 2.2.2. Will remove them as
soon as we depend on 2.2.2.
* app/widgets/gimpcontainertreeview.c
(gimp_container_tree_view_select_item): disabled optimization
which didn't select an already selected iter because it broke the
fix for #108956. Cleanup.
2003-06-20 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/pdb/message.pdb (message): use
plug_in_get_undo_desc() instead of duplicating its code.
* app/pdb/message_cmds.c: regenerated.
2003-06-20 Michael Natterer <mitch@gimp.org>
* app/gui/plug-in-commands.c (plug_in_run_cmd_callback): pass the
gdisp_ID to plug_in_run() again. Broke this with my last commit...
2003-06-20 Sven Neumann <sven@gimp.org>
* libgimp/gimp.c (gimp_config): fixed error messages.
* app/widgets/gimpwidgets-utils.c (gimp_message_box): use a
selectable label so you can copy from message dialogs.
2003-06-19 Michael Natterer <mitch@gimp.org>
Changed the semantics of GIMP_EXTENSION and (to some extent)
of GIMP_PLUGIN:
The old meaning of EXTENSION was "I live in the toolbox" and
PLUGIN meant "I take RUN-MODE,IMAGE,DRAWABLE args (but only if I
am invoked interactively)". This is completely useless, since
living in the toolbox means having "<Toolbox>" in the menu_path
and taking RUN-MODE,IMAGE,DRAWABLE means just that, regardless of
what type of procedure we are.
The new meaning of GIMP_PLUGIN is just "I am an ordinary procedure,
I am invoked, do my job and finish", while GIMP_EXTENSION means
"I will install temporary procedures and I will keep running to
keep them available".
(A GIMP_EXTENSION *must* call gimp_extension_ack() now to tell the
core that it's ready to run, or the core will block waiting for
the message !!!).
* configure.in: bumped version number to 1.3.16.
* libgimpbase/gimpprotocol.h: increased protocol version number so
old extensions will refuse to load.
* app/gui/plug-in-commands.c (plug_in_run_cmd_callback): don't
blindly pass RUN-MODE,IMAGE,DRAWABLE to GIMP_PLUGIN procedures but
look at their parameters and pass them either RUN-MODE, or
RUN-MODE,IMAGE, or RUN-MODE,IMAGE,DRAWABLE.
* app/pdb/procedural_db.c: cleaned up, better error reporting,
replaced an impossible error message by g_return_if_fail()
* app/plug-in/plug-in-message.c (plug_in_handle_proc_install):
better error messages.
* app/plug-in/plug-in-params.c: allocate parameter arrays using
g_new0() so we don't have to worry about uninitialized stuff
later.
* app/plug-in/plug-in-run.c (plug_in_run): wait for
gimp_extension_ack() installation confirmation for ALL extensions,
not just for automatically started ones.
* app/plug-in/plug-ins.c: cleanup.
* libgimp/gimp.[ch]: cleaned up and API-documented massively. Made
all magic values given in the GPConfig message static and added
accessor functions for them. Added gimp_tile_width()/height().
Added new function gimp_extension_enable() which turns on
asynchronous processing of temp_proc run requests without having
to enter an endless gimp_extension_process() loop. Moved all
private functions to the end of the file. Added tons of
g_return_if_fail() all over the place. Call gimp_run_procedure2()
from gimp_run_procedure() instead of duplicating the
code. Indentation, spacing, stuff...
* libgimp/gimptile.[ch]: removed gimp_tile_width()/height().
* libgimp/gimpdrawable.c
* libgimp/gimppixelrgn.c
* libgimp/gimptile.c: use the gimp_tile_width()/height() accessor
functions.
* libgimp/gimp.def: added gimp_extension_enable.
* libgimp/gimpmenu.c: removed evil code which connected to
_readchannel manually and use gimp_extension_enable() for watching
temp_procs.
* plug-ins/helpbrowser/helpbrowser.c: removed the same evil code
here and call gimp_extension_enable(). Call gimp_extension_ack()
to let the core know that the temp_proc is installed.
* plug-ins/script-fu/script-fu.c: made all procedures except the
permanently running "extension_script_fu" ordinary GIMP_PLUGIN
procedures.
* plug-ins/common/curve_bend.c
* plug-ins/common/plugindetails.c
* plug-ins/common/screenshot.c
* plug-ins/common/uniteditor.c
* plug-ins/common/winclipboard.c
* plug-ins/dbbrowser/dbbrowser.c
* plug-ins/gfli/gfli.c
* plug-ins/twain/twain.c
* plug-ins/webbrowser/webbrowser.c
* plug-ins/winsnap/winsnap.c: made them all ordinary GIMP_PLUGIN
procedures and renamed them from "extension_*" to "plug_in_*".
Random cleanups.
* app/widgets/gimphelp.c
* plug-ins/maze/maze_face.c: call "plug_in_web_browser" now.
2003-06-19 Hans Breuer <hans@breuer.org>
* makefile.msc : replace the win9x specific cd ....
with the portable cd ..\..\..
* **/makefile.msc : updated
* plug-ins/xjt/xjt.c plug-ins/common/psd_save.c :
there is still no unistd.h with msvc build
2003-06-16 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/pdb/brush_select.pdb (brush_args): don't fail on
brush_spacing values < 0, but behave as documented (use the
brush's own spacing).
* tools/pdbgen/pdb/brush_select.pdb
* tools/pdbgen/pdb/font_select.pdb
* tools/pdbgen/pdb/gradient_select.pdb
* tools/pdbgen/pdb/pattern_select.pdb: gtk_window_present() the
dialog on each set_popup(). This way the dialogs can be risen via
the PDB by setting the already selected object. Replaced
unreadable variable names by verbose ones.
* app/pdb/brush_select_cmds.c
* app/pdb/font_select_cmds.c
* app/pdb/gradient_select_cmds.c
* app/pdb/pattern_select_cmds.c: regenerated.
2003-06-13 Michael Natterer <mitch@gimp.org>
Cleaned up and improved the message system:
* app/core/gimp.[ch]: added "const gchar *domain" to
GimpMessageFunc (a NULL domain means the message is from the GIMP
core, everything else is a plug-in).
* app/errors.c: pass "domain == NULL" to gimp_message().
* tools/pdbgen/pdb/message.pdb: derive the message domain from the
current plug-in's menu_path (evil hack but works reasonably well).
* app/pdb/message_cmds.c: regenerated.
* app/widgets/gimpwidgets-utils.[ch] (gimp_message_box): added a
header showing the message domain and changed the dialog layout to
follow the HIG more closely.
* app/gui/error-console-dialog.[ch]: removed.
* app/widgets/gimperrorconsole.[ch]
* app/gui/error-console-commands.[ch]
* app/gui/error-console-menu.[ch]: new files containing a
re-implementation of the error console dialog.
* app/gui/Makefile.am
* app/gui/dialogs-constructors.c
* app/gui/gui.c
* app/gui/menus.c
* app/widgets/Makefile.am
* app/widgets/widgets-types.h: changed accordingly.
* app/display/gimpprogress.c: added more spacing and removed the
separator (more HIG compliant).
* plug-ins/[most plug-ins].c: Changed lots of messages and
progress strings:
- Removed plug-in names from messages since that's automatically
covered by "domain" now.
- Put all filenames in ''.
- Changed "Loading" to "Opening".
- Added "..." to all progress messages.
- Cleaned up all file open/save error messages to look the
same and include g_strerror(errno).
- Removed special casing for progress bars and *always* show them,
not only if run_mode != GIMP_RUN_NONINTERACTIVE (we can't expect
all plug-ins to do this correctly but need to hack the core to
sort out unwanted progress bars).
Unrelated:
- Cleaned up indentation, spacing, #includes, coding style and
other stuff while I was at all these files.
2003-06-13 Sven Neumann <sven@gimp.org>
* app/gui/file-save-dialog.c (file_save_ok_callback): removed
code for the slimy-easter-egg that was unveiled some time ago.
2003-06-13 Sven Neumann <sven@gimp.org>
Attempt to finally fix Smudge tool problems (bug #115057):
* app/paint-funcs/paint-funcs-generic.h (blend_pixels): added an
implementation for the non-alpha case.
* app/paint/gimpsmudge.c (gimp_smudge_start): added back code that
used to prefill the buffer if the inital area was clipped.
2003-06-12 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.c (gimp_drawable_configure): removed the
check again because adding e.g. GRAY drawables to RGB images is
prefectly ok as long as they are channels/masks.
2003-06-12 Sven Neumann <sven@gimp.org>
* app/core/gimpdrawable.c (gimp_drawable_configure): check if the
drawable type fits to the image. This assertion would have catched
the problem below.
2003-06-11 Sven Neumann <sven@gimp.org>
* app/gui/info-window.c
* libgimpwidgets/gimpcolorscales.c
* libgimpwidgets/gimpcolorselect.c: applied some slightly modified
patches from Michael Bushey that fix rounding errors when
converting between color values in gdouble and guchar
representation (bug #109241).
* libgimpcolor/gimpcolorspace.c
* libgimpcolor/gimprgb.c: similar fixes here.
2003-06-11 Michael Natterer <mitch@gimp.org>
* app/core/gimpdrawable.c (gimp_drawable_mask_bounds): added some
more g_return_if_fail() to avoid NULL pointer dereferencing.
2003-06-11 Sven Neumann <sven@gimp.org>
* app/widgets/gimptoolbox.[ch]: added a container that keeps
references to the buttons which are not added to the wrap box.
Just to make sure they are destroyed on exit.
2003-06-11 Sven Neumann <sven@gimp.org>
* etc/Makefile.am
* etc/sessionrc: added a sample sessiorc which will be used after
user installation.
* app/gui/user-install-dialog.c (tree_items): install the sample
sessionrc.
2003-06-10 Sven Neumann <sven@gimp.org>
* app/widgets/gimpwidgets-utils.[ch]: added utility function
gimp_rgb_get_gdk_color(), documented gimp_get_screen_resolution().
* app/widgets/gimppreviewrenderer.c
(gimp_preview_renderer_set_border_color)
* app/display/gimpdisplayshell-appearance.c
(gimp_display_shell_set_padding): use the new function.
2003-06-10 Sven Neumann <sven@gimp.org>
* app/gui/tools-commands.c (tools_select_cmd_callback): expects
the tool identifier as a GQuark now.
* app/gui/image-menu.c: changed accordingly. Removed code that
used to move the menu entries for the color correction tools to
the Layers menu. Added the respective menu entries by hand. Added
a menu entry for arbitrary rotations and one for Select by Color.
* app/tools/gimpbrightnesscontrasttool.c
* app/tools/gimpbycolorselecttool.c
* app/tools/gimpcolorbalancetool.c
* app/tools/gimpcolorizetool.c
* app/tools/gimpcurvestool.c
* app/tools/gimphistogramtool.c
* app/tools/gimphuesaturationtool.c
* app/tools/gimplevelstool.c
* app/tools/gimpposterizetool.c
* app/tools/gimpthresholdtool.c: register the color correction
tools in the Tools menu.
* app/tools/gimptransformtool.c: added an initialize method and
moved most initalization code from button_press to this place.
2003-06-09 Sven Neumann <sven@gimp.org>
* app/paint/gimpsmudge.c (gimp_smudge_start): now that
blend_pixels() behaves correctly, we can simply initialize the
smudge buffer with transparent pixels.
2003-06-09 Sven Neumann <sven@gimp.org>
* app/paint-funcs/paint-funcs-generic.h (blend_pixels): weight
pixels by their alpha value. Fixes the smudge tool (bug #72879).
2003-06-08 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpfontselection-dialog.c
(gimp_font_selection_dialog_new): pack the main table expanding,
not shrinking. Fixes bug #114656.
2003-06-06 Michael Natterer <mitch@gimp.org>
* app/widgets/Makefile.am
* app/widgets/gimptoolbox-dnd.[ch]: new files containing the
toolbox' drop callbacks. Exports gimp_toolbox_dnd_init().
* app/widgets/gimptoolbox.c: removed the callbacks and all the
"core/" includes they needed and call gimp_toolbox_dnd_init().
2003-06-06 Sven Neumann <sven@gimp.org>
* app/core/gimptoolinfo.[ch]: added "in_toolbox"; defaults to TRUE.
* app/tools/tool_manager.c: set "in_toolbox" to FALSE for tools
derived from GimpImageTool.
* app/widgets/gimptoolbox.c: respect the new flag when constructing
the toolbox.
2003-06-06 Sven Neumann <sven@gimp.org>
* tools/pdbgen/pdb/message.pdb: UTF-8 validate messages before
passing them to g_message().
* app/pdb/message_cmds.c
* libgimp/gimpmessage_pdb.c: regenerated.
2003-06-06 Michael Natterer <mitch@gimp.org>
* app/gui/image-menu.c
* app/gui/toolbox-menu.c: moved the convenience items which
create new docks from the "Dialogs/" level to a new
"Dialogs/Create New Dock/" sub-menu. Fixes bug #111278.
* app/gui/dialogs-commands.[ch] (dialogs_create_data_cmd_callback):
new convenience constructor callback. Factored out duplicated
code to the new dialogs_create_dock() utility function.
2003-06-06 Michael Natterer <mitch@gimp.org>
* app/gui/image-menu.c: added CW/CCW to the "Rotate" menu entries
as suggested in bug #57797. Cleaned up image_menu_update().
2003-06-06 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpitemfactory.c (gimp_item_factory_set_label):
use gtk_label_set_text_with_mnemonic() instead of just
gtk_label_set_text().
* app/gui/image-menu.c
* app/gui/toolbox-menu.c: added mnemonics for all sub-menus.
Fixes bug #106991.
* app/gui/image-menu.c: cleaned up the "Layers" menu: moved
sub-menus together. Changed the "Stack" menu's labels and
accelerators and added "Select Top/Bottom Layer" for consistency
(bound to Home/End).
* app/gui/layers-commands.[ch]: changed accordingly. Added the
new select top/bottom callbacks.
2003-06-05 Sven Neumann <sven@gimp.org>
* app/core/gimpdrawable.c (gimp_drawable_get_color_at):
* app/core/gimpimage-projection.c (gimp_image_projection_get_color_at):
use OPAQUE_OPACITY instead of 255.
* app/core/gimpimage-pick-color.[ch]: factored out code that
averages over colors so it can be used from GimpImageTool.
* app/tools/gimpimagemaptool.[ch]: derived from GimpColorTool and
added a GimpColorTool::pick implementation.
* app/tools/gimpcoloroptions.c
* app/tools/gimpcolorpickeroptions.c: add the toggle for
"sample_merged" in gimp_color_picker_options_gui().
* app/tools/gimpcolortool.c (gimp_color_tool_cursor_update): check
if the cursor is over the active drawable or if "sample_merged" is
active.
* app/tools/gimplevelstool.c: simplified since all color-picking is
now handled by the parent classes. Fixes bug #112668.
2003-06-05 Sven Neumann <sven@gimp.org>
* app/tools/gimpcoloroptions.c: changed the default radius.
* app/tools/gimpcolortool.[ch]: pass GimpColorOptions to
gimp_color_tool_enable(). Added gimp_color_tool_disable() and
gimp_color_tool_is_enabled().
* app/tools/gimpcolorpickertool.c: changed accordingly.
* app/tools/gimppainttool.[ch]: derived GimpPaintTool from
GimpColorTool and removed most color picking code.
* app/tools/gimpdodgeburntool.c (gimp_dodgeburn_tool_modifier_key)
* app/tools/gimperasertool.c (gimp_eraser_tool_modifier_key):
chain up to the parent class.
* app/tools/gimppaintbrushtool.c: purely cosmetic change.
2003-06-05 Michael Natterer <mitch@gimp.org>
* app/core/gimpchannel.c (gimp_channel_bounds): always return
channel->x1,y1,x2,y2, *not* tx1,ty1,tx2,ty2 since the latter
contain bogus values if the mask is empty. Fixes bug #114419.
* plug-ins/script-fu/scripts/unsharp-mask.scm: cleaned up
while searching the bug.
2003-06-04 Sven Neumann <sven@gimp.org>
* app/core/gimpmarshal.list: added VOID: ENUM, BOXED, INT.
* app/tools/gimpcolortool.[ch]: added a default implementation for
GimpColorTool::pick. Emit a "picked" signal when a color was
successfully picked.
* app/tools/gimpcolorpickertool.c: simplified a lot since
GimpColorTool does most of the work for us now.
2003-06-04 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_canvas_tool_events): undraw the cursor on
GDK_PROXIMITY_OUT. Always set shell->proximity to FALSE *before*
calling gimp_display_shell_update_cursor().