2006-10-09 Michael Natterer <mitch@gimp.org>
Added message severities and make sure all messages are routed
through a central function, so redirecting to the error console or
stderr work again:
* app/core/core-enums.[ch]: added enum GimpMessageSeverity { INFO,
WARNING, ERROR }.
* app/core/gimp.[ch] (gimp_message)
(gimp_message_valist): added severity parameter. Changed
"GimpProgress *progress" parameter to "GObject *handler", where
"handler" can be either a GimpProgress, a GtkWidget or NULL.
* app/core/gimp-gui.[ch] (gimp_show_message): ditto. Honor
--console-messages again. Always dispatch to the GUI message
handler first if it exists.
* app/gui/gui-message.[ch]: pass severity parameters around.
(gui_message_error_dialog): if "handler" is a progress, dispatch
the message to it first. If it is a widget (and *not* a progress),
use a GtkMessageDialog on top of that widget's toplevel. Fall
back to the usual GimpErrorDialog otherwise.
* app/core/gimpprogress.[ch] (gimp_progress_message): added
severity parameter. Also added boolean return value to the virtual
function so it can decide to fail if it can't handle the message.
* app/display/gimpdisplay.c: implement GimpProgress::message() and
redirect the message to GimpDisplayShell.
* app/display/gimpdisplayshell-progress.c: implement
GimpProgress::message() and redirect the message to GimpStatusbar
if it is not an error and if the status bar is visible.
* app/display/gimpstatusbar.[ch]: implement GimpProgress::message(),
but fail on messages that contain a newline. Show the right icons
for the message severities (work in progress).
* app/display/gimpdisplayshell.[ch]: removed
gimp_display_shell_message() and its _valist() variant.
* app/widgets/gimperrorconsole.[ch]: show the right icons for the
message severities.
* app/widgets/gimpthumbbox.c (gimp_thumb_box_progress_message):
return TRUE to swallow all messages.
* app/widgets/gimpwidgets-utils.[ch]: removed
gimp_show_message_dialog(). Added gimp_get_message_stock_id().
* app/errors.c
* app/actions/edit-commands.c
* app/actions/error-console-commands.c
* app/actions/file-commands.c
* app/actions/select-commands.c
* app/actions/text-editor-commands.c
* app/actions/vectors-commands.c
* app/core/gimpimage-convert.c
* app/core/gimpimagefile.c
* app/dialogs/convert-dialog.c
* app/dialogs/file-open-dialog.c
* app/dialogs/file-open-location-dialog.c
* app/dialogs/file-save-dialog.c
* app/dialogs/palette-import-dialog.c
* app/dialogs/stroke-dialog.c
* app/display/gimpdisplayshell-dnd.c
* app/pdb/gimppdb.c
* app/plug-in/gimpplugin.c
* app/tools/gimpimagemaptool.c
* app/tools/gimptool.c
* app/tools/gimpvectortool.c
* app/widgets/gimpactionview.c
* app/widgets/gimpcontrollerlist.c
* app/widgets/gimppdbdialog.c
* app/widgets/gimpvectorstreeview.c
* app/xcf/xcf-load.c
* app/xcf/xcf-save.c
* app/xcf/xcf.c
* tools/pdbgen/pdb/brush.pdb
* tools/pdbgen/pdb/gradient.pdb
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/message.pdb
* tools/pdbgen/pdb/palette.pdb: added severity parameter to
gimp_message() calls. Convert all calls to
gimp_show_message_dialog() and gimp_display_shell_message() to
gimp_message(). Also converted some more g_message() calls.
* app/pdb/brush_cmds.c
* app/pdb/gradient_cmds.c
* app/pdb/image_cmds.c
* app/pdb/message_cmds.c
* app/pdb/palette_cmds.c: regenerated.
2006-09-28 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell.[ch]: added
gimp_display_shell_message() and a valist variant and decide here
where the message is shown.
* app/actions/edit-commands.c (edit_paste)
* app/tools/gimptool.c (gimp_tool_message): use the new message API.
2006-09-28 Michael Natterer <mitch@gimp.org>
* app/display/gimpstatusbar.[ch]: added _valist() variants
of all printf-style functions.
* app/tools/gimptool.[ch] (gimp_tool_push_status)
(gimp_tool_replace_status)
(gimp_tool_message): take printf-style ... arguments and use the
new valist() variants of the statusbar API to avoid additional
strdups. Revert previous commit from Sven, he will add back that
feature differently right away :)
* app/tools/gimpmeasuretool.c
* app/tools/gimppainttool.c: use the new printf-style status API
where possible.
* app/tools/gimptransformtool.c: accidentially removed
"core/gimp.h", added it back.
2006-09-22 Michael Natterer <mitch@gimp.org>
* app/display/gimpstatusbar.c (gimp_statusbar_progress_style_set):
terminate the spaces string correctly. Spotted by bill.
2006-09-22 Michael Natterer <mitch@gimp.org>
* app/display/gimpstatusbar.[ch]: changed all message setting
functions to use printf-style argument lists. Added new API to
show a temporary message that stays on top regardless of any other
message activity and disappears after 3 seconds.
* app/actions/edit-commands.c: show a statusbar message when
pasting fails because the clipboard contains no image data. Pop a
dialog when "Paste as New" fails. Addresses bug #357059 for
internal functions.
* app/display/gimpdisplayshell-title.c
* app/gui/gui.c
* app/tools/gimptool.c: changed accordingly.
2006-09-22 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_space_released): also look at
shell->space_release_pending when deciding whether to return early.
* app/display/gimpcanvas.[ch]
* app/tools/gimpdrawtool.[ch]: remove recently added code relating
to stippled xor drawing -- not handled well by some display
drivers.
* app/tools/gimprectangletool.c: improve drawing of handles.
Trying to implement some usability recommendations from
Peter Sikking: bigger handles, more feedback to user.
* app/display/gimpcanvas.[ch]: add
GIMP_CANVAS_STYLE_XOR_STIPPLED to set of styles.
* app/tools/gimpdrawtool.[ch]
(gimp_draw_tool_draw_rectangle_stippled): new function.
Needs a better stipple pattern, though.
* app/tools/gimprectangletool.c: bigger handles in corners,
and highlight thing that user is currently moving.
2006-09-12 Michael Natterer <mitch@gimp.org>
Added new tool API for modifier key events while the tool
is active and implement it in the rect select and crop tools.
Fixes bug #316156 and bug #355302.
* app/tools/gimptool.[ch]: added GimpTool::active_modifier_key()
and public function gimp_tool_set_active_motifier_state(). Remember
the active_state at button_press and reset it on button_release.
Ignore releases of modifiers that were pressed at button_press (but
only ignore them once).
* app/tools/tool_manager.[ch]: added wrapper
tool_manager_active_modifier_state_active().
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_events): return FALSE for all modifiers even
when mouse button 1 is pressed.
(gimp_display_shell_canvas_tool_events): when bouse button 1 is
pressed *and* the tool is active, dispatch the new active_modifier
events to tools.
* app/tools/gimpcroptool.c
* app/tools/gimprectangleselecttool.c
* app/tools/gimprectangletool.[ch]: implement active_modifier_key()
instead of modifier_key().
2006-09-12 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-selection.c (selection_undraw):
need
to restart the selection here. Should fix bug #355395 and bug
#355456.
2006-09-12 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-callbacks.c
* app/tools/gimpforegroundselecttool.c
* app/tools/gimpmovetool.c
* app/tools/gimppainttool.c
* app/tools/gimprectangletool.c
* app/tools/gimpselectiontool.c
* app/tools/gimpsourcetool.c
* app/tools/gimpvectortool.c: back out change committed on
2006-08-21 which passed modifier events to tools even while mouse1
was down. This generated way too much unexpected events that would
have to be special cased in all tools. Will implement an anternate
solution soon.
2006-09-11 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_ruler_button_press): don't just
unconditionally use the active tool for sample point moving if it
is a GimpColorTool, use it only if it is a GimpColorTool but *not*
a GimpPaintTool with color picking disabled. Fixed bug #355237.
2006-09-08 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-callbacks.c: use coordinates from
the current device when starting to scroll. Grab the keyboard
and
pointer when panning with the space bar.
2006-09-08 Sven Neumann <sven@gimp.org>
* app/config/gimpdisplayconfig.[ch]
* app/config/gimprc-blurbs.h
* app/display/display-enums.[ch]: added new gimprc option
"space-bar-action" and default to "pan". Will add a GUI for this later.
* app/display/gimpdisplayshell-callbacks.c: respect the new option
and either pan the display or push the move tool. Fixes bug #349903.
2006-09-08 Sven Neumann <sven@gimp.org>
* app/core/gimp.[ch]: added function gimp_get_tool_info().
* app/actions/tools-commands.c
* app/actions/vectors-commands.c
* app/tools/gimppainttool.c
* app/widgets/gimpdrawabletreeview.c
* app/widgets/gimpselectioneditor.c
* app/widgets/gimptoolbox.c: use the new function instead of poking
into gimp->tool_info_list.
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell.[ch]: moved code that deals with
the space key into separate functions. Added space_shaded_tool
to GimpDisplayShell instead of using a static variable for it.
* app/tools/tool_manager.c: removed unused include.
2006-09-05 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-selection.c: switch from a short
timeout to an idle handler for starting the animation.
2006-09-04 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell.c
* app/display/gimpdisplayshell-selection.c: more code cleanup.
Monitor the shell's window visibility and don't run the timeout
if
the shell is fully obscured.
2006-09-04 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-selection.c: more code cleanup.
Monitor the shell's window state and don't run the timeout if
the
shell is withdrawn or iconified.
2006-09-04 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-selection.c: code cleanup. Only
use
a timeout if there is actually a selection and if it is not
hidden.
2006-09-04 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-selection.[ch]: some cleanup.
Made
the Selection struct private and removed unused state member.
Removed redundant parameter from
gimp_display_shell_selection_start().
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell.c: changed accordingly.
2006-09-01 Sven Neumann <sven@gimp.org>
* app/display/gimpstatusbar.c: use a hash table instead of object
data to maintain context ids. Saves lots of pointless string copies.
2006-08-29 Michael Natterer <mitch@gimp.org>
Changed GimpViewable preview rendering to have a context to get
FG/BG/whatever from. Use the context to enable dynamic FG/BG
colors in gradients. Fixes bug #127676 and bug #352214. Addresses
bug #128367 (doesn't fix it because there's no loading/saving and
no GUI yet).
* app/core/core-enums.[ch]: added enum GimpGradientColor to enable
specifying gradient colors in terms of foreground and background.
* app/core/gimpgradient.[ch]: added color_type members to the
GimpGradientSegment struct and honor them in
gimp_gradient_get_color_at(). Added GimpContext parameters to all
functions which finally call get_color_at().
* app/core/gimp-gradients.c: use the new method to implement the
builtin gradients.
* app/core/gimpviewable.[ch]: added GimpContext parameters to all
get_preview() and get_pixbuf() functions.
* app/core/gimpbrush.c
* app/core/gimpbuffer.c
* app/core/gimpdrawable-preview.[ch]
* app/core/gimpgradient.c
* app/core/gimpimage-preview.[ch]
* app/core/gimpimagefile.c
* app/core/gimppalette.c
* app/core/gimppattern.c
* app/core/gimpundo.[ch]
* app/text/gimpfont.c
* app/vectors/gimpvectors-preview.[ch]: changed ::get_preview()
and ::get_pixbuf() implementations accordingly.
* app/core/gimpdrawable-blend.c
* app/core/gimppalette-import.[ch]
* app/dialogs/dialogs-constructors.c
* app/dialogs/palette-import-dialog.c
* app/dialogs/resize-dialog.c
* app/display/gimpdisplayshell-layer-select.c
* app/display/gimpdisplayshell.c
* app/display/gimpnavigationeditor.c
* app/paint/gimppaintoptions.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimptexttool.c
* app/actions/gradient-editor-commands.c
* app/widgets/gimpaction.c
* app/widgets/gimpbrusheditor.[ch]
* app/widgets/gimpbufferview.c
* app/widgets/gimpcellrendererviewable.c
* app/widgets/gimpchanneltreeview.c
* app/widgets/gimpclipboard.c
* app/widgets/gimpcoloreditor.c
* app/widgets/gimpcomponenteditor.c
* app/widgets/gimpcontainerbox.c
* app/widgets/gimpcontainercombobox.c
* app/widgets/gimpcontainereditor.c
* app/widgets/gimpcontainerentry.c
* app/widgets/gimpcontainergridview.c
* app/widgets/gimpcontainertreeview.[ch]
* app/widgets/gimpdataeditor.[ch]
* app/widgets/gimpdevicestatus.c
* app/widgets/gimpdnd.[ch]
* app/widgets/gimpdrawabletreeview.c
* app/widgets/gimpfiledialog.c
* app/widgets/gimpgradienteditor.[ch]
* app/widgets/gimpgradientselect.c
* app/widgets/gimpitemtreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimppaletteeditor.[ch]
* app/widgets/gimppropwidgets.[ch]
* app/widgets/gimpselectioneditor.c
* app/widgets/gimpthumbbox.[ch]
* app/widgets/gimptoolbox-image-area.c
* app/widgets/gimptoolbox-indicator-area.c
* app/widgets/gimptooloptionseditor.c
* app/widgets/gimpundoeditor.c
* app/widgets/gimpvectorstreeview.c
* app/widgets/gimpview-popup.[ch]
* app/widgets/gimpview.[ch]
* app/widgets/gimpviewablebutton.c
* app/widgets/gimpviewabledialog.c
* app/widgets/gimpviewrenderer.[ch]
* app/widgets/gimpviewrenderer-frame.c
* app/widgets/gimpviewrendererbrush.c
* app/widgets/gimpviewrendererbuffer.c
* app/widgets/gimpviewrendererdrawable.c
* app/widgets/gimpviewrenderergradient.c
* app/widgets/gimpviewrendererimage.c
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/gradient.pdb
* tools/pdbgen/pdb/gradients.pdb
* tools/pdbgen/pdb/image.pdb: added tons of GimpContext members
and parameters, implement GimpDocked::set_context() in many
widgets. Pass these locally remembered contexts to GimpViewable
functions. Did some minor cleanups on the way. There are still
some minor FIXMEs around where the code uses a NULL context (which
is allowed by the APIs)
* app/pdb/drawable_cmds.c
* app/pdb/gradient_cmds.c
* app/pdb/gradients_cmds.c
* app/pdb/image_cmds.c: regenerated.
2006-08-29 Sven Neumann <sven@gimp.org>
* libgimpbase/Makefile.am
* libgimpbase/gimpbase.h
* libgimpbase/gimprectangle.[ch]: added new files that hold
gimp_rectangle_intersect(), factored out of the core.
* libgimpbase/gimpbase.def: updated.
* app/core/gimp-edit.c
* app/core/gimp-utils.c
* app/core/gimp-utils.h
* app/core/gimpchannel-combine.c
* app/core/gimpdrawable-foreground-extract.c
* app/core/gimpdrawable-transform.c
* app/core/gimpdrawable.c
* app/core/gimpimage-preview.c
* app/core/gimplayer.c
* app/core/gimpscanconvert.c
* app/display/gimpdisplayshell-draw.c: changed includes accordingly.
* libgimp/gimpdrawablepreview.c: don't duplicate
gimp_rectangle_intersect() here, use the function in libgimpbase.
* app/base/siox.c: use gimp_rectangle_intersect() to reduce the
working area to the region of interest. Fixes bug #340422.
2006-08-24 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-preview.c
(gimp_display_shell_draw_tri): just return if gdk_drawable_get_size()
returns 0 for width or height (bug #340056).
* app/display/gimpdisplayshell-callbacks.c: allow modifier key events
for Shift and Control to be propagated even if button1 is down.
* app/tools/gimpclonetool.c
* app/tools/gimpcroptool.c
* app/tools/gimpforegroundselecttool.c
* app/tools/gimpmovetool.c
* app/tools/gimppainttool.c
* app/tools/gimpvectortool.c: change modifier_key method
to prevent any bad consequences.
* app/tools/gimprectangletool.[ch]: add modifier_key handler, and use it
to toggle "make-square" if Shift is pressed while button1 is down, and
"fixed-center" if Control is pressed while button1 is down.
* app/tools/gimprectangleselecttool.c (gimp_rectangle_tool_modifier_key):
call rectangle tool modifer_key method after chaining up.
2006-08-15 Hans Breuer <hans@breuer.org>
* **/makefile.msc app/gimpcore.def : updated
* app/xcf/xcf-save.c(1464) : error C2036: 'void *' : unknown size
pointer arithmetics on void a pointer looks like a GCC extension
* app/tools/gimpbrightnesscontrasttool.c
app/tools/gimpcolorbalancetool.c
app/tools/gimphuesaturationtool.c
app/tools/gimpcolorizetool.c : #include "core/gimp.h" for gimp_message
* app/tools/gimpiscissorstool.c : use RINT() rather than rint()
* app/widgets/gimpcontrollerlist.c : #include "gimpwidgets-utils.h"
for gimp_show_message_dialog
* app/core/gimpprogress.c(229) : 'gimp_progress_message' must
return a value
2006-08-09 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-transform.[ch]: added new function
gimp_display_shell_transform_segments().
* app/display/gimpdisplayshell-selection.c (selection_transform_segs)
* app/tools/gimpregionselecttool.c
(gimp_region_select_tool_calculate): use the new function instead
of looping over the segments.
2006-08-09 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-draw.c (gimp_display_shell_draw_pen)
(gimp_display_shell_draw_vector): use the new transform functions.
* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_lines)
(gimp_draw_tool_draw_strokes): bail out early if num_points == 0.
2006-08-09 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-transform.[ch]: renamed
transform_coords() to transform_coordinate(); same for the
untransform variant. Added new functions transform_points() and
transform_coords() that work on arrays.
* app/display/gimpdisplayshell-autoscroll.c
* app/display/gimpdisplayshell-callbacks.c: changed accordingly.
* app/tools/gimpdrawtool.c (gimp_draw_tool_draw_lines)
(gimp_draw_tool_draw_strokes): use the new transform functions.
2006-08-05 Michael Natterer <mitch@gimp.org>
Applied (modified and enhanced) patch from Chris Moller which allows
tools to distinguish similar colors not only by composite, but also
by R, G, B, H, S and V. Fixes bug #348291.
* app/core/core-enums.[ch]: added new enum GimpSelectCriterion
which can be one of { COMPOSITE, R, G, B, H, S, V }.
* app/core/gimpimage-contiguous-region.[ch]: added
select_criterion params and create the region based on difference
by the selected criterion.
* app/core/gimpchannel-select.[ch]
* app/core/gimpdrawable-bucket-fill.[ch]: take criterion params and
pass them through to the contiguous region functions.
* app/tools/gimpbucketfilloptions.[ch]
* app/tools/gimpselectionoptions.[ch]: added criterion properties
and GUI to select it.
* app/tools/gimpbucketfilltool.c
* app/tools/gimpbycolorselecttool.c
* app/tools/gimpfuzzyselecttool.c: pass the selected criterion to
the resp. core functions.
* app/widgets/gimpdrawabletreeview.c
* app/widgets/gimpselectioneditor.c
* app/display/gimpdisplayshell-dnd.c
* tools/pdbgen/pdb/edit.pdb
* tools/pdbgen/pdb/selection_tools.pdb: changed accordingly
(simply pass GIMP_SELECT_CRITERION_COMPOSITE in most cases).
* app/pdb/edit_cmds.c
* app/pdb/selection_tools_cmds.c: regenerated.
2006-07-13 Sven Neumann <sven@gimp.org>
* app/display/gimpstatusbar.c (gimp_statusbar_set_cursor): set the
sensitivity of the cursor label before converting the coordinates
to the display unit (bug #347339).
2006-06-29 Sven Neumann <sven@gimp.org>
* app/display/Makefile.am
* app/display/gimpdisplayshell-progress.[ch]: new files,
implementing the GimpProgress interface by delegation to
GimpStatusbar.
* app/display/gimpdisplayshell.c (G_DEFINE_TYPE): call
gimp_display_shell_progress_iface_init().
* app/display/gimpdisplay.c: delegate progress calls to
GimpDisplayShell instead of shell->statusbar.
2006-06-18 Michael Natterer <mitch@gimp.org>
* app/tools/gimptool.[ch]: added virtual functions
GimpTool::has_display(), which returns whether any tool subclass
keeps a pointer to the passed display; and GimpTool::has_image()
which returns a display based on a passed image, or NULL if no
display matches. Added default implementation of
GimpTool::control() which sets tool->display to NULL on HALT.
* app/tools/gimpclonetool.c
* app/tools/gimpdrawtool.c: implement both functions.
* app/tools/gimpclonetool.c: removed weak pointer hacks that are
no longer needed now (and were incomplete anyway).
* app/tools/tool_manager.c (tool_manager_select_tool)
(tool_manager_control_active)
(tool_manager_image_clean_dirty): use the new functions instead of
peeking around in tool subclasses (and forgetting tools that may
have display pointers, like the clone tool)
* app/display/gimpdisplay.c (gimp_display_delete): removed
fiddling with tool internals here too, control(HALT) on the tool
is now sufficient to remove any reference to the closed display.