- reorder enum GimpCursorType to be in angular order
- add gimp_cursor_rotate(cursor_type, angle)
- rotate the shell's cursors automatically in the setter
Instead of including dialogs/dialogs.h everywhere, introduce
gimp_dialog_factory_get_singleton(). The dialog factory singleton is
still initialized by dialogs.c though.
Right now the assumption is that we never will have another dialog
factory instance around. There were so many problems before when we
had four of them, so let's just keep one of them around.
We only have one dialog factory now, and
gimp_dialog_factory_from_name() doesn't provide compile-time type
safety, so use global_dialog_factory directly instead.
The new function does the right thing, unlike get_toplevel() which
returns the shell itself if it is not in a window. Check the return
value of get_window() for being non-NULL.
2009-01-17 Michael Natterer <mitch@gimp.org>
* all files with a GPL header and all COPYING files:
Change licence to GPLv3 (and to LGPLv3 for libgimp).
Cleaned up some copyright headers and regenerated the parsers in
the ImageMap plugin.
svn path=/trunk/; revision=27913
2008-10-09 Michael Natterer <mitch@gimp.org>
Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h
had a GEGL dependency (they will have in the next commit, but I
wanted to keep the commit separate).
* app/dialogs/Makefile.am
* app/file/Makefile.am
* app/gui/Makefile.am
* app/menus/Makefile.am
* app/paint/Makefile.am
* app/plug-in/Makefile.am
* app/text/Makefile.am
* app/vectors/Makefile.am
* app/widgets/Makefile.am
* app/xcf/Makefile.am: add GEGL_CFLAGS.
* app/actions/*.c
* app/core/*.c
* app/dialogs/*.c
* app/display/*.c
* app/file/*.c
* app/gui/*.c
* app/menus/*.c
* app/paint/*.c
* app/pdb/gimppdb-utils.c
* app/pdb/gimpprocedure.c
* app/plug-in/*.c
* app/text/*.c
* app/tools/*.c
* app/vectors/*.c
* app/widgets/*.c
* app/xcf/*.c: add <gegl.h> or replace <glib-object.h> by <gegl.h>
to all files which include a drawable subclass or gimpimage.h
* tools/pdbgen/app.pl: include <gegl.h> instead of <glib-object.h>
in all generated files.
* app/pdb/*-cmds.c: regenerated.
* data/images/gimp-splash.png: the goat is still sleeping.
By Aurore Derriennic.
svn path=/trunk/; revision=27202
2008-08-20 Michael Natterer <mitch@gimp.org>
Bug 496772 – Position shown in the statusbar needs more
precision (for some tools)
* app/display/display-enums.[ch]: add enum GimpCursorPrecision
which can be one of { PIXEL_CENTER, PIXEL_BORDER, SUBPIXEL }.
* app/display/gimpdisplayshell-cursor.[ch]: add "precision"
parameter to gimp_display_shell_update_cursor() and pass it
on to the statusbar.
* app/display/gimpstatusbar.[ch]: add "precision" parameters to
the cursor coordinates APIs, offset the passed coords accordingly
and display them with one decimal point if SUBPIXEL is requested
and the display's unit is PIXEL. Keep a second floating-point
format string around at any time.
* app/tools/gimptoolcontrol.[ch]: add a "precision" member and API
so tools can configure the precision they need. Defalt to
PIXEL_CENTER since that's right for almost all tools.
* app/display/gimpdisplayshell-callbacks.c: pass the tool's
precision to gimp_display_shell_update_cursor().
* app/tools/gimptool.[ch]: add "precision" parameter to
gimp_tool_push_status_coords() and pass it on to the statusbar.
* app/tools/gimpaligntool.c
* app/tools/gimpblendtool.c
* app/tools/gimpcolortool.c
* app/tools/gimpcroptool.c
* app/tools/gimpeditselectiontool.c
* app/tools/gimpfliptool.c
* app/tools/gimpfreeselecttool.c
* app/tools/gimpmovetool.c
* app/tools/gimppainttool.c
* app/tools/gimpperspectiveclonetool.c
* app/tools/gimprectangleselecttool.c
* app/tools/gimprectangletool.c
* app/tools/gimptransformtool.c
* app/tools/gimpvectortool.c: set precision in init() where
needed. Adjust the precision in the fly when needed, e.g. while
moving guides or when toggling hard-edge on paint tools. Also pass
an appropriate precision to gimp_tool_push_status_coords(), which
is not always the tool's precision as used for cursor display.
svn path=/trunk/; revision=26681
2008-03-30 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-cursor.[ch]: added new function
gimp_display_shell_unset_cursor().
(gimp_display_shell_real_set_cursor): deal with cursor_type -1
and
change the cursor to the default desktop cursor. Fixes warnings
on
image load.
* app/display/gimpdisplayshell.c (gimp_display_shell_empty):
use gimp_display_shell_unset_cursor().
svn path=/trunk/; revision=25312
2008-03-18 Michael Natterer <mitch@gimp.org>
First draft of the "no image open" window, which is implemented as
a display without image (a view with NULL model). Didn't change
the display's appearance yet so I can first make sure the display
without image works properly in all details before hiding these
details.
* app/core/gimp-gui.[ch]: add "gimp" parameter to display_create()
and allow "image" to be NULL.
* app/core/gimpcontext.c (gimp_context_real_set_display): a
display's image can be NULL now.
* app/display/gimpdisplay.[ch]: add Gimp and GimpDisplayConfig
members. Add Gimp parameter to gimp_display_shell_new(). Changed
gimp_display_reconnect() to gimp_display_set_image() and allow to
set a NULL image.
* app/gui/gui-vtable.c (gui_display_create): if there is a single
display without an image, call gimp_display_set_image() on that
display instead of creating a new one.
* app/display/gimpdisplayshell-close.c: if the last display is
closed, don't close it but make it empty. Factored out that code
to gimp_display_shell_really_close().
* app/display/gimpdisplayshell-dnd.c: when dropping uris on an
empty display, open the first one into that display and the other
ones as layers of the newly opened image. This is consistent with
dropping on an existing image but maybe needs some discussion.
* app/display/gimpdisplayshell-callbacks.c: bail out early in the
tool event callback so tools never have to deal with empty
displays. In expose(), draw the drop zone on the empty display.
* app/display/gimpdisplayshell-title.c: set the empty display's
title to "Gimp - Drop Files".
* app/display/gimpdisplay-foreach.c
* app/display/gimpdisplay-handlers.c
* app/display/gimpdisplayshell-appearance.c
* app/display/gimpdisplayshell-autoscroll.c
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell-cursor.c
* app/display/gimpdisplayshell-dnd.c
* app/display/gimpdisplayshell-draw.c
* app/display/gimpdisplayshell-filter-dialog.c
* app/display/gimpdisplayshell-handlers.c
* app/display/gimpdisplayshell-layer-select.c
* app/display/gimpdisplayshell-preview.c
* app/display/gimpdisplayshell-render.c
* app/display/gimpdisplayshell-scale.c
* app/display/gimpdisplayshell-scroll.c
* app/display/gimpdisplayshell-selection.c
* app/display/gimpdisplayshell-title.c
* app/display/gimpdisplayshell.c
* app/display/gimpnavigationeditor.c
* app/display/gimpstatusbar.c: use display->gimp and
display->config instead of going via the image. Guard against
empty displays in some few places (most places can't be
called). Where needed, use the canvas' dimensions instead of the
image's dimensions so scroll offsets and scrollbars still have
sane values instead of the last image's ones.
* app/actions/actions.c (action_data_get_gimp)
(action_data_get_context): use display->gimp instead of
display->image->gimp.
* app/actions/edit-commands.c (edit_paste_cmd_callback): redirect
to "paste as new" if there is an empty display.
* app/actions/tools-commands.c (tools_select_cmd_callback): don't
initialize the new tool on an empty display.
* app/actions/view-actions.c (view_actions_update): changed lots
of sensitivity settings to be insensitive when there is no image
(instead of no display).
* app/actions/view-commands.c: use the display's config object
instead of gimp's.
svn path=/trunk/; revision=25113
2007-03-20 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcursorview.[ch] (gimp_color_frame_update_cursor):
disallow passing a NULL image.
(gimp_color_frame_clear_cursor): new function that clears the
cursor view.
* app/widgets/gimpcolorframe.c (gimp_color_frame_update): if
color_frame->sample_valid is FALSE, don't do any color
transformations and don't construct any string because none
of them is going to be used (all labels will show "n/a").
* app/display/gimpstatusbar.[ch]: renamed set_cursor() API
to update_cursor().
* app/display/gimpdisplayshell-cursor.c
(gimp_display_shell_update_cursor): move variables to local
scopes. Follow GimpStatusbar API change. Cleanup.
(gimp_display_shell_clear_cursor): ditto. Follow GimpColorFrame
API change.
svn path=/trunk/; revision=22153
2006-06-02 Michael Natterer <mitch@gimp.org>
* cursors/Makefile.am
* cursors/cursor-corner-bottom-left.png
* cursors/cursor-corner-bottom-right.png
* cursors/cursor-corner-top-left.png
* cursors/cursor-corner-top-right.png
* cursors/cursor-side-bottom.png
* cursors/cursor-side-left.png
* cursors/cursor-side-right.png
* cursors/cursor-side-top.png
* cursors/xbm/cursor-corner-bottom-left-mask.xbm
* cursors/xbm/cursor-corner-bottom-left.xbm
* cursors/xbm/cursor-corner-bottom-right-mask.xbm
* cursors/xbm/cursor-corner-bottom-right.xbm
* cursors/xbm/cursor-corner-top-left-mask.xbm
* cursors/xbm/cursor-corner-top-left.xbm
* cursors/xbm/cursor-corner-top-right-mask.xbm
* cursors/xbm/cursor-corner-top-right.xbm
* cursors/xbm/cursor-side-bottom-mask.xbm
* cursors/xbm/cursor-side-bottom.xbm
* cursors/xbm/cursor-side-left-mask.xbm
* cursors/xbm/cursor-side-left.xbm
* cursors/xbm/cursor-side-right-mask.xbm
* cursors/xbm/cursor-side-right.xbm
* cursors/xbm/cursor-side-top-mask.xbm
* cursors/xbm/cursor-side-top.xbm: new cursors for edge and corner
resizing. They perfectly align with the small crosshair and can be
used together with tool cursors and cursor modifiers.
* cursors/gimp-tool-cursors.xcf: add them here too.
* app/widgets/widgets-enums.h: add them to the GimpCursorType enum.
* app/widgets/gimpcursor.c: add them here too.
* app/display/gimpdisplayshell-cursor.c: treat them like the small
crosshair (don't replace them by the small crosshair but use them
as-is). Also allow the bad modifier with the large crosshair.
* app/tools/gimprectangletool.c
(gimp_rectangle_tool_cursor_update): use the new cursors. Don't
call gimp_tool_set_cursor() here.
(gimp_rectangle_tool_response): reset "function" to RECT_CREATING
when resetting the tool.
* app/tools/gimpselectiontool.[ch] (struct GimpSelectionTool):
added boolean member "allow_move" which defalts to TRUE.
(gimp_selection_tool_oper_update): don't move masks, floating
selections or anything when "allow_move" is FALSE. Changed
behavior of click inside a selection to simply create a new
selection, need to press alt+shift now to drag-float the
selection. Please test this, it's apretty fundamental change!
(gimp_selection_tool_cursor_update): use the tool's configured
cursor instead of always GIMP_CURSOR_MOUSE, so this function can
be called after gimp_rectangle_tool_cursor_update() to add the
plus, minus etc. modifiers.
* app/tools/gimpnewrectselecttool.c: implement
GimpTool::cursor_update() and call
gimp_rectangle_tool_cursor_update() from there. Chain up to get
the plus, minus etc. modifiers added.
Re-enble selection moving:
(gimp_new_rect_select_tool_oper_update): set GimpSelectionTool's
"allow_move" to FALSE unless the rectangle tool is in an idle
state.
(gimp_new_rect_select_tool_button_press): allow a selection moving
to be started if the rectangle tool is idle. Fall back to starting
a rect select if gimp_selection_tool_start_edit() returned FALSE.
2005-04-05 Michael Natterer <mitch@gimp.org>
* app/dialogs/Makefile.am
* app/dialogs/info-window.[ch]: removed.
* app/actions/view-actions.c
* app/actions/view-commands.[ch]
* menus/image-menu.xml.in: removed its action and menu stuff.
* app/display/gimpdisplayshell-cursor.c
* app/display/gimpdisplayshell-title.c
* app/display/gimpdisplayshell.[ch]: removed info window stuff.
This was the last display -> dialogs dependency.
* app/dialogs/dialogs.c: added ugly hack that references
info_dialog. Otherwise the still existing tools -> dialogs
dependency breaks the build.
2005-04-03 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage.[ch]: added new signals "sample-point-added"
and "sample-point-removed" and public functions to emit them.
* app/core/gimpimage-sample-points.c (gimp_image_add_sample_point)
(gimp_image_remove_sample_point): emit them accordingly.
* app/core/gimpimage-undo-push.c (undo_pop_image_sample_point):
ditto.
(undo_pop_image_guide)
(undo_pop_image_sample_point): added comments why we add/remove
stuff manually instead of using the GimpImage APIs.
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpcursorview.[ch]
* app/widgets/gimpsamplepointeditor.[ch]: new widgets.
GimpCursorView is a replacement for the info window's "Cursor"
page, GimpSamplePointEditor is a view on an image's sample points.
The sample point editor does nothing yet except keeping a 2x2 grid
of GimpColorFrames. Addresses bug #137776.
* app/dialogs/dialogs.c
* app/dialogs/dialogs-constructors.[ch]: register the new widgets
as dockable dialogs.
* app/actions/dialogs-actions.c (dialogs_dockable_actions)
* menus/dialogs-menuitems.xml: added actions and menu items for
the new dialogs.
* app/display/gimpdisplayshell-cursor.c
(gimp_display_shell_update_cursor)
(gimp_display_shell_clear_cursor): update the new cursor view.
* app/widgets/gimphelp-ids.h: help IDs for the new dialogs.
* app/widgets/widgets-enums.[ch] (enum GimpColorFrameMode):
changed description "Pixel values" to "Pixel" because the former
was too long.
2004-10-12 Sven Neumann <sven@gimp.org>
* app/dialogs/info-window.[ch]: fixed unit handling. Right-align
the labels displaying the cursor position. Renamed the "Extended"
tab to "Cursor". Renamed the API accordingly.
* app/display/gimpdisplayshell-cursor.c: changed accordingly.
2004-06-14 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell.[ch]: remember the last used
GimpCursorFormat so changing the format in prefs applies
instantly, and not after the next tool change.
* app/display/gimpdisplayshell-cursor.[ch]
* app/tools/gimptool.[ch]
* app/tools/gimptoolcontrol.[ch]
* app/tools/gimpclonetool.c
* app/tools/gimpcolortool.c
* app/tools/gimpcroptool.c
* app/tools/gimpcurvestool.c
* app/tools/gimpiscissorstool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimpmovetool.c
* app/tools/gimptransformtool.c: s/GdkCursorType/GimpCursorType/g
2004-06-13 Michael Natterer <mitch@gimp.org>
* app/widgets/widgets-enums.[ch]: added enum GimpCursorFormat
which can be one of { BITMAP, PIXBUF, PIXBUF-PREMULTIPLY } to
work around broken X servers.
* app/config/gimpguiconfig.[ch]
* app/config/gimprc-blurbs.h: added GimpGuiConfig::cursor-format.
* app/gui/preferences-dialog.c: added a GUI for the new option.
* app/widgets/gimpcursor.[ch]: added cursor_format parameter
to gimp_cursor_new() and _set().
* app/display/gimpdisplayshell-cursor.c
* app/tools/gimpcurvestool.c
* app/widgets/gimpdialogfactory.c: pass an appropriate cursor_mode.
2004-06-05 Michael Natterer <mitch@gimp.org>
* cursors/Makefile.am
* cursors/cursor-none.png
* cursors/xbm/cursor-none.xbm: new empty cursor images.
* app/config/gimpdisplayconfig.[ch]
* app/config/gimprc-blurbs.h
* app/widgets/widgets-enums.h
* app/widgets/gimpcursor.c
* app/display/gimpdisplayshell-cursor.c
* app/tools/gimppainttool.[ch]
* app/tools/gimpinktool.c
* app/gui/preferences-dialog.c: applied patches from Philip
Lafleur which implement hiding the cursor completely for paint
tools. Changed the name of the config option from
"hide-paint-tool-cursor" to "show-paint-tool-cursor" and default
to TRUE because this needs the brush outline being visible while
painting to be really usable. Fixes bug #132163.
* app/widgets/widgets-enums.h: renamed all GimpCursorType and
GimpToolCursorType enum values to GIMP_CURSOR_* and
GIMP_TOOL_CURSOR_*.
* app/widgets/gimpcursor.c
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell-cursor.c
* app/tools/gimp*tool.c; changed accordingly.
2004-05-10 Sven Neumann <sven@gimp.org>
* app/actions/view-actions.c: added a stock icon for "view-zoom-1-1".
* app/widgets/gimpunitcombobox.[ch]: added functions to get and
set the active unit.
* app/widgets/gimpunitstore.c (gimp_unit_store_tree_model_get_value):
need to special case GIMP_UNIT_PIXEL.
* app/display/Makefile.am
* app/display/display-types.h
* app/display/gimpscalecombobox.[ch]: new widget to be used in the
display's statusbar.
* app/display/gimpdisplayshell-cursor.[ch]: always display the
cursor position, not only if the cursor is inside the image. Added
new function gimp_display_shell_clear_cursor() to clear the cursor
label.
* app/display/gimpdisplayshell-callbacks.c: changed accordingly.
* app/display/gimpstatusbar.[ch]
* app/display/gimpdisplayshell.c
* app/display/gimpdisplayshell-handlers.c
* app/display/gimpdisplayshell-scale.c: do not explicitely resize
the statusbar cursor label, connect to GimpDisplayShell::scaled
instead. Added a GimpScaleComboBox to the status bar.
2004-02-23 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-snap.[ch]: return the snapped coordinates as
gdouble, not gint because we must not round the unsnapped axis
if only one axis snapped.
* app/display/gimpdisplayshell.[ch] (gimp_display_shell_snap_coords):
changed accordingly. Added boolean return value indicating "snapped".
* app/display/gimpdisplayshell-cursor.[ch]
(gimp_display_shell_update_cursor): take both display_x and _x and
(possibly snapped) image_x and _y. Use the snapped values for the
statusbar and the unsnapped ones for updating the info_window.
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_canvas_tool_events): applied modified patch
from Simon Budig which moves guide/grid snapping out of the
button_press/motion/button_release handlers and *always* snaps
the image_coords if the active_tool wants them to be snapped.
Makes sure that e.g. the brush preview is drawn at the right
place and fixes bug #134284.
Also pass both display_coords and image_coords to
gimp_display_shell_update_cursor().
2003-11-01 Sven Neumann <sven@gimp.org>
* app/widgets/gimpcursor.[ch] (gimp_cursor_new): added a
GdkDisplay parameter and added the convenience function
gimp_cursor_set().
* app/display/gimpdisplayshell-cursor.c
* app/tools/gimpcurvestool.c
* app/widgets/gimpdialogfactory.c: changed accordingly.