2003-06-28 Dave Neary <bolsh@gimp.org>
* plug-ins/common/pat.c: Save patterns with alpha
channels, and remove warning while loading patterns
with an alpha channel.
* app/core/gimppattern.c
* app/core/gimpdrawable-bucket-fill.c
* app/paint/gimpclone.c: Make cloning from a pattern
source, and bucket filling with a pattern, work when
there's an alpha channel present in the pattern.
I'm not particularly happy with this, because the only
way to tell whether there's an alpha channel or not is
by the number of bytes in the TempBuf the clone and
bucketfill routines get passed, which is rather
restrictive. It would be nice if a TempBuf had a
_has_alpha () method.
2003-06-28 Michael Natterer <mitch@gimp.org>
* app/core/gimpcontext.h: removed enum GimpContextPropType and
enum GimpContextPropMask.
* app/core/core-enums.[ch]: added them here.
* app/core/gimptoolinfo.[ch]: replaced "gboolean tool_context"
member by "GimpContextPropMask context_props" so each tool can
specify exactly which context properties it wants to have
persistently remembered.
* app/tools/tools-types.h: changed typedef GimpToolRegisterCallback
accordingly.
* app/tools/tool_manager.[ch] (tool_manager_register_tool): ditto.
Removed the "global_tool_context" and initialize all tool info
objects from the user_context after creation. Removed the
PAINT_OPTIONS_MASK #define and use the new context_props stored in
tool_info insted.
* app/tools/gimppainttool.h: #define the common properties of the
paint tools as GIMP_PAINT_TOOL_OPTIONS_MASK (which is OPACITY |
PAINT_MODE | BRUSH).
* app/tools/[all tools].c (gimp_*_tool_register): replaced the
"use_context" boolean by the actual mask of context properties the
tools need.
2003-06-27 Michael Natterer <mitch@gimp.org>
* app/tools/gimpdrawtool.[ch] (gimp_draw_tool_is_active): new
function which returns (draw_tool->gdisp != NULL).
2003-06-27 Michael Natterer <mitch@gimp.org>
* app/gui/dialogs.c (toplevel_entries): added an entry for the
text tool editor.
* app/tools/gimptexttool.c (gimp_text_tool_editor): register
the editor window with the dialog factory so it becomes
session-menaged.
2003-06-26 Sven Neumann <sven@gimp.org>
* app/widgets/gimpcontainergridview.c: select items on
"button_press_event" not on "clicked". Makes the grid view behave
like the list view and fixes bug #115797.
2003-06-26 Sven Neumann <sven@gimp.org>
* app/gui/file-new-dialog.c (file_new_dialog_new): don't set the
focus on the size_entry. This change allows to accept the default
values by pressing OK. Fixes bug #115876.
2003-06-26 Simon Budig <simon@gimp.org>
* app/vectors/gimpbezierstroke.c: rewrote gimp_bezier_stroke_extend
for the case when the neighbor is not really an end point of the
stroke, but close enough to the end to still be acceptable.
* app/tools/gimpvectortool.c: Make the tool behave sanely
and more symetrically (both ends of a stroke behave basically the
same now), gimp_draw_on_handle () now prefers the anchor passed
into it via the *ret_anchor parameter over other preferred anchors.
2003-06-25 Sven Neumann <sven@gimp.org>
* app/text/gimptext-parasite.c (gimp_text_from_gdyntext_parasite):
attempt to convert text from locale encoding.
* app/vectors/gimpvectors-compat.c (gimp_vectors_compat_new):
allow paths with zero points (bug # 115955).
* plug-ins/script-fu/script-fu-server.c: if a connection to a
client is lost, invalidate file descriptors in the command queue.
Plugged a couple of memleaks.
2003-06-25 Sven Neumann <sven@gimp.org>
* app/text/gimptext-xlfd.[ch]: added convenience function
gimp_text_set_font_from_xlfd(). Improved and documented XLFD parsing.
* app/text/gimptext-parasite.c: use the new function.
2003-06-25 Simon Budig <simon@gimp.org>
* app/vectors/gimpbezierstroke.c: If an control handle gets
converted to an edge simply move it to its next anchor.
* app/tools/gimpvectortool.c: Improved interactive handling
of vectors. Still work in progress, esp. I am not sure about
the assignment of the modifier keys. Right now it is:
Drag (Anchor/Handle): Regular Movement
Shift-Click (Anchor): select multiple anchors (does not work yet)
Shift-Drag: (Handle): move opposite handle symmetrically
Ctrl-Drag (Anchor): Drag out control point
S-C-Click: (Anchor/Handle): Convert to Edge
2003-06-24 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig.[ch]: added new function
gimp_config_serialize_to_fd() for the sake of completeness and
since it's a nice way to generate debugging output.
* app/text/Makefile.am
* app/text/gimptext-xlfd.[ch]: new files with routines to handle X
Logical Font Descriptions in an attempt to improve backwards
compatibility.
* app/text/gimptext-parasite.[ch]
* app/xcf/xcf-load.c: promote layers with GDynText parasite to
GimpTextLayer. Work in progress, we need to improve font matching.
2003-06-24 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainertreeview.c
(gimp_container_tree_view_select_item): put back the hack which
calls gtk_tree_selection_select_iter() in addition to
gtk_tree_view_set_cursor() until bug #115871 is fixed.
* app/xcf/xcf-save.c: when saving a text layer, store an extra
parasite that holds all information about the text.
* app/xcf/xcf-load.c: if a "gimp-text-layer" parasite is found and
it can be successfully deserialized to a GimpText object, convert
the layer to a text layer and remove the parasite.
* devel-docs/parasites.txt: documented the new "gimp-text-layer"
parasite.
2003-06-24 Sven Neumann <sven@gimp.org>
Added persistent storage of text layers in XCF files. We use a
parasite in order to keep the file format backwards compatible.
Fixes bug #111781.
* app/text/Makefile.am
* app/text/gimptext-parasite.[ch]: new files that hold functions
to convert a GimpText object to a GimpParasite and back.
* app/text/gimptextlayer.[ch]: added an ugly hack that allows to
convert a normal layer to a text layer.
* app/xcf/xcf-save.c: when saving a text layer, store an extra
parasite that holds all information about the text.
* app/xcf/xcf-load.c: if a "gimp-text-layer" parasite is found and
it can be successfully deserialized to a GimpText object, convert
the layer to a text layer and remove the parasite.
* app/Makefile.am: had to change linkage order.
* devel-docs/parasites.txt: documented the new "gimp-text-layer"
parasite.
* app/text/gimptext-parasite.[ch]
* app/gui/session.c (session_save): plugged minor memory leaks.
2003-06-24 Sven Neumann <sven@gimp.org>
* app/config/gimpscanner.c: store file descriptor and filename in
a private struct instead of using internals of GScanner. Should
fix problems on Win32 reported by Hans Breuer.
2003-06-24 Sven Neumann <sven@gimp.org>
* tools/pdbgen/pdb/image.pdb: changed the maximum preview
dimensions in gimp_image_get_thumbnail() to the limit implied by
the core preview system (GIMP_VIEWABLE_MAX_PREVIEW_SIZE). Fixes
bug #115464.
* libgimp/gimpimage_pdb.c
* app/pdb/image_cmds.c: regenerated.
2003-06-24 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-undo-push.c (undo_pop_image_grid)
* app/core/gimpimage.c (gimp_image_set_grid): ref/unref the grid.
* app/gui/view-commands.c (view_configure_grid_cmd_callback): set
the dialog transient for the shell, make shell->grid_dialog a
weak pointer of the grid dialog.
* app/gui/grid-dialog.c: don't set shell->grid_dialog to NULL
here, attach the grid using g_object_set_data_full() and don't
unref it explicitely. Use gimp_config_is_equal_to() instead of
gimp_config_diff().
* app/core/gimpgrid.[ch]: derive GimpGrid from GimpObject (not
GObject) allowing us to use gimp_object_get_memsize(). Added
missing copyright notice.
* app/core/gimpimage.c: only call gimp_object_get_memsize() if
gimage->grid != NULL.
* app/gui/grid-dialog.c: added mnemonics, set shell->grid_dialog
to NULL when destroyed.
* app/gui/view-commands.c (view_configure_grid_cmd_callback):
added call to gtk_window_present().
2003-06-23 Sven Neumann <sven@gimp.org>
* app/config/gimpconfig.[ch]
* app/config/gimpconfigwriter.[ch]
* app/config/gimpscanner.[ch]: added support for serializing to
and deserializing from strings. Had to do some smaller changes to
the GimpConfig API.
* app/config/test-config.c: added a simple test for the new
functions.
* app/config/gimpconfig-dump.c
* app/config/gimprc.c
* app/core/gimp-documents.c
* app/core/gimp-parasites.c
* app/core/gimp-templates.c
* app/core/gimpunits.c
* app/gui/session.c
* app/plug-in/plug-in-rc.c
* app/tools/tool_options.c
* app/widgets/gimpdevices.c: follow GimpConfig API changes.
* libgimpbase/gimpparasite.[ch]: declared the return value of
gimp_parasite_data() as gconstpointer.
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.