Commit Graph

522 Commits

Author SHA1 Message Date
Michael Natterer 6793d68769 Move the menubar and the menubar_manager to GimpImageWindow
Also move some of their related code and update other code to
go via gtk_widget_get_toplevel(), but also add some horrid temp
/* FIXME image window */ hacks.
2009-09-28 22:55:38 +02:00
Michael Natterer 44f9fcbf6f Move the rc style string for the fullscreen menubar to GimpImageWindow 2009-09-28 22:55:37 +02:00
Michael Natterer 1823494122 Keep the main_vbox around in the GimpImageWindow struct (temp hack) 2009-09-28 22:55:37 +02:00
Michael Natterer 90ef404d98 Move more window managing code to GimpImageWindow
Move the code that (de)iconifies the docks together with an empty
image window from GimpDisplayShell to GimpImageWindow.
2009-09-28 22:55:37 +02:00
Michael Natterer be93e6564a Move the fullscreen API from GimpDisplayShell to GimpImageWindow
Also remove GimpDisplayShell's "window_state" member. Use
gtk_widget_get_toplvel() to get to the GimpImageWindow when we need a
display shell's fullscreen state.
2009-09-28 22:55:37 +02:00
Michael Natterer fb046b097d Add GtkWidget::window_state_event() implementation to GimpImageWindow
Keep an own window_state member around and update it accordingly.
Chain up in GimpDisplayShell's window_state_event() impl.
2009-09-28 22:55:36 +02:00
Michael Natterer dc436b6f86 Add menubar_manager member and "menu-factory" construct-only property
Create the menubar_manager when the construct property is set, assert
for its presence in constructor(). Pass the newly required construct
property to g_object_new() in gimp_display_shell_new().
2009-09-28 22:55:35 +02:00
Michael Natterer aad8fbad3e Derive GimpDisplayShell from GimpImageWindow
This is just a refactoring step, later the image window will have one
or many display shells.
2009-09-28 22:55:35 +02:00
Martin Nordholts 8bfcd14f9a app: Add GimpSessionInfo getters and setters 2009-09-20 14:51:03 +02:00
Martin Nordholts cfbcdbd207 app: Add WM debug output 2009-07-20 13:16:30 +02:00
Michael Natterer d93941df7c Bug 563029 - Closing maximized image doesn't restore document window size
(gimp_display_shell_empty): Call gtk_window_unmaximize() before
setting the empty display's size.
2009-06-17 21:29:08 +02:00
Michael Natterer 38e9012023 Bug 575158 – default view prefs should affect no-image window
Add gimp_display_shell_sync_config() which copies the prefs settings
to the display shell and call it from gimp_display_shell_new() and
gimp_display_shell_fill().
2009-06-05 22:21:19 +02:00
Michael Natterer d9448730f9 Bug 555025 – Action GEGL box widgets weirdness
2009-03-28  Michael Natterer  <mitch@gimp.org>

	Bug 555025 – Action GEGL box widgets weirdness

	Must not set GDK_HINT_MIN_SIZE if we don't actually set a minimum
	size, or the window will be shrinkable to zero and it won't
	expand automatically when its contents' requisition grows.

	* app/widgets/gimpdialogfactory.[ch]: add hackish API
	gimp_dialog_factory_set,get_has_min_size() because GTK+ itself
	has no API for querying a window's GdkWindowHints.

	(gimp_dialog_factory_set_user_pos): set GDK_HINT_MIN_SIZE only if
	the window was being marked as having a minimum size using above
	new API.

	* app/widgets/gimptoolbox.c (gimp_toolbox_set_geometry)
	* app/display/gimpdisplayshell.c (gimp_display_shell_style_set):
	call gimp_dialog_factory_set_has_min_size (window, TRUE).


svn path=/trunk/; revision=28224
2009-03-28 13:19:53 +00:00
Michael Natterer d3dcff66f7 app/display/gimpcanvas.c use accessors for various members of GTK+
2009-03-22  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpcanvas.c
	* app/display/gimpdisplayshell.c: use accessors for various
	members of GTK+ structures that don't exist any longer when
	GSEAL_ENABLE is defined.


svn path=/trunk/; revision=28192
2009-03-22 16:03:46 +00:00
Sven Neumann 374e379308 Bug 575006 – Add preferences for snapping
Bug 575006 – Add preferences for snapping

	* app/config/gimpdisplayconfig.[ch]
	* app/config/gimprc-blurbs.h
	* app/display/gimpdisplayshell.c: applied part of a patch from
	Akkana Peck. This adds gimprc properties for the default values
	used for snapping in new image windows. It also changes the
	default value for "Snap to Canvas Edges" to TRUE. Let's test 
this
	for a while...


svn path=/trunk/; revision=28151
2009-03-13 00:24:20 +00:00
Sven Neumann 44b368b1cd Bug 573070 – crash when working with 1x3200 pixel image
2009-03-12  Sven Neumann  <sven@gimp.org>

	Bug 573070 – crash when working with 1x3200 pixel image

	* app/display/gimpdisplayshell.c 
(gimp_display_shell_scale_changed):
	make sure that x_src_dec and y_src_dec never become zero.


svn path=/trunk/; revision=28142
2009-03-12 19:31:36 +00:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
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
2009-01-17 22:28:01 +00:00
Sven Neumann f171d10506 Bug 471344 – Circular brush strokes are not smooth and have corners
2009-01-10  Sven Neumann  <sven@gimp.org>

	Bug 471344 – Circular brush strokes are not smooth and have 
corners

	Bug 127785 – stroking with size linked to pressure sensitivity
	should scale the spacing

	* app/core/gimpcoords-interpolate.[ch]
	* app/display/gimpdisplayshell.[ch]
	* app/display/gimpdisplayshell-callbacks.[ch]
	* app/display/gimpdisplayshell-coords.[ch]: applied patch from
	Alexia Death that introduces a Catmul-Rom splines based event
	interpolation and also adapts the brush spacing to brush size.


svn path=/trunk/; revision=27898
2009-01-10 00:48:30 +00:00
Martin Nordholts 632ab5ed5c Bug 562818 – First image opened in GIMP offset
* app/display/gimpdisplayshell.c (gimp_display_shell_shrink_wrap):
Only rely on disp_width/height for border calculation if they are
larger than 1. If not, special-case the calculation so we don't
get a severly mispositioned image.

svn path=/trunk/; revision=27892
2009-01-04 14:22:31 +00:00
Martin Nordholts 59c9c6d8e8 Rename border_x to border_width and border_y to border_height.
* app/display/gimpdisplayshell.c (gimp_display_shell_shrink_wrap):
Rename border_x to border_width and border_y to border_height.

svn path=/trunk/; revision=27891
2009-01-04 13:36:59 +00:00
Sven Neumann 1ff4b3da7d optimize access to GimpDisplayShell struct members by placing related and
2008-11-16  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell.h: optimize access to
	GimpDisplayShell struct members by placing related and frequently
	accessed members like like scale and offset into the same
	cacheline.

	* app/display/gimpdisplayshell.c (gimp_display_shell_init): resort
	initialization accordingly.


svn path=/trunk/; revision=27668
2008-11-15 23:16:04 +00:00
Michael Natterer fb1660a4ea rename gimp_image_floating_sel() to gimp_image_get_floating_selection().
2008-11-14  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: rename gimp_image_floating_sel() to
	gimp_image_get_floating_selection().

	* app/actions/channels-actions.c
	* app/actions/image-actions.c
	* app/actions/layers-actions.c
	* app/actions/layers-commands.c
	* app/actions/select-actions.c
	* app/core/gimpdrawable.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-quick-mask.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimpselection.c
	* app/display/gimpdisplayshell-layer-select.c
	* app/display/gimpdisplayshell.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpmovetool.c
	* app/tools/gimprectangleselecttool.c
	* app/tools/gimpregionselecttool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimptexttool.c
	* app/widgets/gimpdrawabletreeview.c
	* app/widgets/gimplayertreeview.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/image.pdb: changed accordingly, replaced some
	instances of direct acces by the accessor.

	* app/pdb/image-cmds.c: regenerated.


svn path=/trunk/; revision=27649
2008-11-14 15:01:44 +00:00
Michael Natterer c02822ea05 Bug 559580 – Image windows need better default locations
2008-11-11  Michael Natterer  <mitch@gimp.org>

	Bug 559580 – Image windows need better default locations

	* app/display/gimpdisplayshell.c (gimp_display_shell_style_set):
	Only set GDK_HINT_USER_POS on the empty display because it gets a
	position set by gimp. All other displays should be placed by the
	window manager. Fixes all displays appearing at 0,0.


svn path=/trunk/; revision=27615
2008-11-11 10:12:51 +00:00
Michael Natterer 740ab5e633 renamed gimp_item_width() to gimp_item_get_width() and gimp_item_height()
2008-11-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: renamed
	gimp_item_width() to gimp_item_get_width() and
	gimp_item_height() to gimp_item_get_height().

	* app/actions/channels-commands.c
	* app/actions/drawable-commands.c
	* app/actions/layers-commands.c
	* app/core/<many>.c
	* app/dialogs/offset-dialog.c
	* app/dialogs/resize-dialog.c
	* app/dialogs/scale-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/display/gimpdisplayshell.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpdodgeburn.c
	* app/paint/gimpink.c
	* app/paint/gimppaintcore.c
	* app/paint/gimpsmudge.c
	* app/text/gimptextlayer-xcf.c
	* app/text/gimptextlayer.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimprectangletool.c
	* app/tools/gimpregionselecttool.c
	* app/tools/gimptexttool.c
	* app/vectors/gimpvectors.c
	* app/vectors/gimpvectorsmodundo.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimpviewrendererdrawable.c
	* app/widgets/gimpviewrenderervectors.c
	* app/xcf/xcf-load.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/drawable.pdb: changed accordingly.

	* app/pdb/drawable-cmds.c: regenerated.


svn path=/trunk/; revision=27531
2008-11-03 00:09:01 +00:00
Michael Natterer 5b68a1d0eb renamed gimp_item_offsets() to gimp_item_get_offset() and
2008-11-03  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpitem.[ch]: renamed
	gimp_item_offsets() to gimp_item_get_offset() and
	gimp_item_set_offsets() to gimp_item_set_offset().

	* app/actions/drawable-commands.c
	* app/actions/layers-commands.c
	* app/core/<many>.c
	* app/display/gimpdisplayshell-dnd.c
	* app/display/gimpdisplayshell-preview.c
	* app/display/gimpdisplayshell-transform.c
	* app/display/gimpdisplayshell.c
	* app/paint/gimppaintcore-stroke.c
	* app/paint/gimppaintcore.c
	* app/paint/gimpsourcecore.c
	* app/text/gimptextlayer-xcf.c
	* app/tools/<many>.c
	* app/widgets/gimptoolbox-dnd.c
	* tools/pdbgen/pdb/drawable.pdb
	* tools/pdbgen/pdb/drawable_transform.pdb
	* tools/pdbgen/pdb/selection.pdb
	* tools/pdbgen/pdb/transform_tools.pdb
	* tools/pdbgen/pdb/vectors.pdb: changed accordingly.

	* app/pdb/drawable-cmds.c
	* app/pdb/drawable-transform-cmds.c
	* app/pdb/selection-cmds.c
	* app/pdb/vectors-cmds.c
	* app/pdb/transform-tools-cmds.c: regenerated.


svn path=/trunk/; revision=27529
2008-11-02 23:03:29 +00:00
Sven Neumann bf97ad3102 Bug 556896 – Dialogs don't get minimized with single image window
2008-10-24  Sven Neumann  <sven@gimp.org>

	Bug 556896 – Dialogs don't get minimized with single image 
window

	* app/widgets/gimpdialogfactory.[ch]: renamed the new methods to
	gimp_dialog_factories_{show|hide}_with_display().
	Remember if the dialogs were hidden using
	gimp_dialog_factories_hide_with_display() or using
	gimp_dialog_factories_toggle() and keep this into account when
	making them visible again. This ensures that dialogs that were
	hidden using the Tab key won't be shown when the image window is
	uniconified.

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


svn path=/trunk/; revision=27384
2008-10-24 06:48:56 +00:00
Sven Neumann 45b41a76d1 Bug 556896 – Dialogs don't get minimized with single image window
2008-10-23  Sven Neumann  <sven@gimp.org>

	Bug 556896 – Dialogs don't get minimized with single image 
window

	* app/display/gimpdisplay-foreach.[ch]: added utility function 
to
	get the number of visible (not withdrawn or iconified) displays.

	* app/widgets/gimpdialogfactory.[ch]: added functions to hide 
and
	show the dock windows. Changed gimp_dialog_factories_toggle() to
	use the new functions.

	* app/display/gimpdisplayshell.c
	(gimp_display_shell_window_state_event): hide the docks if the
	last display is iconified. Unhide them if a display is
	uniconified. Probably needs more work ...


svn path=/trunk/; revision=27374
2008-10-23 08:39:46 +00:00
Michael Natterer 5503e6a055 Add GEGL_CFLAGS and #includes as if gimpdrawable.h and gimpimage.h had a
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-10-09 20:24:04 +00:00
Sven Neumann 5d13567424 reduced default window height to give a window aspect ratio of roughly 3:1
2008-09-29  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell.c (gimp_display_shell_new): 
reduced
	default window height to give a window aspect ratio of roughly 
3:1
	as requested by Peter.


svn path=/trunk/; revision=27072
2008-09-29 09:48:32 +00:00
Sven Neumann 8ec1d65a4a removed trailing whitespace
svn path=/trunk/; revision=26852
2008-09-04 08:37:32 +00:00
Michael Natterer edcd1e7810 libgimpwidgets/Makefile.am libgimpwidgets/gimpwidgets.h
2008-08-29  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/Makefile.am
	* libgimpwidgets/gimpwidgets.h
	* libgimpwidgets/gimphruler.[ch]
	* libgimpwidgets/gimpvruler.[ch]: remove separate H/VRuler classes.

	* libgimpwidgets/gimpruler.[ch]: add an "orientation" property
	instead. Add gimp_ruler_new().

	* libgimpwidgets/gimpwidgets.def: changed accordingly.

	* app/dialogs/resolution-calibrate-dialog.c
	* app/display/gimpdisplayshell.c
	* plug-ins/gfig/gfig-preview.c
	* plug-ins/imagemap/imap_preview.c: ditto.


svn path=/trunk/; revision=26810
2008-08-29 10:25:29 +00:00
Michael Natterer 041fd8e125 turn into a GtkContainer subclass mainly to reduce the diff to a local
2008-08-21  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpcanvas.[ch]: turn into a GtkContainer subclass
	mainly to reduce the diff to a local hack I'm at. Also swallow
	some code that used to be called on the canvas widget externally.

	* app/display/gimpdisplayshell.c (gimp_display_shell_new): remove
	the swallowed code.

	* app/display/gimpdisplayshell-callbacks.h: remove canvas event
	mask define.


svn path=/trunk/; revision=26708
2008-08-21 23:55:58 +00:00
Martin Nordholts 384df24b80 When applying the centering logic we need to know the size of the new
2008-08-17  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell.[ch]
	(gimp_display_shell_configure_event): When applying the centering
	logic we need to know the size of the new canvas, so instead of
	having it here, only make sure that this logic is run on the next
	canvas size-allocate.

	* app/display/gimpdisplayshell-callbacks.c
	(gimp_display_shell_canvas_size_allocate): If the size-allocate
	comes from a top level window resize, apply centering logic.

svn path=/trunk/; revision=26611
2008-08-17 07:21:41 +00:00
Martin Nordholts f45897f6c7 Support axis independence.
2008-08-16  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-scroll.[ch]
	(gimp_display_shell_scroll_center_image_on_next_size_allocate):
	Support axis independence.

	* app/display/gimpdisplayshell.c: Adapt.

svn path=/trunk/; revision=26608
2008-08-16 18:50:38 +00:00
Martin Nordholts 80ff2e82c3 Explain that this function needs to be used with care since it is risky.
2008-08-16  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-scroll.c
	(gimp_display_shell_scroll_center_image_on_next_size_allocate):
	Explain that this function needs to be used with care since it is
	risky.

	* app/display/gimpdisplayshell.c
	(gimp_display_shell_new)
	(gimp_display_shell_fill): Clarify that it is safe to use the
	risky function.

	(gimp_display_shell_configure_event): Make proper comparisions (<=
	not =) and explain that usage of the risky function is safe.

	(gimp_display_shell_shrink_wrap): Always call
	gimp_display_shell_scroll_center_image() and let size-requests be
	handled by GimpDisplayShell::configure_event().

	* app/actions/view-commands.c (view_shrink_wrap_cmd_callback): No
	need to center anything explicitly any longer.

svn path=/trunk/; revision=26607
2008-08-16 18:25:32 +00:00
Martin Nordholts ec15a39b14 Remove the centering logic because we do not always want to run it when
2008-08-16  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-callbacks.c
	(gimp_display_shell_canvas_size_allocate): Remove the centering
	logic because we do not always want to run it when the canvas size
	changes. For example, the canvas size changes if rulers are
	toggled on/off.

	* app/display/gimpdisplayshell.c
	(gimp_display_shell_configure_event): Implement
	GtkWidget::configure_event() for the display shell and put the
	image centering logic here instead, since this class function is
	run when the top level window size changes. Run it only if the
	size (not position) of the window changes.

svn path=/trunk/; revision=26599
2008-08-16 16:52:05 +00:00
Martin Nordholts ab419f2e70 Support axis independence.
2008-08-16  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-scale.[ch]
	(gimp_display_shell_scale_get_zoom_focus)
	(gimp_display_shell_scale_image_is_within_viewport): Support axis
	independence.

	* app/display/gimpdisplayshell.c
	(gimp_display_shell_zoom_button_callback): Adapt to new
	gimp_display_shell_scale_image_is_within_viewport().

svn path=/trunk/; revision=26585
2008-08-16 07:06:26 +00:00
Martin Nordholts c8ae8f67b4 New function.
2008-08-14  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-draw.[ch]
	(gimp_display_shell_draw_get_scaled_image_size_for_scale): New
	function.

	* app/display/gimpdisplayshell-scale.[ch]
	(gimp_display_shell_scale): When zooming out and the image
	starts to fit the viewport on a given axis, center on that
	axis.

	(gimp_display_shell_scale_image_starts_to_fit): New function.

	(gimp_display_shell_calculate_scale_x_and_y): New function.

	* app/display/gimpdisplayshell.c
	(gimp_display_shell_scale_changed): Use
	gimp_display_shell_calculate_scale_x_and_y().

	* app/display/gimpdisplayshell-scroll.c
	(gimp_display_shell_scroll_center_image): Bail out if neither
	vertical nor horizontal centering is requested.

svn path=/trunk/; revision=26562
2008-08-14 19:23:28 +00:00
Martin Nordholts c9dc5bf940 No need to update scrollbars, only rulers. (gimp_display_shell_reconnect):
2008-08-14  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell.c
	(gimp_display_shell_set_unit): No need to update scrollbars, only
	rulers.
	(gimp_display_shell_reconnect): A
	gimp_display_shell_scroll_clamp_and_update() makes more sense
	here.

svn path=/trunk/; revision=26558
2008-08-14 15:55:56 +00:00
Martin Nordholts 47b34e973d New function.
2008-08-13  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-scale.c
	(gimp_display_shell_scale_image_is_within_viewport): New function.

	* app/display/gimpdisplayshell.c (gimp_display_shell_new): When
	the zoom button is toggled, implicitly do a View -> Fit Image in
	Window if the (scaled) image is within the viewport.

svn path=/trunk/; revision=26529
2008-08-13 17:36:29 +00:00
Sven Neumann 0847643307 removed calls to scale the image and to update the scrollbars and rulers.
2008-08-12  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell.c (gimp_display_shell_empty):
	removed calls to scale the image and to update the scrollbars 
and
	rulers. Doesn't seem to make sense in an empty display and it
	causes a crash.


svn path=/trunk/; revision=26518
2008-08-12 15:17:43 +00:00
Martin Nordholts 5148ff2c9f Recent refactorings seems to have made the centering hack obsolete so use
2008-08-10  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell.c (gimp_display_shell_fill): Recent
	refactorings seems to have made the centering hack obsolete so use
	gimp_display_shell_scroll_center_image_on_next_size_allocate()
	instead.

svn path=/trunk/; revision=26488
2008-08-10 14:34:10 +00:00
Martin Nordholts 21a6d735e5 Always center the image after a wrap. I can't think of a case when that
2008-08-10  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell.c (gimp_display_shell_shrink_wrap):
	Always center the image after a wrap. I can't think of a case when
	that shouldn't happen.

	* app/display/gimpdisplayshell-handlers.c
	(gimp_display_shell_size_changed_detailed_handler): Centering
	occurs implicitly after wrapping now, no need to do it explicitly.

	* app/display/gimpdisplayshell-scroll.c
	(gimp_display_shell_scroll_center_image): Handle the no-image
	case.

svn path=/trunk/; revision=26487
2008-08-10 14:26:29 +00:00
Martin Nordholts 2eacb5cf58 Rename gimp_display_shell_scale_setup() to
2008-08-10  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-scale.[ch]:
	Rename gimp_display_shell_scale_setup() to
	gimp_display_shell_update_scrollbars_and_rulers(), because that's
	exactly what that function does.

	* app/display/gimpdisplayshell.c
	* app/display/gimpdisplayshell-scroll.c
	* app/display/gimpdisplayshell-handlers.c
	* app/display/gimpdisplayshell-callbacks.c: Adapt to new name.

svn path=/trunk/; revision=26484
2008-08-10 11:56:29 +00:00
Martin Nordholts 65ff34a540 It makes more sense for gimp_display_shell_get_scaled_image_size() to be
2008-08-10  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-scroll.[ch]: It makes more sense
	for gimp_display_shell_get_scaled_image_size() to be moved from
	here to

	* app/display/gimpdisplayshell-draw.[ch]: here, and rename it to
	gimp_display_shell_draw_get_scaled_image_size().

	* app/display/gimpdisplayshell.c: Adapt to name change.

svn path=/trunk/; revision=26479
2008-08-10 10:54:00 +00:00
Martin Nordholts a736df49e2 Put functions to center the image in the display shell where they belong,
2008-08-10  Martin Nordholts  <martinn@svn.gnome.org>

	Put functions to center the image in the display shell where they
	belong, and give them proper names.

	* app/display/gimpdisplayshell-scale.[ch]: Get rid of functions
	and use the new names.

	* app/display/gimpdisplayshell-scroll.[ch]: Put the functions here
	and call them gimp_display_shell_scroll_center_image() and
	gimp_display_shell_scroll_center_image_on_next_size_allocate().

	* app/display/gimpdisplayshell.c:
	* app/display/gimpdisplayshell-handlers.c: Use the new names.

svn path=/trunk/; revision=26470
2008-08-10 07:23:14 +00:00
Martin Nordholts 6f8f412fd4 Center the image after connecting to it. This is required if the image we
2008-08-03  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell.c (gimp_display_shell_new): Center
	the image after connecting to it. This is required if the image we
	connect to is smaller than the initial canvas size.

svn path=/trunk/; revision=26356
2008-08-03 17:57:13 +00:00
Sven Neumann 9d17a53267 moved last motion stuff to the end
svn path=/trunk/; revision=26233
2008-07-18 11:58:57 +00:00
Sven Neumann 92661af96c removed delta_time, delta_x, delta_y, distance and random from the
2008-07-18  Sven Neumann  <sven@gimp.org>

	* app/core/core-types.h: removed delta_time, delta_x, delta_y,
	distance and random from the GimpCoords struct. These don't need
	to be kept here and they can't be properly interpolated.

	* app/core/gimpcoords.c: changed accordingly.

	* app/xcf/xcf-load.c (xcf_load_vector): the size of the 
GimpCoords
	struct changed.

	* app/display/gimpdisplayshell.[ch] (struct _GimpDisplayShell):
	added some members to store values from the last event that are
	needed in gimp_display_shell_eval_event() and which are not any
	longer part of GimpCoords.

	* app/display/gimpdisplayshell-coords.c
	(gimp_display_shell_eval_event): changed accordingly.
	
	* app/paint/gimppaintoptions.c: calculate a random number when 
one
	is needed.

	* app/paint/gimpbrushcore.c (gimp_brush_core_interpolate):
	GimpCoords doesn't have a "random" field any longer.


svn path=/trunk/; revision=26232
2008-07-18 11:56:05 +00:00
Martin Nordholts 805a3f5f8b Allow to choose what axes to center on.
2008-07-13  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-scale.[ch]
	(gimp_display_shell_center_image): Allow to choose what axes to
	center on.

	(gimp_display_shell_scale_fill)
	(gimp_display_shell_scale_fit_in): Explicitly center on both axes.

	* app/display/gimpdisplayshell.c (gimp_display_shell_fill): Center
	the image in the filled display shell. Rather hackish, but seems
	to work fine.

svn path=/trunk/; revision=26185
2008-07-13 20:23:15 +00:00