Commit Graph

445 Commits

Author SHA1 Message Date
Michael Natterer f8e5aa31bd Never shrink the empty display when filling it, only grow:
2008-03-23  Michael Natterer  <mitch@gimp.org>

	Never shrink the empty display when filling it, only grow:

	* app/display/gimpdisplayshell.[ch]
	* app/display/gimpdisplayshell-scale.[ch]: add "gboolean
	grow_only" parameters to shrink_wrap() APIs which restricts
	resizing of the window to growing.

	* app/display/gimpdisplayshell-scale.[ch]
	(gimp_displaY_shell_scale_resize): remove boolean "redisplay"
	parameter because is was always passed as TRUE. Add boolean
	"grow_only" instead and pass it on to shrink_wrap()

	* app/actions/view-commands.c
	* app/display/gimpdisplayshell-handlers.c: pass grow_only = FALSE.

	* app/display/gimpdisplayshell.c (gimp_display_shell_idle_fill):
	pass grow_only = TRUE.


svn path=/trunk/; revision=25178
2008-03-23 15:16:44 +00:00
Michael Natterer 54d306e8ea added a dialog factory for displays and register "gimp-no-image-window"
2008-03-23  Michael Natterer  <mitch@gimp.org>

	* app/dialogs/dialogs.[ch]: added a dialog factory for displays
	and register "gimp-no-image-window" with it.

	* app/display/gimpdisplay.[ch]: add a GimpDialogFactory parameter
	to gimp_display_new() and pass it on to gimp_display_shell_new().

	* app/display/gimpdisplayshell.[ch]: keep the passed
	GimpDialogFactory around. When the shell becomes empty, add it to
	the dialog factory and resize it to the remembered size; when it
	becomes non-empty, remove it from the dialog factory again.

	* app/gui/gui-vtable.c: pass the display dialog factory to
	gimp_display_new().


svn path=/trunk/; revision=25177
2008-03-23 13:40:39 +00:00
Sven Neumann 15c7937fc3 moved defines to the header file and changed to 640x400 which is actually
2008-03-21  Sven Neumann  <sven@gimp.org>

	* app/core/gimptemplate.[ch]: moved defines to the header file 
and
	changed to 640x400 which is actually almost the golden mean as
	claimed by the comment.

	* app/display/gimpdisplayshell.c: use the defines here.


svn path=/trunk/; revision=25165
2008-03-21 22:09:23 +00:00
Sven Neumann 81521fde6c gtk_window_present() the image window to make sure that images aren't
2008-03-21  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell.c (gimp_display_shell_fill_idle):
	gtk_window_present() the image window to make sure that images
	aren't opened into a minimized image window.


svn path=/trunk/; revision=25161
2008-03-21 21:15:21 +00:00
Sven Neumann 2b43fd7535 create the empty display before the other windows.
2008-03-20  Sven Neumann  <sven@gimp.org>

	* app/gui/gui.c (gui_restore_after_callback): create the empty
	display before the other windows.

	* app/display/gimpdisplayshell.c (gimp_display_shell_new): center
	the empty window and create additional image windows under the
	mouse cursor. Just an experiment ...

svn path=/trunk/; revision=25143
2008-03-20 15:22:57 +00:00
Michael Natterer b0bcb37eb8 make it work when called with display->image == NULL. Use a randomly
2008-03-20  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell.c (gimp_display_shell_new): make it
	work when called with display->image == NULL. Use a randomly
	picked canvas size for now, more later.

	(gimp_display_shell_fill): add missing call to
	gimp_display_shell_scale_changed().

	* app/gui/gui.c (gui_restore_after_callback): create an empty
	display.


svn path=/trunk/; revision=25141
2008-03-20 13:27:49 +00:00
Michael Natterer 4aa6416c72 shrink-wrap the newly filled empty display in an idle function.
2008-03-20  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell.[ch]: shrink-wrap the newly filled
	empty display in an idle function.


svn path=/trunk/; revision=25138
2008-03-20 10:37:43 +00:00
Michael Natterer 993f0be3ab use the desktop default cursor for the empty display.
2008-03-19  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell.c (gimp_display_shell_empty): use
	the desktop default cursor for the empty display.


svn path=/trunk/; revision=25134
2008-03-19 22:25:21 +00:00
Michael Natterer ca99b0724c the code to reset the cursor got lost when introducing this function.
2008-03-19  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell.c (gimp_display_shell_empty): the
	code to reset the cursor got lost when introducing this function.

	* app/display/gimpdisplayshell-dnd.c
	(gimp_display_shell_dnd_init): remove redundant casts.


svn path=/trunk/; revision=25133
2008-03-19 22:18:54 +00:00
Sven Neumann 1c0466dabc return FALSE so that the default drag highlighting works.
2008-03-19  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-callbacks.c
	(gimp_display_shell_canvas_expose): return FALSE so that the
	default drag highlighting works.

	* app/display/gimpdisplayshell-dnd.c: only set the canvas as 
drop
	target, not the whole shell.

	* app/display/gimpdisplayshell.c: delay the call to
	gimp_display_shell_dnd_init() until after the canvas has been
	created.


svn path=/trunk/; revision=25127
2008-03-19 19:10:00 +00:00
Sven Neumann e81f857482 app/display/gimpdisplayshell.c app/display/gimpdisplayshell-title.c
2008-03-19  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell.c
	* app/display/gimpdisplayshell-title.c
	* app/display/gimpstatusbar.[ch]: hide/show the cursor label and
	the unit and scale combo-boxes.

svn path=/trunk/; revision=25125
2008-03-19 16:54:01 +00:00
Michael Natterer a098b12f55 add gimp_display_empty()/fill() which turns it into an empty display and
2008-03-19  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplay.[ch]: add gimp_display_empty()/fill()
	which turns it into an empty display and back.

	* app/display/gimpdisplayshell.[ch]: add same api here.

	* app/display/gimpdisplayshell-close.c
	* app/gui/gui-vtable.c: use the new functions instead of having
	the code here.

	* app/display/gimpdisplayshell-selection.c
	(gimp_display_shell_selection_control): stop the timeout and free
	the segments when this function is called on an empty display.


svn path=/trunk/; revision=25124
2008-03-19 16:15:50 +00:00
Sven Neumann b7de914284 app/display/gimpdisplayshell.[ch] moved
2008-03-19  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell.[ch]
	* app/display/gimpdisplayshell-scale.[ch]: moved
	gimp_display_shell_set_initial_scale() to gimpdisplayshell-scale.c.

	* app/display/gimpdisplayoptions.c: reverted last change, we want
	to keep the status-bar around.

svn path=/trunk/; revision=25119
2008-03-19 09:57:22 +00:00
Michael Natterer 2621b4d250 factored out this function which calculates the zoom factor for new
2008-03-19  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell.[ch]
	(gimp_display_shell_set_initial_scale): factored out this function
	which calculates the zoom factor for new images. Also returns the
	size of the canvas for that zoom factor.

	* app/gui/gui-vtable.c (gui_display_create): use it to set the
	initial scale of images loaded into the empty display, but don't
	set the display's size yet.


svn path=/trunk/; revision=25118
2008-03-19 09:48:07 +00:00
Sven Neumann ebdd875ce7 deal with NULL image and unset the icon.
2008-03-19  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell.c (gimp_display_shell_update_icon):
	deal with NULL image and unset the icon.

	* app/display/gimpdisplay.c (gimp_display_set_image): unset the
	icon when no image is set.

	* app/display/gimpdisplayshell-title.c
	(gimp_display_shell_format_title): use GIMP_NAME as the window
	title when no image is set. Append GIMP_ACRONYM otherwise.

svn path=/trunk/; revision=25115
2008-03-19 09:11:04 +00:00
Michael Natterer bd636468e8 add new options object for the "no image" display appearance.
2008-03-18  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayoptions.[ch]: add new options object
	for the "no image" display appearance.

	* app/display/gimpdisplayshell.[ch]: keep one of them around.

	* app/display/gimpdisplayshell-appearance.[ch]: use the options
	object when the display is empty. Add guards against no image
	to some functions. Add gimp_display_shell_appearance_update()
	which sets all options according to the current display state
	(normal, fullscreen, no image).

	* app/actions/view-actions.c: don't allow to configure the GUI
	of the empty display.

	* app/display/gimpdisplayshell-callbacks.c: use the new appearance
	update function instead of doing it all here.

	* app/display/gimpdisplayshell-close.c
	* app/gui/gui-vtable.c: update the appearance when clearing or
	filling the display.

	* app/display/gimpdisplayshell-selection.c: forgot some guards
	against empty displays.


svn path=/trunk/; revision=25114
2008-03-18 22:21:47 +00:00
Michael Natterer cee3baea0f First draft of the "no image open" window, which is implemented as a
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
2008-03-18 21:22:21 +00:00
Michael Natterer e2f6294c07 add gimp_canvas_draw_drop_zone() which simply renders a big "Drop Here" on
2008-03-18  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpcanvas.[ch]: add gimp_canvas_draw_drop_zone()
	which simply renders a big "Drop Here" on the canvas. Replaced
	Gimp member and construct property by GimpDisplayConfig.

	* app/display/gimpdisplayshell.c (gimp_display_shell_new): changed
	accordingly.


svn path=/trunk/; revision=25112
2008-03-18 20:24:49 +00:00
Sven Neumann 8c30b1cda5 removed redundant GimpCoords parameter that use to cause valgrind warnings
2008-01-28  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell.[ch] (gimp_display_shell_snap_coords):
	removed redundant GimpCoords parameter that use to cause valgrind
	warnings about overlapping memory regions in memcpy().

	* app/display/gimpdisplayshell-callbacks.c
	* app/display/gimpdisplayshell-autoscroll.c: changed accordingly.

svn path=/trunk/; revision=24730
2008-01-28 16:00:30 +00:00
Simon Budig 25aec86548 don't use ceil, use SCALEX. Round hopefully more properly.
2007-12-29  Simon Budig  <simon@gimp.org>

        * app/display/gimpdisplayshell.c: don't use ceil, use SCALEX.
	* app/display/gimpdisplayshell-transform.c: Round hopefully more
	properly.

	This probably exchanges one set of artefacts for another one...

	* app/display/gimpdisplayshell-render.c: minor fixes.
	* app/display/gimpdisplayshell-selection.c: whitespace fix


svn path=/trunk/; revision=24457
2007-12-28 23:13:46 +00:00
Sven Neumann 3d48f1bcc9 removed GIMP_RENDER_BUF_WIDTH and GIMP_RENDER_BUF_HEIGHT definitions.
2007-12-28  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimprender.h: removed GIMP_RENDER_BUF_WIDTH and
	GIMP_RENDER_BUF_HEIGHT definitions.

	* app/display/gimpdisplayshell.h: define the size of the display
	render buffer here.

	* app/display/gimpdisplayshell.c
	* app/display/gimpdisplayshell-draw.c
	* app/widgets/gimprender.c: changed accordingly.


svn path=/trunk/; revision=24456
2007-12-28 22:12:17 +00:00
Michael Natterer 1e8371361e app/actions/image-commands.c app/actions/select-commands.c
2007-12-26  Michael Natterer  <mitch@gimp.org>

	* app/actions/image-commands.c
	* app/actions/select-commands.c
	* app/core/gimp-edit.c
	* app/core/gimpdrawable-stroke.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-preview.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimageundo.c
	* app/core/gimpitem-preview.c
	* app/dialogs/grid-dialog.c
	* app/dialogs/layer-options-dialog.c
	* app/dialogs/offset-dialog.c
	* app/dialogs/stroke-dialog.c
	* app/display/gimpdisplayshell-scale.c
	* app/display/gimpdisplayshell-title.c
	* app/display/gimpdisplayshell.c
	* app/display/gimpstatusbar.c
	* app/paint/gimppaintoptions.c
	* app/tools/gimpmagnifytool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimppainttool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimpscaletool.c
	* app/tools/gimptexttool.c
	* app/vectors/gimpvectors-export.c
	* app/vectors/gimpvectors-import.c
	* app/widgets/gimpcursorview.c
	* app/widgets/gimpimagepropview.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/widgets/gimpviewrendererimage.c
	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c: use gimp_image_get/set_resolution() instead
	of accessing the GimpImage members directly.


svn path=/trunk/; revision=24436
2007-12-26 17:33:41 +00:00
Michael Natterer 6074f7e248 app/core/gimpimage-guides.[ch] add accessors for the lists of guides and
2007-12-25  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage-guides.[ch]
	* app/core/gimpimage-sample-points.[ch]: add accessors for the lists
	of guides and sample points.

	* app/core/gimpimage-crop.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-flip.c
	* app/core/gimpimage-resize.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage-snap.c
	* app/core/gimpimage.c
	* app/display/gimpdisplayshell-appearance.c
	* app/display/gimpdisplayshell-draw.c
	* app/display/gimpdisplayshell.c
	* app/widgets/gimpsamplepointeditor.c
	* app/xcf/xcf-save.c: use the new accessors.


svn path=/trunk/; revision=24434
2007-12-25 17:09:04 +00:00
Michael Natterer 75061fccfd app/actions/channels-commands.c app/actions/colormap-actions.c
2007-12-25  Michael Natterer  <mitch@gimp.org>

	* app/actions/channels-commands.c
	* app/actions/colormap-actions.c
	* app/actions/colormap-commands.c
	* app/actions/image-commands.c
	* app/core/gimp-edit.c
	* app/core/gimpdrawable-preview.c
	* app/core/gimpimage-colorhash.c
	* app/core/gimpimage-colormap.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-flip.c
	* app/core/gimpimage-guides.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-preview.c
	* app/core/gimpimage-quick-mask.c
	* app/core/gimpimage-resize.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimage-sample-points.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage-snap.c
	* app/core/gimpimage.c
	* app/core/gimpimagefile.c
	* app/core/gimpimageundo.c
	* app/core/gimpitem-preview.c
	* app/core/gimpitem.c
	* app/core/gimplayer.c
	* app/core/gimppalette-import.c
	* app/core/gimpprojection-construct.c
	* app/core/gimpprojection.c
	* app/core/gimpselection.c
	* app/core/gimpundo.c
	* app/dialogs/layer-options-dialog.c
	* app/dialogs/print-size-dialog.c
	* app/display/gimpdisplay.c
	* app/display/gimpdisplayshell-draw.c
	* app/display/gimpdisplayshell-scale.c
	* app/display/gimpdisplayshell-scroll.c
	* app/display/gimpdisplayshell-title.c
	* app/display/gimpdisplayshell-transform.c
	* app/display/gimpdisplayshell.c
	* app/display/gimpstatusbar.c
	* app/file/file-open.c
	* app/paint/gimppaintoptions.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpcolortool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimpperspectiveclonetool.c
	* app/tools/gimprectangleselecttool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimprotatetool.c
	* app/vectors/gimpvectors-export.c
	* app/vectors/gimpvectors-import.c
	* app/vectors/gimpvectors.c
	* app/widgets/gimpimagepropview.c
	* app/widgets/gimpnavigationview.c
	* app/widgets/gimpselectioneditor.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/widgets/gimpviewrendererimage.c
	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/guides.pdb
	* tools/pdbgen/pdb/image.pdb: use accessors for many image properties.

	* app/pdb/guides_cmds.c
	* app/pdb/image_cmds.c: regenerated.


svn path=/trunk/; revision=24432
2007-12-25 16:21:40 +00:00
Michael Natterer 53b92957f6 don't crash if gimp_display_shell_filter_new() returns NULL. Fixes bug
2007-11-12  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell.c (gimp_display_shell_new): don't
	crash if gimp_display_shell_filter_new() returns NULL.
	Fixes bug #495863.


svn path=/trunk/; revision=24128
2007-11-12 09:36:45 +00:00
Sven Neumann 3d0b3e0759 don't directly pass a message to gimp_statusbar_push(), it expects a
2007-11-08  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell.c 
(gimp_display_shell_show_tooltip):
	don't directly pass a message to gimp_statusbar_push(), it 
expects
	a format string and printf-like varargs. Fixes the crash 
reported
	in bug #492718.


svn path=/trunk/; revision=24088
2007-11-08 17:36:37 +00:00
Sven Neumann 38f72c00ac removed level from GimpDisplayShell struct.
2007-10-08  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell.[ch]: removed level from
	GimpDisplayShell struct.

	* app/display/gimpdisplayshell-render.c: fixed rendering of the 
mask.
	Closes bug #448417 again.


svn path=/trunk/; revision=23767
2007-10-08 19:53:43 +00:00
Simon Budig 682695a80d app/display/gimpdisplayshell.[ch] 64bittified the code so that the new
2007-09-30  Simon Budig  <simon@gimp.org>

	* app/display/gimpdisplayshell.[ch]
	* app/display/gimpdisplayshell-render.c: 64bittified the code so
	  that the new renderer also works for big images. Slightly
	  reorganized.

	* app/display/gimpdisplayshell-transform.c: Another go at
	  bug #474509. This even might be fixed now...


svn path=/trunk/; revision=23698
2007-09-30 17:24:47 +00:00
Michael Natterer c3f89cc7f0 Bring back our menus when building on OS X but not against the quartz GDK
2007-09-12  Michael Natterer  <mitch@gimp.org>

	Bring back our menus when building on OS X but not against the
	quartz GDK backend:

	* configure.in: added conditional HAVE_GDK_QUARTZ.

	* menus/Makefile.am: use it when moving the help menu around.

	* app/dialogs/preferences-dialog.c
	* app/display/gimpdisplayshell.c
	* app/gui/gtk-macmenu.c
	* app/gui/gui.c
	* app/widgets/gimptoolbox.c: use #ifdef GDK_WINDOWING_QUARTZ
	instead of #ifdef HAVE_CARBON when enabling the global menubar.


svn path=/trunk/; revision=23512
2007-09-12 16:26:04 +00:00
Michael Natterer 3736ea8284 First version of global menubar support for OSX. Work in progress.
2007-08-30  Michael Natterer  <mitch@gimp.org>

	First version of global menubar support for OSX. Work in progress.

	* app/gui/Makefile.am
	* app/gui/sync-menu.[ch]: new files containing code that takes
	a GtkMenuShell and proxies it in the OSX global menubar. Taken
	from http://developer.imendio.com/projects/gtk-macosx/menubar

	* app/gui/gui.c: put the global image popup menu to the menubar.

	* app/dialogs/preferences-dialog.c
	* app/display/gimpdisplayshell.c
	* app/widgets/gimptoolbox.c: #ifdef out all menubars in windows.

	* app/Makefile.am (AM_LDFLAGS): add $(CARBON_LDFLAGS)


svn path=/trunk/; revision=23408
2007-08-30 11:19:00 +00:00
Michael Natterer b0cd81cde7 don't use g_slice_dup(), that's in GLib 2.14 only.
2007-08-24  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell.c: don't use g_slice_dup(), that's
	in GLib 2.14 only.


svn path=/trunk/; revision=23366
2007-08-24 16:46:34 +00:00
Michael Natterer 29759cd892 allocate shell->highlight with GSlice.
2007-08-24  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell.c: allocate shell->highlight with
	GSlice.


svn path=/trunk/; revision=23364
2007-08-24 16:07:44 +00:00
Sven Neumann 5bb8cc59cb fixed reference count of the display filter stack.
2007-08-08  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell.c (gimp_display_shell_new): fixed
	reference count of the display filter stack.

svn path=/trunk/; revision=23142
2007-08-08 07:48:11 +00:00
Sven Neumann a737408eeb added GimpColorConfig and GimpColorManaged as construct-only properties.
2007-08-06  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpcolordisplay.[ch]: added GimpColorConfig 
and
	GimpColorManaged as construct-only properties.
	Deprecated gimp_color_display_new().

	* libgimpwidgets/gimpwidgets.def: updated for new symbols.

	* app/widgets/gimpcolordisplayeditor.c: use g_object_new() 
instead
	of gimp_color_display_new().

	* modules/cdisplay_lcms.c: use the image's embedded color 
profile
	for the display filter. Assume sRGB if no monitor profile is
	configured.

	* app/display/gimpdisplayshell.c: 
	* app/display/gimpdisplayshell-filter.[ch]: pass the display as
	color-managed object to the display filter.


svn path=/trunk/; revision=23127
2007-08-06 22:10:09 +00:00
Sven Neumann 2195c84297 added missing static qualifier.
2007-08-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.c: added missing static qualifier.

	* app/display/gimpdisplayshell.c
	* app/display/gimpdisplayshell-handlers.c: implement the
	GimpColorManaged interface and delegate it to GimpImage.


svn path=/trunk/; revision=23126
2007-08-06 19:23:22 +00:00
Sven Neumann 9ae026c39e Make XOR color configurable (bug #421466):
2007-03-23  Sven Neumann  <sven@gimp.org>

	Make XOR color configurable (bug #421466):

	* app/config/gimprc-blurbs.h
	* app/config/gimpdisplayconfig.[ch]: added gimprc option for the
	XOR color.

	* app/display/gimpcanvas.[ch]: keep a reference to the Gimp object
	and take the XOR color from GimpDisplayConfig.

	* app/display/gimpdisplayshell.c: pass gimp to gimp_canvas_new().

svn path=/trunk/; revision=22164
2007-03-23 09:25:28 +00:00
Sven Neumann 09c39298e4 don't call gimp_zoom_model_zoom() before assigning shell->display. Fixes
2007-03-21  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell.c (gimp_display_shell_new): don't
	call gimp_zoom_model_zoom() before assigning shell->display. Fixes
	bug #421044.


svn path=/trunk/; revision=22158
2007-03-21 16:34:10 +00:00
Sven Neumann b95ead41e3 renamed newly added members to scale_x and scale_y and removed the
2007-03-14  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell.[ch]: renamed newly added members
	to scale_x and scale_y and removed the SCALEFACTOR macros.

	* app/display/gimpdisplayshell-handlers.c
	* app/display/gimpdisplayshell-render.c
	* app/display/gimpdisplayshell-scale.c
	* app/display/gimpdisplayshell-transform.c
	* app/display/gimpnavigationeditor.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimprectangletool.c: changed accordingly.


svn path=/trunk/; revision=22120
2007-03-14 10:26:19 +00:00
Sven Neumann 74927c03a4 cache the display scale factors in the GimpDisplayShell struct and
2007-03-14  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell.[ch]: cache the display scale
	factors in the GimpDisplayShell struct and recalculate it in
	gimp_display_shell_scale_factor_changed().

	* app/display/gimpdisplayshell-scale.c
	(gimp_display_shell_scale_set_dot_for_dot)
	* app/display/gimpdisplayshell-handlers.c
	(gimp_display_shell_resolution_changed_handler)
	(gimp_display_shell_monitor_res_notify_handler): update the scale
	factors by calling gimp_display_shell_scale_factor_changed().

	* app/display/gimpdisplayshell-transform.c
	* app/display/gimpnavigationeditor.c: code cleanup.


svn path=/trunk/; revision=22118
2007-03-14 10:01:08 +00:00
Michael Natterer 83d3a750d4 include "libgimpmath/gimpmathtypes.h" instead of "libgimpmath/gimpmath.h".
2007-03-09  Michael Natterer  <mitch@gimp.org>

	* app/core/core-types.h: include "libgimpmath/gimpmathtypes.h"
	instead of "libgimpmath/gimpmath.h".

	* app/core/gimpbrush.h
	* app/paint/gimppaintcore.h
	* app/paint/gimpperspectiveclone.h
	* app/text/gimptext.h
	* app/tools/gimptransformtool.h: include gimpvector.h and
	gimpmatrix.h explicitely where they are needed in public structs.

	* app/*/*.c
	* tools/pdbgen/pdb/paths.pdb: include "libgimpmath/gimpmath.h"
	where needed.

	* app/pdb/paths_cmds.c: regenerated.


svn path=/trunk/; revision=22084
2007-03-09 13:00:01 +00:00
Sven Neumann f1692ea6fc app/display/gimpdisplayshell.[ch] only change the remembered last scale
2007-03-04  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell.[ch]
	* app/display/gimpdisplayshell-scale.c: only change the 
remembered
	last scale value if the last change occured more than a second 
ago.

	* app/tools/gimprectangletool.c: fixed compiler warnings.


svn path=/trunk/; revision=22040
2007-03-04 10:27:17 +00:00
Sven Neumann ea4ed72e88 app/actions/view-actions.c app/actions/view-commands.[ch]
2007-02-07  Sven Neumann  <sven@gimp.org>

	* app/actions/view-actions.c
	* app/actions/view-commands.[ch]
	* app/display/gimpdisplayshell.[ch]
	* app/display/gimpdisplayshell-scale.[ch]
	* app/widgets/gimphelp-ids.h
	* menus/image-menu.xml.in: applied patch from Robert Helgesson 
that
	adds "Revert Zoom" functionality (bug #338168).


svn path=/trunk/; revision=21855
2007-02-07 08:13:44 +00:00
Michael Natterer 11b1d24ac7 app/core/Makefile.am new files implementing new(), ref() and unref() and
2007-01-30  Michael Natterer  <mitch@gimp.org>

	* app/core/Makefile.am
	* app/core/gimpsamplepoint.[ch]: new files implementing new(),
	ref() and unref() and the new GIMP_TYPE_SAMPLE_TYPE boxed type.

	* app/core/gimpimage-sample-points.[ch]: removed ref() and unref()
	functions here.

	* app/core/gimpimage.c
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-flip.c
	* app/core/gimpimage-resize.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage-undo-push.c
	* app/display/gimpdisplayshell.c
	* app/display/gimpdisplayshell-draw.c
	* app/tools/gimpcolortool.c
	* app/widgets/gimpsamplepointeditor.c
	* app/xcf/xcf-save.c: changed accordingly.

	* app/core/gimpimage-rotate.c (gimp_image_rotate_sample_points):
	added missing call to gimp_image_undo_push_sample_point().


svn path=/trunk/; revision=21812
2007-01-30 10:34:59 +00:00
Sven Neumann ffc8a9fa3a removed button reliefs to reduce visual clutter. Added tooltips to the
2006-12-12  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell.c: removed button reliefs to
reduce
	visual clutter. Added tooltips to the menu and navigation
buttons.
2006-12-12 20:36:35 +00:00
Sven Neumann d0e118dc9c slightly increased size of the quick-mask and zoom-mode buttons. Also
2006-12-12  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell.c (gimp_display_shell_new):
	slightly increased size of the quick-mask and zoom-mode buttons.
	Also changed the style to not displace the icon when the buttons
	are pressed.

	* app/display/gimpdisplayshell.[ch]
	* app/display/gimpdisplayshell-appearance.c: changed "origin_button"
	to "origin". Don't draw it as a button but use an event box just
	like we do for the navigation icon in the lower right corner.

	* app/display/gimpdisplayshell-title.c
	(gimp_display_shell_format_title): use the viewable description
	for the drawable's name. We don't want to see "Qmask" in the
	statusbar.

	* app/widgets/gimpwidgets-utils.c (gimp_button_menu_position): fix
	for the case where button is not really a GtkButton but has it's
	own window.

	* app/widgets/gimphelp-ids.h: changed help ID, removed unused one.

	* libgimpwidgets/gimpstock.c
	* themes/Default/images/Makefile.am
	* themes/Default/images/stock-quick-mask-off-12.png
	* themes/Default/images/stock-quick-mask-off-16.png
	* themes/Default/images/stock-quick-mask-on-12.png
	* themes/Default/images/stock-quick-mask-on-16.png: cropped empty
	space from the quick-mask icon.
2006-12-12 11:20:59 +00:00
Sven Neumann 41237259c9 In all files, changed the standard copyright notice to say "GIMP - The GNU
2006-12-09  Sven Neumann  <sven@gimp.org>

        * In all files, changed the standard copyright notice to say
        "GIMP - The GNU Image Manipulation Program".
2006-12-09 21:33:38 +00:00
Michael Natterer f5afb754a5 Added message severities and make sure all messages are routed through a
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-10-09 08:17:22 +00:00
Sven Neumann e6d34e4f68 added gimp_display_shell_message() and a valist variant and decide here
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 11:16:42 +00:00
Sven Neumann 2426755ba9 added function gimp_get_tool_info().
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-08 13:42:00 +00:00
Sven Neumann c0e4133876 app/display/gimpdisplayshell.c more code cleanup. Monitor the shell's
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 21:11:14 +00:00