2004-02-18 Sven Neumann <sven@gimp.org>
* tile-cache.c
* tile-private.h
* tile.[ch]: removed trailing whitespace, added some newlines,
let tile_is_valid() return a gboolean instead of a gint.
* app/core/gimpimage-projection.c
* app/core/gimpimage-undo-push.c
* app/paint/gimppaintcore.c
* app/tools/gimpinktool.c: use the return value from tile_is_valid()
as a boolean.
2004-02-18 Simon Budig <simon@gimp.org>
* app/display/gimpdisplayshell.c
* app/tools/gimpmovetool.c: Adjusted snapping distance
to 8 pixels, probably should be a preferences option.
* app/tools/gimppainttool.c: Do not center the start and end
of a straight line to the center of an image-pixel unless
the brush mode is GIMP_BRUSH_HARD. Fixes bug #134410.
2004-02-16 Sven Neumann <sven@gimp.org>
* app/tools/gimpcroptool.c (crop_info_create): use limits from
libgimpbase instead of arbitrary numbers. Don't allow a crop width
or height smaller than 1 (or GIMP_MIN_IMAGE_SIZE actually).
2004-02-13 Simon Budig <simon@gimp.org>
* app/core/gimpimage-guides.[ch]: make a similar fix as in my
last commit for snapping the guides.
* app/tools/gimpmovetool.c: use the fixed version.
2004-02-12 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-convert.c (gimp_image_convert): call
gimp_image_colormap_changed() after installing the colormap.
* app/tools/gimphistogramoptions.h: fixed typedef of
GimpHistogramOptionsClass.
2004-02-12 Michael Natterer <mitch@gimp.org>
* app/widgets/gimphistogramview.c (gimp_histogram_view_button_press):
ignore double clicks so we don't grab the pointer away from the
curves dialog. Fixes bug #132356.
* app/tools/gimpcurvestool.c (curves_graph_events): ignore button
press and release events from all buttons except the first one.
2004-02-12 Sven Neumann <sven@gimp.org>
* app/tools/gimptexttool.[ch]: derive the text tool from GimpTool
directly. Doesn't look like we are going to use draw_tool
functionality for 2.0.
2004-02-08 Sven Neumann <sven@gimp.org>
* app/tools/gimpiscissorstool.c (gimp_iscissors_tool_button_press):
don't activate the iscissors tool if it's already active
(bug #132351).
2004-02-08 Sven Neumann <sven@gimp.org>
* app/tools/gimptexttool.c (gimp_text_tool_set_layer): implemented
so that double-clicking a text layer now only activates the text
tool but also set the layer's text on the tool options.
2004-02-08 Sven Neumann <sven@gimp.org>
* app/tools/gimptoolcontrol.c (gimp_tool_control_activate)
(gimp_tool_control_halt): put overly picky sanity checks into
#ifdef GIMP_UNSTABLE ... #endif so we won't get these harmless
tool warnings from the stable version (bug #121074).
2004-02-07 Hans Breuer <hans@breuer.org>
* gimpdefs.msc : new file to keep common definitions for the msc build
* **/makefile.msc : use common defintions, e.g. GIMP_VER
* Makefile.am : add the former to EXTRA_DIST
2004-02-07 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell.[ch]: removed all drawing functions.
The file was still too large.
* app/display/Makefile.am
* app/display/gimpdisplayshell-draw.[ch]: new files containing
the drawing functions.
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell-handlers.c
* app/tools/gimpmovetool.c: changed #includes accordingly.
* app/display/gimpdisplay-handlers.c
(gimp_display_size_changed_handler): added some #if 0'ed code I'm
not sure about. Actually, some of the handlers in this file could
need the same code, so it could be abstracted as
gimp_display_stop_draw() or something. Please have a look.
2004-02-05 Michael Natterer <mitch@gimp.org>
* app/tools/gimprectselecttool.c
(gimp_rect_select_tool_rect_select): don't try to CLAMP() the
passed in rectangle to valid image/drawable coordinates manually
when auto-shrinking the selection. Instead, use
gimp_rectangle_intersect(). Also honor the active drawable's
offsets. Fixes bug #133467.
2004-01-29 Simon Budig <simon@gimp.org>
* app/display/gimpdisplayshell.[ch]: Store the zoom factor as
float, not as a ratio.
* app/display/gimpdisplayshell-scale.[ch]: change the API to
expose the Float instead a weirdly encoded integer. Implement
functions to get a ratio from the scale factor. Implement a set
as presets as discussed on the mailinglist. Changed Zoom->Other
dialog to enable entering a float.
* app/display/gimpdisplayshell-title.c
* app/display/gimpnavigationview.c
* app/gui/image-menu.c
* app/gui/info-window.c
* app/tools/gimpmagnifytool.c: changed accordingly.
* app/core/gimp.[ch]
* app/display/gimpdisplay.[ch]
* app/gui/gui-vtable.c
* app/widgets/widgets-enums.h: Made the various display-creating
functions accept a float for the scale. Introduce a new
GimpZoomType: GIMP_ZOOM_TO. Generally adjust the API to use
floats instead of weird integers.
* app/core/gimp-edit.c
* app/core/gimptemplate.c
* app/display/gimpdisplayshell-callbacks.c
* app/file/file-open.c
* app/gui/image-commands.c
* app/gui/view-commands.[ch]
* tools/pdbgen/pdb/display.pdb
* app/widgets/gimpimageview.c
* app/widgets/gimptoolbox-dnd.c: changed accordingly
* app/pdb/display_cmds.c: regenerated
2004-01-29 Sven Neumann <sven@gimp.org>
* app/tools/gimpcurvestool.c
* app/tools/gimpinkoptions.c
* app/tools/gimplevelstool.c: removed explicit grabs. The pointer
is already implicitely grabbed while the button is pressed.
2004-01-27 Michael Natterer <mitch@gimp.org>
Re-enabled filling the whole selection using the bucket fill
tool. Fixes bug #132649.
* app/tools/gimpbucketfilloptions.[ch]: added boolean property
"fill-selection" and a GUI for it.
* app/tools/gimpbucketfilltool.c: changed accordingly.
2004-01-26 Sven Neumann <sven@gimp.org>
* app/tools/gimpcurvestool.c
* app/widgets/gimphistogramview.c: use dark_gc instead of
text_aa_gc to draw the histogram and curves grid lines. dark_gc is
slightly lighter, looks better and fixes bug #132565.
2004-01-26 Simon Budig <simon@gimp.org>
* app/tools/gimpvectortool.c: do nothing in _button_press when
the tool is in the VECTORS_FINISHED state.
Fixes bug #132508.
2004-01-24 Michael Natterer <mitch@gimp.org>
* tools/pdbgen/pdb/color.pdb (levels, curves): fiddle with the
passed channel index only for GRAYA drawables, not for all GRAY
drawables. Fixes bug #132322.
* tools/pdbgen/pdb/color.pdb: regenerated.
* app/tools/gimpcurvestool.[ch]
* app/tools/gimplevelstool.[ch]: fixed the same bug here. It never
occured because the "channel" field was accidentially initialized
with the correct value and never changed after.
2004-01-21 Michael Natterer <mitch@gimp.org>
* app/tools/gimptool.[ch]: added boolean return value to
GimpTool::initialize(). Returning FALSE means the tool could not
be initialized and doesn't want to receive button events.
Return TRUE from the default implementation.
* app/tools/tool_manager.[ch]: added boolean return value to
tool_manager_initialize_active(). Don't set the tool's display or
drawable if initialize() returns FALSE.
* app/display/gimpdisplayshell-callbacks.c: don't send button
events to the tool if initialize() returns FALSE.
* app/tools/gimpbrightnesscontrasttool.c
* app/tools/gimpcolorbalancetool.c
* app/tools/gimpcolorizetool.c
* app/tools/gimpcurvestool.c
* app/tools/gimphuesaturationtool.c
* app/tools/gimplevelstool.c
* app/tools/gimpposterizetool.c
* app/tools/gimpthresholdtool.c: return FALSE for NULL and indexed
drawables.
* app/tools/gimpimagemaptool.c: always return TRUE because our
subclasses already checked if the active drawable is OK.
* app/tools/gimptransformtool.c: return FALSE for layers with
masks. Fixes bug #132089. Some random cleanups.
2004-01-21 Michael Natterer <mitch@gimp.org>
* app/gui/info-dialog.[ch]: renamed info_dialog_popdown() to
info_dialog_hide() and info_dialog_popup() to info_dialog_present().
Added info_dialog_show() which just shows the dialog without
calling gtk_window_present().
* app/gui/info-window.c
* app/gui/view-commands.c
* app/tools/gimptransformtool.c: changed accordingly.
* app/tools/gimpcroptool.c
* app/tools/gimpperspectivetool.c
* app/tools/gimprotatetool.c
* app/tools/gimpscaletool.c
* app/tools/gimpsheartool.c: use info_dialog_show() so the dialog
doesn't grab the focus away from the canvas. Fixes bug #132041.
2004-01-19 Michael Natterer <mitch@gimp.org>
* app/tools/gimptexttool.c (gimp_text_tool_create_layer): if there
is a floating selection, anchor it before adding the text layer.
Fixes bug #127451.
Also fixed some issues with undo. Addresses, but does not fix
bug #124969 and bug #130985.
2004-01-19 Sven Neumann <sven@gimp.org>
* app/*/*.c: include "libgimpbase/gimpbase.h" where needed; removed
now unnecessary inclusions of "file/file-utils.h".
2004-01-19 Sven Neumann <sven@gimp.org>
* app/file/file-utils.[ch]: removed file_utils_filename_to_utf8() ...
* libgimpbase/gimputils.[ch]: ... and added it here as
gimp_filename_to_utf8(). Added some docs that promise less than
the current implementation holds so that we can change the
implementation later.
* app/*/*.c: use gimp_filename_to_utf8() where
file_utils_filenames_to_utf8() has been used before.
* libgimpbase/gimpbase.def: changed accordingly.
* configure.in: reset GIMP_INTERFACE_AGE.
2004-01-15 Michael Natterer <mitch@gimp.org>
Fixed bug #78732 (don't paste off screen):
* app/display/gimpdisplayshell-transform.[ch]: added new function
gimp_display_shell_untransform_viewport() which returns the
visible rectangle of the image in image coordinates.
* app/core/gimp-edit.[ch] (gimp_edit_paste): added viewport
parameters and changed positioning of the pasted layer as follows:
- if there is a selection, center on the selection (just as before).
- if there is no viewport, center on the active drawable.
- if the viewport intersects with the active drawable, center
on the intersection.
- if the viewport does *not* intersect with the active drawable,
center on the active drawable (off-screen, but better than pasting
something that will be invisible due to floating selection clipping).
- if there is no active drawable, center on the viewport.
- if there is no active drawable and no viewport, center on the image.
* app/widgets/gimpbufferview.c (gimp_buffer_view_paste_clicked)
(gimp_buffer_view_paste_into_clicked)
* app/display/gimpdisplayshell-dnd.c (gimp_display_shell_drop_buffer)
* app/gui/edit-commands.c (edit_paste_cmd_callback)
(edit_paste_into_cmd_callback): ask the shell for the viewport
and pass it to gimp_edit_paste().
* app/display/gimpdisplayshell-dnd.c
(gimp_display_shell_drop_drawable): center the created layer on
the viewport.
* app/tools/gimpmovetool.c (gimp_move_tool_button_release): use
gimp_display_shell_untransform_viewport() (its code was taken from
here).
* tools/pdbgen/pdb/edit.pdb: pass "no viewport" to gimp_edit_paste().
* app/pdb/edit_cmds.c: regenerated.
2004-01-14 Tor Lillqvist <tml@iki.fi>
* app/file/file-utils.[ch]: Add new function
file_utils_filename_to_utf8(), which is to be used when converting
file names (which are kept in the on-disk encoding) to UTF-8 for
passing to GTK, or to g_print() etc.
* app/*/*.c: Call file_utils_filename_to_utf8(). Should fix most
of the warnings generated by non-UTF8 pathnames. See #130118.
* libgimpbase/gimpenv.b: Document that gimp_directory() etc return
strings in the on-disk encoding.
* libgimpmodule/gimpmodule.c: Convert filenames to UTF-8 (using
g_filename_to_utf8()) before passing to g_print().
2004-01-13 Michael Natterer <mitch@gimp.org>
Allow invoking the text tool by double clicking a text layer in
the layers dialog, just like the path tool is invoked when double
clicking a path.
* app/tools/gimptexttool.[ch]: added empty
gimp_text_tool_set_layer() stub. Sven, your turn...
* app/gui/layers-commands.[ch]: added layers_text_tool() which
invokes the text tool on text layers and falls back to
layers_edit_layer_query() otherwise.
Added layers_text_tool_cmd_callback() for the layers menu.
* app/gui/layers-menu.c: added "Text Tool" menu item and hide
it for layers which are no text layers.
* app/gui/dialogs-constructors.c (dialogs_layer_list_view_new):
use layers_text_tool() as "activate" function.
2004-01-13 Michael Natterer <mitch@gimp.org>
* app/base/gimphistogram.[ch]: renamed gimp_histogram_nchannels()
to gimp_histogram_n_channels().
* app/core/gimpdrawable-histogram.c: removed silly double negation
logic. Cleanup.
* app/widgets/gimphistogrameditor.c
* app/widgets/gimphistogramview.c: adjust the GimpHistogramChannel
for GRAYA images to make sure we pick alpha from the right slot.
* app/tools/gimpcurvestool.c
* app/tools/gimplevelstool.c: removed the same hack here and call
gimp_histogram_view_set_channel() with the correct enum value.
* tools/pdbgen/pdb/color.pdb (levels, curves, histogram): fiddle
with enum values here too so GRAY* drawables produce the correct
results.
Fixed precondition checks and set "success" in a uniform way all
over the place.
Use gimp_drawable_calculate_histogram() instead of duplicating its
code here.
(started with a patch from Pedro Gimeno. Fixes bug #109078)
* app/pdb/color_cmds.c: regenerated.
2004-01-12 Michael Natterer <mitch@gimp.org>
Enabled/fixed moving of channels and layer masks (was something
between disabled and broken before).
* app/tools/gimpeditselectiontool.h (enum EditType): added new
values EDIT_CHANNEL_TRANSLATE and EDIT_LAYER_MASK_TRANSLATE.
* app/tools/gimpmovetool.c (gimp_move_tool_button_press): look at
the type of the active drawable and invoke GimpEditSelectionTool
accordingly.
(gimp_move_tool_cursor_update): don't show the "bad" cursor when
the active drawable is a channel or layer mask.
* app/tools/gimpeditselectiontool.c: changed/enabled moving of
channels and layer masks to work similar to selection mask moving:
- Show only the item's outline while moving and do the actual move
on button_release.
- Fixed/generalized some code to cope with the fact that we move
the linked layers/vectors *while* moving but the moved channel
itself *after* moving.
- Draw the channel's/mask's bounding box instead of its boundary
if the boundary is empty (if all its values are either below or
above HALF_WAY).
2004-01-02 Michael Natterer <mitch@gimp.org>
* app/tools/gimppainttool.c: removed GimpTool::cursor_update()
implementation (which was there only to stop drawing the brush
preview when the mouse leaves the canvas). Instead, look at
shell->proximity in GimpTool::oper_update() and just don't start
drawing the preview if proximity is FALSE.
* app/display/gimpdisplay.c (gimp_display_delete): set
gdisp->shell to NULL *before* gtk_widget_destroy()ing the shell so
our tool callbacks don't dispatch stuff while the shell is in the
middle of being destroyed.
Both changes fix bug #129374, though the latter is the fix for the
real problem.
2003-12-31 Simon Budig <simon@gimp.org>
* app/tools/gimpvectortool.[ch]: Fixed missing undo step when
moving (components of) the path. Don't add an undo step when
nothing changes.
Also rephrased the help strings in the statusbar to be shorter
and encourage the user to try shift. Fixes bug #124025.
2003-12-19 Simon Budig <simon@gimp.org>
* app/tools/gimpvectortool.[ch]: Removed private statusbar
gdisplay pointer. Now help texts are only shown on the gdisp
of the tool. Fixes bug #128209
2003-12-17 Michael Natterer <mitch@gimp.org>
* app/display/gimpcanvas.c (gimp_canvas_gc_new): restore the
cap_style and join_style properties for the XOR GdkGC to the
values GimpDrawTool's GC used to have. Fixes the result of
gdk_draw_segments().
* app/tools/gimpfuzzyselecttool.c (gimp_fuzzy_select_tool_motion):
CLAMP the threshold to its possible values when setting it in the
selection options.
(gimp_fuzzy_select_tool_button_release): restore the original
threshold after selecting.
2003-12-12 Hans Breuer <hans@breuer.org>
[
I've postponed my reservations against pangoft2/fontconfig/freetype2
usage, so The Gimp should now build with msvc without patching it.
]
* app/makefile.msc app/text/makefile.msc : use $(PANGOFT2_CFLAGS) etc.
* libgimpthumb/makefile.msc : (new file)
* makefile.msc : added libgimpthumb
* libgimpthumb/gimpthumbnail.c : include gimpwin32-io.h
* libgimpthumb/gimpthumb-utils.c : don't compare size pointer
with GIMP_THUMB_SIZE_FAIL but *size
* plug-ins/makefile.msc : handle libgimpoldpreview
* plug-ins/common/decompose.c : define cbrt() if not __GLIBC__
* plug-ins/common/winclipboard.c : make it compile without gimpcompat.h
* plug-ins/imagemap/imagemap_csim_lex.c : its a generated file
but still win32/msvc has no unistd.h
* plug-ins/pygimp/makefile.msc : (new file) to use the binary you
need to patch glib, see bug #98737
* plug-ins/libgimpoldpreview.c : use <libgimp/gimp.h> instead of "gimp.h"
* **/Makefile.am : added makefile.msc to EXTRA_DIST
2003-12-12 Sven Neumann <sven@gimp.org>
* app/tools/gimpcurvestool.c: use GimpHistogramOptions instead of
GimpColorOptions and connect the options to the histogram view.
2003-12-12 Michael Natterer <mitch@gimp.org>
* app/widgets/gimphistogramview.[ch]: added a hack that allows to
render the histogram in a brighter color. Fixed initial range for
views that are not selectable.
* app/tools/gimpcurvestool.[ch]: replaced the GtkDrawingArea by a
bright GimpHistogramView and render the curves tool controls on
top of the histogram. Fixes bug #71633.
2003-12-11 Michael Natterer <mitch@gimp.org>
* app/widgets/gimphistogramview.[ch]: applied (modified) patch
from Ed Halley which adds "quintile marks". Fixes bug #129050.
Render the histogram on a base_gc background and use text_gc and
text_aa_gc for rendering the histogram and the helper lines.
Fixed rendering of the 1px border around the histogram. Removed
separate drawing of baseline, left and right helper lines and draw
a rectangle which marks the entire area of possible values. Fixed
size_request calculation. Added missing getters. Cleanup.
* app/tools/gimpcurvestool.c: use the same color scheme as the
histogram.
* app/tools/gimpcurvestool.c (curves_load,save_callback)
* app/tools/gimplevelstool.c (levels_load,save_callback):
gtk_window_present() the file dialog if it is already visible.