Commit Graph

2023 Commits

Author SHA1 Message Date
Michael Natterer 57541f8093 Rename gimp_display_shell_selection_layer_set_hidden() to set_layer_hidden() 2009-10-08 09:10:33 +02:00
Michael Natterer dd0575edb4 Move refing/unrefing the image to gimp_display_set_image()
and don't do it in gimp_display_connect()/disconnect() because
set_image() is the natural place to do it.
2009-10-07 21:13:39 +02:00
Michael Natterer 067cfe9ff0 Move a call to gimp_display_shell_connect() around
from gimp_display_shell_reconnect() to gimp_display_set_image()
because it makes unsetting and setting an image in
gimp_display_set_image() more symmetric.
2009-10-07 20:11:48 +02:00
Michael Natterer 1ae5d6ad8d Use the local shell variable and don't call get_shell() again 2009-10-07 19:59:54 +02:00
Michael Natterer 6ad76d226e Use gimp_display_set_image() in gimp_display_new()
instead of manually calling gimp_display_connect(). Make
gimp_display_set_image() handle displays in construction
(which don't have a shell yet).
2009-10-07 19:42:08 +02:00
Michael Natterer c17dfd22a8 Rename layer_select->shell to layer_select->window
Calling that member "shell" is just too confusing in the
GimpDisplayShell context.
2009-10-06 19:25:33 +02:00
Michael Natterer c5b856f16f Use gimp_display_get_image() instead of display->image 2009-10-06 19:20:44 +02:00
Michael Natterer bf41a773cb Update the window title and icon when switching between shells 2009-10-06 10:56:46 +02:00
Michael Natterer d0a614093e Default to GIMP_NAME for the "title" property 2009-10-06 10:56:10 +02:00
Michael Natterer 23cd244c65 Make display->instance private, add an accessor and use it everywhere 2009-10-06 09:16:46 +02:00
Michael Natterer 5d70d60927 Move the display ID to the private struct 2009-10-05 20:10:00 +02:00
Michael Natterer c339125d7d Add private struct and move "shell" and "update_areas" there 2009-10-05 20:06:13 +02:00
Michael Natterer d1ded0617f More gimp_display_get_shell() instead of display->shell 2009-10-05 19:58:03 +02:00
Michael Natterer 297d205269 Use gimp_display_get_shell() also in gimpdisplay.c 2009-10-05 19:27:04 +02:00
Michael Natterer 161f1346db Create the new display ID in set_property() not in gimp_display_new()
Make the ID a read-only property and set it when the "gimp"
construct-only property gets set. Removes code from gimp_display_new()
where it doesn't belong.
2009-10-04 22:00:04 +02:00
Michael Natterer 7d878f6f4b Use the GimpDisplayConfig from GimpDisplay where possible
...instead of going via display->gimp and casting.
2009-10-04 20:22:06 +02:00
Michael Natterer ac98c2c234 Use gimp_display_get_shell() instead of directly accessing it 2009-10-04 19:56:39 +02:00
Michael Natterer 18cbe3422e Add getters for "gimp", "image" and "shell" 2009-10-04 19:39:22 +02:00
Michael Natterer 4a0b826493 (gimp_display_new): add a local "shell" variable for more readable code 2009-10-04 19:30:32 +02:00
Michael Natterer 31a41c2b3d Use gimp_display_shell_present() instead of gtk_window_present() 2009-10-04 19:27:58 +02:00
Michael Natterer 94dcbe0e2e Add new function gimp_display_shell_present()
Not only presents the shell's toplevel, but also makes it the active
shell in the image window.
2009-10-04 19:24:55 +02:00
Michael Natterer dee0afed79 Move the statusbar back to GimpDisplayShell
Keeping it in GimpImageWindow was a bad idea because
- it wasted space
- it produced evil code because
- it conceptually didn't belong there
2009-10-04 15:33:03 +02:00
Martin Nordholts d8392b8c52 app: Don't resize the left dock area when the image window is resized 2009-10-04 13:51:47 +02:00
Martin Nordholts 8fd011e75e app: Make right dock column not resize when adjusting left pane 2009-10-04 11:27:46 +02:00
Martin Nordholts d3435b14e6 app: Put docks in the image window in single-window mode in panes 2009-10-04 11:13:05 +02:00
Martin Nordholts d1958a5103 app: Add GimpDockColumns to the left and right of a GimpImageWindow 2009-10-04 02:10:11 +02:00
Martin Nordholts 301e5c2c34 app: Maintain a list of GimpImageWindow:s on an app instance level 2009-10-04 02:10:11 +02:00
Michael Natterer 750c11f001 Move the display render buf size #defines to gimpdisplayshell-render.h 2009-10-03 00:15:04 +02:00
Michael Natterer 1a7c67bc05 Remove duplicate #define GIMP_DISPLAY_RENDER_BUF_WIDTH 256 2009-10-03 00:11:34 +02:00
Michael Natterer cbc4013412 Reindent prototypes 2009-10-03 00:06:44 +02:00
Michael Natterer f6fd3aed51 Move GimpDisplayShell's expose functions to separate files 2009-10-02 23:55:26 +02:00
Michael Natterer 6c46d1ec73 Fix some comment typos and formatting 2009-10-02 23:43:58 +02:00
Michael Natterer 3d13f8d4d5 Tweak display finding logic of previous commit a bit
(gimp_display_new): add the new shell to the active display's image
window, not the first display's.
2009-10-02 21:50:02 +02:00
Michael Natterer 3106b66186 Finally enable multiple images in one window
(gimp_display_new): if single-window-mode is active, put the new shell
into the first display's image window.
2009-10-02 21:15:07 +02:00
Michael Natterer ff20a1367d Make GimpImageWindow handle the empty display correctly
Keep around a boolean state "is_empty" and update it when adding and
removing shells, and when the image of any shell changes. Do empty
display voodoo only when the "is_empty" state changes.
2009-10-01 19:44:13 +02:00
Michael Natterer 625885eb9d Make sure the shell is really destroyed when removing it from the window
Explicitely call gtk_widget_destroy() to break whatever reference
cycles so the shell really goes away.
2009-10-01 19:44:13 +02:00
Michael Natterer a6bb7fb8ee Remove accidentially added #include 2009-09-30 19:31:13 +02:00
Michael Natterer b9b7cadbb0 Use large image previews as tab widgets 2009-09-30 19:25:38 +02:00
Michael Natterer ccdab9e4cd Make updagin the image window's ui manager more sane
(gimp_image_window_image_notify): update the ui manager unconditionally
(both when a display is emptied *and* filled)

(gui_display_create): remove updating code here. It was not belonging
here anyway and the image window does the right thing now.
2009-09-30 00:00:36 +02:00
Michael Natterer ee2fdbcf8f Enable some #if 0'ed code and use the just added API
gimp_display_delete(): remove shells from image windows with more than
one shell instead of destroying the window.
2009-09-29 23:01:33 +02:00
Michael Natterer d1dc70fbdf Add some more shell management API to GimpImageWindow
- gimp_image_window_remove_shell()
- gimp_image_window_get_n_shells()
2009-09-29 22:59:48 +02:00
Michael Natterer 3189b8f45f Move GimpImage::saved and GimpImage::exported handlers to the right place
GimpDisplay is *only* for proxying the image's projection, every other
image/display connection belongs into GimpDisplayShell, so move these
handlers from gimpdisplay-handlers.c to gimpdisplayshell-handlers.c.
2009-09-29 22:38:34 +02:00
Michael Natterer 35588efaa1 Remove "gimp-" prefix from the shell's "icon" and "title" properties
The prefix was needed because GtkWindow also has "icon" and "title"
properties.
2009-09-29 22:20:12 +02:00
Michael Natterer d046da90e2 Merge the image window's active shell logic with the notebook's active page
Add a GtkNotebook::switch_page() handler and move all shell switching
code there. In gimp_image_window_set_active_shell(), simply set the
right notebook page.
2009-09-29 22:14:10 +02:00
Michael Natterer e8061e5a7e Add a notebook for the display shells 2009-09-29 21:57:57 +02:00
Michael Natterer b0f7a7daf4 Add a central hbox for docks and display shells 2009-09-29 21:47:58 +02:00
Michael Natterer 1c430a2b19 Move all GimpImageWindow members to a private struct
Add accessor functions for publically available members and visibility
functions for menubar and statusbar.
2009-09-29 21:44:43 +02:00
Michael Natterer 59274856ad Derive GimpDisplayShell from GtkVBox instead of GimpImageWindow
...and pack the widget into a separately created GimpImageWindow.
2009-09-29 20:56:14 +02:00
Michael Natterer 253b8e2cbe Use gimp_display_shell_get_window() instead of gtk_widget_get_toplevel()
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-09-29 20:32:26 +02:00
Michael Natterer 97987aff6e Add gimp_display_shell_get_window() which returns an image window or NULL 2009-09-28 23:53:05 +02:00
Michael Natterer 35739c743c Change GimpImageWindow API to speak in shells, not displays
A widget container should keep around child widgets, not whatever
objects that just have widgets.
2009-09-28 22:55:55 +02:00
Michael Natterer 54edc20113 Add missing #include "gimpimagewindow.h" 2009-09-28 22:55:54 +02:00
Michael Natterer 45f4a99339 Don't set any options in gimp_display_shell_new()
All options are properly set when the shell is set active in its image
window.
2009-09-28 22:55:54 +02:00
Michael Natterer 1273a63eab Update the shell's appearance when it is set active in the image window 2009-09-28 22:55:53 +02:00
Michael Natterer 16038023a5 Remove some dead code and fix some comments 2009-09-28 22:55:53 +02:00
Michael Natterer a8876834e8 Move the remaining menubar signal connections from the shell to the window 2009-09-28 22:55:53 +02:00
Michael Natterer 375a25dd24 Destroy the toplevel, not the shell in gimp_display_delete()
Also add disabled code that removes the display from an image window
that has more then one display.
2009-09-28 22:55:53 +02:00
Michael Natterer f7f58d57be gtk_window_present() the toplevel, not the shell 2009-09-28 22:55:52 +02:00
Michael Natterer 6c76120561 Move "show-statusbar" next to "show-menubar" 2009-09-28 22:55:52 +02:00
Michael Natterer fbc3b2f0c1 Get rid of image window FIXMEs
Add code that properly uses the statusbar in the toplevel image window
instead of assuming that the shell and the window are the same object.
Add new FIXME because it will break when switching between two
displays of one toplevel that both have active progress messages.
2009-09-28 22:55:52 +02:00
Michael Natterer fa43c8797e Add gimp_statusbar_override/restore_window_title()
Which sets/unsets the title of an iconified toplevel image window to
the current progress message (if any). Use the new functions when the
window is (de)iconified. Not exactly the high art of programming, but
much better than the hacks in gimpdisplayshell-progress.c that are now
removed.
2009-09-28 22:55:52 +02:00
Michael Natterer 892f9f8876 Add gimp_image_window_is_iconified() and use it in GimpImageWindow 2009-09-28 22:55:51 +02:00
Michael Natterer 5b5e4e039a Add gimp_image_window_add_display() and use it
This API is most likely not final, but enables adding the vbox of
shell widgets to the image window's vbox *after* the shell constructor
returns. Seems to work nicely :-)
2009-09-28 22:55:51 +02:00
Michael Natterer bcef4f275d gimp_display_shell_fill_idle() present the toplevel not the shell
Not sure if this one should go to the image window...
2009-09-28 22:55:51 +02:00
Michael Natterer 32783d7228 Move shrink_wrap() from the display to the window
Also fix all callers. This clearly needs more cleanup.
2009-09-28 22:55:50 +02:00
Michael Natterer 8c2934f626 Remove dead and forgotten declaration of gimp_display_shell_update_icon() 2009-09-28 22:55:50 +02:00
Michael Natterer d5b1542808 Add some forgotten casts, fixes (harmless) compile warnings 2009-09-28 22:55:50 +02:00
Michael Natterer abc5e270b3 Go via the toplevel to update the image window's ui manager 2009-09-28 22:55:49 +02:00
Michael Natterer 7f064f694e Get rid of the shell's window-state-event handler
Move the last remaining function to the window. It doesn't actually
belong there, but it's better than the handler in the wrong place.
Added FIXME as reminder.
2009-09-28 22:55:49 +02:00
Michael Natterer 4f60240a04 Move updating the "view-fullscreen" actions to the proper place
Update the actions in gimp_display_shell_appearance_update() and remove
all action code from the window-state-event handlers.
2009-09-28 22:55:49 +02:00
Michael Natterer 8b5b36751d Move updating the shell's appearance to the right window state event handler
The shell's handler is going to go away, so move this call to
the image window.
2009-09-28 22:55:48 +02:00
Michael Natterer 5c048e0108 Reindent static prototypes 2009-09-28 22:55:48 +02:00
Michael Natterer d015a704b3 Move GtkWidget::configure_event() impl from the shell to the window
Still has a FIXME for later, but is in the right place now.
2009-09-28 22:55:48 +02:00
Michael Natterer c475b1b3be Update widget packing ASCII art to not include image window widgets 2009-09-28 22:55:48 +02:00
Michael Natterer a5945740e0 Move GtkWidget::delete_event() impl from the shell to the window
Still has a FIXME but is in the right place now at least
2009-09-28 22:55:47 +02:00
Michael Natterer b11c3355cb Implement GObject::constructor()
For now, simply assert that all required construct properties are set.
2009-09-28 22:55:47 +02:00
Michael Natterer 1ae5632753 Turn "popup-manager" into a construct-only property and pass it accordingly 2009-09-28 22:55:47 +02:00
Michael Natterer 7b62cb3b00 Turn "display" into a construct-only property and pass it accordingly 2009-09-28 22:55:47 +02:00
Michael Natterer d2f43f1604 Finally fully enable the image window's active_display mechanism
Don't set the window's active_display manually in gimp_display_shell_new(),
setting it properly after construction in gimp_display_new() works fine
now. Enable all disabled code in gimp_image_window_set_active_display().
2009-09-28 22:55:47 +02:00
Michael Natterer fdd55d37cb Move the last window-related NIW code from the shell to the image window 2009-09-28 22:55:46 +02:00
Michael Natterer 2762100885 Show the shell after it has been associated with its image window, not before
...so the image window's session management has a chance to set
the window's size.
2009-09-28 22:55:46 +02:00
Michael Natterer cf14f1ce62 Go via the tolevel to get to the image window's statusbar 2009-09-28 22:55:45 +02:00
Michael Natterer 8b5a692099 Remove display_factory member from GimpDisplayShell 2009-09-28 22:55:45 +02:00
Michael Natterer 9c5e44c566 Move the window part of gimp_display_shell_fill() to GimpImageWindow 2009-09-28 22:55:45 +02:00
Michael Natterer 4cc8f8e6f8 Move the window part of gimp_display_shell_empty() to GimpImageWindow 2009-09-28 22:55:44 +02:00
Michael Natterer c7fdac4894 gimp_display_set_image(): emit notify::image only if the image changed 2009-09-28 22:55:44 +02:00
Michael Natterer e5d8067a87 Unref the menubar_manager in finalize() 2009-09-28 22:55:44 +02:00
Michael Natterer 8086bc8e68 Pass the display_factory to the image window 2009-09-28 22:55:43 +02:00
Michael Natterer e9c7b47284 Add "display-factory" construct-only property of type GimpDialogFactory 2009-09-28 22:55:43 +02:00
Michael Natterer e7e8759710 Move image window related functions together (menubar and statusbar) 2009-09-28 22:55:43 +02:00
Michael Natterer 5804e80ad0 Get rid of all image window FIXMEs
Replace duplicated ugly macro constructs by proper utility functions
that do the right thing wrt GimpImageWindow being the new toplevel.
2009-09-28 22:55:43 +02:00
Michael Natterer ac254f293d Don't use the menubar_manager to set the quickmask toggle's tooltip 2009-09-28 22:55:42 +02:00
Michael Natterer 88ee13db56 Go via the toplevel to get to the statusbar for setting coords
Only a visible shell can produce cursor coordinates, so no need
to check for the image window's active display.
2009-09-28 22:55:42 +02:00
Michael Natterer 7e8a767e88 Add notify callback for GimpDisplay's "image" property
Will be used to do NIW things later.
2009-09-28 22:55:41 +02:00
Michael Natterer fc75f38c03 Make gimp_statusbar_new() a void function and set a shell dynamically 2009-09-28 22:55:41 +02:00
Michael Natterer 82aa4084ab Add gimp_statusbar_set_shell()
Reconnect signals when a new shell is set; reorganize internal code to
not set up permanent connections to one specific shell.
2009-09-28 22:55:41 +02:00
Michael Natterer 571cdd47ed Set the window role and "resizable" on GimpImageWindow, not on the shell 2009-09-28 22:55:40 +02:00
Michael Natterer a9b617235f Make the scale dialog transient to the shell's toplevel 2009-09-28 22:55:40 +02:00
Michael Natterer 1bbcd8f7b5 Add "icon" property to GimpDisplayShell
Set it instead of setting the window icon and connect GimpImageWindow
to the notification.
2009-09-28 22:55:40 +02:00
Michael Natterer 660c333b55 Add "title" and "status" properties to GimpSisplayShell
Set the properties when updating title and status. In GimpImageWindow,
connect to notifications of the properties to update window title and
statusbar.
2009-09-28 22:55:39 +02:00
Michael Natterer 5112bc497d Remove gimp_display_shell_title() because it was completely empty 2009-09-28 22:55:39 +02:00
Michael Natterer 3547a25390 Add a GimpDisplayShell::scaled() handler to GimpImageWindow
...which is connected to the window's active display. Remove updating
the window's menubar_manager from GimpDisplayShell's scaled()
impl. Had to hack around a bit with the new API to set the window's
active display because they are still the same widget.
2009-09-28 22:55:39 +02:00
Michael Natterer a82169ee13 Keep around an "active_display" member in GimpImageWindow
And add gimp_image_window_set_active_display(). Call the new function
when creating a shell. Will all be done by the means of a GimpContext
later, but is a step to get rid of FIXME hacks.
2009-09-28 22:55:39 +02:00
Michael Natterer 03fcc99bbf Move the GtkWidget::style_set() handler to GimpImageWindow
...and remove it from GimpDisplayShell completely.
2009-09-28 22:55:38 +02:00
Michael Natterer 10b98034d4 Move the statusbar to GimpImageWindow
As with the menubar, port some code properly, and add some
horrible /* FIXME image window */ hacks to make it work.
2009-09-28 22:55:38 +02:00
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 639c427429 Use gtk_widget_get_toplevel() to get to a display's "iconified" state
Don't assume that shell->window is the toplevel GdkWindow, go thorugh
gtk_widget_get_toplevel() instead.
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 fcf09eea62 Add gimp_image_window_get_active_display()
Should probably be refactored into something involving a GimpContext,
but it's good enough as intermediate step.
2009-09-28 22:55:35 +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
Michael Natterer b83a58b64e Add new toplevel window class GimpImageWindow
This one will be the toplevel where GimpDisplayShells live in
once they are no toplevels any longer.
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
Michael Natterer 82c48eeb9e Indentation fix 2009-09-19 15:09:56 +02:00
Michael Natterer b77cbdf3a1 More tool event log output and some minor whitespace cleanup 2009-09-19 15:09:55 +02:00
Michael Natterer 13ac22d800 Add %T which expends to the active drawable's type
This is not really generally useful, but I needed it for debugging and
it doesn't hurt.
2009-09-08 19:46:19 +02:00
Michael Natterer 9e18f771c4 Replace "Group Layer" by "Layer Group" in all user visible strings 2009-09-03 14:57:18 +02:00
Michael Natterer a3558e3cb8 Remove GIMP_OBJECT() casts when calling gimp_object_get_name() 2009-08-31 22:47:18 +02:00
Michael Natterer 3915601544 Remove gimp_image_layer_boundary()
Having a function that only abstracts whether there is an active
layer or not is pretty useless. This also doesn't make the code in
selection_generate_segs() more complex but rather more obvious.
2009-08-31 20:57:52 +02:00
Michael Natterer 44be1b5d7b Various small cleanups (no code changes) 2009-08-31 20:42:02 +02:00
Michael Natterer 064448cb50 Bug 563770 - Layer border visibility don't work with masks
(gimp_display_shell_selection_control): don't draw the layer boundary
if it is hidden.
2009-08-31 19:25:25 +02:00
Michael Natterer 27d036b75f Render a layer group's boundary in a different color
This is probably not sufficient, but better than nothing.
2009-08-29 21:26:46 +02:00
Michael Natterer 02903d6970 Use gimp_item_is_content_locked() instead of gimp_item_get_lock_content()
Use the new API whenever we want to determine the item's effective
lock state (whether we can write to the item's content or not). Use
gimp_item_get_lock_content() only in code that actually deals with
*this* item's locked state, which is only the PDB wrappers and GUI to
modify the flag on the item itself.
2009-08-29 15:27:04 +02:00
Martin Nordholts 957cf2cfa9 app: Always use gimp_object_get_name()
Begin to consider GimpObject::name as private and always use
gimp_object_get_name(). Change gimp_object_get_name() to take an
untyped pointer so we don't have to do so awfully many casts. There is
a runtime check for the type inside the function anyway.
2009-08-29 12:41:29 +02:00
Michael Natterer 35e67dae43 Don't allow dropping colors and patterns and don't allow pasting to groups 2009-08-29 12:27:57 +02:00
Michael Natterer b277454760 Don't allow to drop stuff to locked drawables 2009-08-21 13:50:07 +02:00
Sven Neumann 60f11e18ae Bug 591017 – Tablet pan is not working as fast as it should
Use motion event compression for display scrolling.
2009-08-13 20:24:14 +02:00
Michael Natterer 1b806e5fb6 Set handler variables to NULL after disconnecting them 2009-08-04 22:43:53 +02:00
Michael Natterer 6a64de7f48 Include "core/gimptreehandler.h" 2009-08-04 22:32:24 +02:00
Michael Natterer 6425f5404d Use GimpTreeHandler to connect to all vectors in the image 2009-08-04 22:06:28 +02:00
Sven Neumann 2d5792d1da app: increase the timeout for temporary status-bar messages to 8 seconds 2009-08-04 20:29:07 +02:00
Michael Natterer a53d4566da Use GIMP_IMAGE_ACTIVE_PARENT instead of a NULL parent in all obvious places 2009-08-03 22:30:36 +02:00
Michael Natterer c4075975bf Bring parent items to the public API in the core
* app/core/gimpimage.[ch]: make the parent parameter public in
add_layer(), add_layers(), add_channel() and add_vectors().

* app/vectors/gimpvectors-import.[ch]: add parent parameters to
  the vectors import functions.

* app/core/gimpchannelundo.[ch]
* app/core/gimplayerundo.[ch]
* app/vectors/gimpvectorsundo.[ch]
* app/core/gimpimage-undo-push.[ch]: remember the parent item when
  removing layers, channels and vectors.

* app/actions/channels-commands.c
* app/actions/debug-commands.c
* app/actions/edit-commands.c
* app/actions/layers-commands.c
* app/actions/vectors-commands.c
* app/core/gimp-edit.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/core/gimptemplate.c
* app/dialogs/file-open-dialog.c
* app/display/gimpdisplayshell-dnd.c
* app/text/gimptext-compat.c
* app/tools/gimptexttool.c
* app/tools/gimpvectortool.c
* app/widgets/gimptoolbox-dnd.c
* app/xcf/xcf-load.c
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/paths.pdb
* tools/pdbgen/pdb/vectors.pdb: pass NULL as parent item to above
  functions and add FIXMEs all over the place because there is some
  more hacking needed to make adding with index = -1 (on top of the
  current item) work again.

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

* app/core/gimpimage-duplicate.c: duplicate the original image's
  tree structure in the copy.

* app/widgets/gimpitemtreeview.[ch]: add parent to GimpAddItemFunc,
  add utility function gimp_item_tree_view_get_drop_index() which
  figures where to add something dropped to an item tree.

* app/widgets/gimpchanneltreeview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimpvectorstreeview.c: changed accordingly, using above
  new GimpItemTreeView API.
2009-08-03 19:21:51 +02:00
Michael Natterer c1c882b4ec Change control+tab layer cycling to work within one group
This is probably wrong and should use a flattened list of all layers,
but at least it will not be buggy code when we actually get layer
trees.
2009-08-02 13:16:31 +02:00
Michael Natterer 7805bd2186 Use the new item counting functions where appropriate 2009-08-02 12:24:06 +02:00
Michael Natterer 01c77b18d5 Use the new item iter API instead of the image APIs in some straightforward places 2009-08-01 23:07:07 +02:00
Martin Nordholts cfbcdbd207 app: Add WM debug output 2009-07-20 13:16:30 +02:00
Martin Nordholts 1c0dea5772 app: Use gtk_window_set_title() instead of gdk_window_set_title()
Get rid of the last calls to gdk_window_set_title() and instead use
gdk_window_set_title(). The gdk_window_set_title() calls in
gimpdisplayshell-title.c is a legacy from the initial import of the
project.
2009-07-20 13:16:28 +02:00
Michael Natterer 997111bf0a Use gtk_dialog_get_content_area() instead of dialog->vbox 2009-07-15 16:19:32 +02:00
Michael Natterer 4da5ed3a8b Use gtk_widget_get_window() instead of widget->window 2009-07-15 15:02:31 +02:00
Michael Natterer 2d442e4576 Use gtk_widget_get_window() instead of widget->window 2009-07-15 14:52:27 +02:00
Michael Natterer 2bfc48df74 Use accessors instead of sealed GTK+ members 2009-07-15 14:29:43 +02:00
Martin Nordholts 8e7c19b76c app: Clarify gimp_display_shell_format_filename()
Clarify gimp_display_shell_format_filename() by using booleans with
nice names in the if conditions.
2009-07-10 19:28:18 +02:00
Martin Nordholts 27f12b2505 app: Cleanup gimp_display_shell_format_filename() 2009-07-05 23:58:55 +02:00
Martin Nordholts 073d026f6c app: Show "(overwritten)" and "(exported)" status of image
When an import source has been overwritten with File -> Overwrite
<file.png>, or exported by whatever means, reflect this status in the
title bar of the image window. Do this by adding some string building
logic to gimp_display_shell_format_filename().
2009-07-05 09:28:52 +02:00
Martin Nordholts c181f4eb05 app: Add and use gimp_image_is_dirty() 2009-07-03 21:11:21 +02:00
Martin Nordholts ed9c12d1e7 app: Put "[<filename>] (imported)" in window title for imported files
Put "[<filename>] (imported)" in window title for imported files
instead of "Untitled (imported from <filename>)".
2009-07-02 22:17:35 +02:00
Michael Natterer 1b69070556 Make key themes really work this time
* app/widgets/gimpwindow.c: treat GimpCanvas as a text widget and
  dispatch all key events to it before invoking menu shortcuts.

* app/display/gimpdisplayshell-callbacks.c: treat all events on the
  empty display as unhandled, not handled.

* app/tools/gimptexttool.c: use the right API for invoking the proxy
  text view's bindings. Handle some more cursor navigation request and
  swallow text deletion requests we don't handle instead of always
  doing what the delete key does.
2009-06-23 23:25:09 +02:00
Michael Natterer 1a16b48c93 Add infrastructure for sending double and triple clicks to tools
* app/tools/tools-enums.[ch]: add enum GimpButtonPressType which can
be { NORMAL, DOUBLE, TRIPLE }

* app/tools/gimptool.[ch]: add press_type paramater to GimpTool::button_press()

* app/tools/gimp*tool.c
* app/tools/tool_manager.[ch]: changed accordingly.

* app/tools/gimptoolcontrol.[ch]: add members and API so tools can choose
to receive double and triple clicks.

* app/display/gimpdisplayshell-callbacks.c (gimp_display_shell_tool_events):
dispatch double and triple clicks to tools if they want them, and if they
became active by the preceding normal button press.
2009-06-20 17:37:31 +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
Sven Neumann ac11569830 app: fix the questionable while loop in another place
The questionable while loops to get GimpCoords.direction into a proper
range were used in two places. This commit fixes the actual problematic
place where, under some rare circumstances, the code used to go into a
loop for a very long time.
2009-05-29 23:33:54 +02:00
Alexia Death 936df1a183 app: Fix gimp_display_shell_eval_event that had some questionable whiles 2009-05-29 22:26:57 +03:00
Sven Neumann 6742ebc949 app: don't call gimp_ui_manager_update() directly
gimp_ui_manager_update() should not be called directly. Instead call
gimp_image_flush() after doing changes that need to be reflected in
the menus.
2009-05-17 11:02:31 +02:00
Martin Nordholts d62a057e16 app: Update 'Export to' after doing an export
Make sure 'File -> Export to' is updated after doing an export.
2009-05-17 08:25:11 +02:00
Sven Neumann d603b391c8 app: improved internationalisation, added translator comment 2009-05-16 14:58:02 +02:00
Martin Nordholts 3ce09f9684 app: Show message about exported image in the statusrow 2009-05-16 13:02:55 +02:00
Martin Nordholts 88e1064ed3 app: Show imported image basename in titlebar
If an image is imported, make the image window title be
'Untitled (imported from <filename>)' instead of just 'Untitled'.
2009-05-16 01:12:40 +02:00
Martin Nordholts 9a8efbe410 app: Remove unused variable 2009-05-01 17:29:17 +02:00
Michael Natterer bee31119ca Bug 555738 – Image display is wrong after undoing canvas size
2009-03-28  Michael Natterer  <mitch@gimp.org>

	Bug 555738 – Image display is wrong after undoing canvas size
	enlargement

	* app/display/gimpdisplayshell-handlers.c
	(gimp_display_shell_size_changed_detailed_handler): call
	gimp_display_shell_expose_full() because resizing the canvas can
	leave all sorts of display areas unupdated otherwise.


svn path=/trunk/; revision=28230
2009-03-28 21:18:40 +00:00
Michael Natterer e4ba543ca3 swallow the code of gimp_display_shell_image_size_starts_to_fit() because
2009-03-28  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell-handlers.c
	(gimp_display_shell_size_changed_detailed_handler): swallow the
	code of gimp_display_shell_image_size_starts_to_fit() because it
	didn't make things clearer. Add local variables instead to make
	things more readable.


svn path=/trunk/; revision=28229
2009-03-28 21:13:20 +00:00
Michael Natterer a4e7e678c2 Bug 566575 – Warning when creating sample point and releasing Ctrl key
2009-03-28  Michael Natterer  <mitch@gimp.org>

	Bug 566575 – Warning when creating sample point and releasing Ctrl
	key too late

	* app/display/gimpdisplayshell-callbacks.c
	(gimp_display_shell_ruler_button_press): call
	gimp_display_shell_update_focus() after changing the tool so the
	new tool has the right state.


svn path=/trunk/; revision=28226
2009-03-28 15:20:18 +00: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 c11ef1413f adapt button labels to the latest GNOME HIG.
2009-03-16  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-close.c
	(gimp_display_shell_close_dialog): adapt button labels to the
	latest GNOME HIG.


svn path=/trunk/; revision=28161
2009-03-16 13:48: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 e0f1bf375c Bug 572156 – top left pixel position/coordinate is not 0,0 but 1,1
2009-02-20  Michael Natterer  <mitch@gimp.org>

	Bug 572156 – top left pixel position/coordinate is not 0,0 but 1,1

	* app/display/gimpstatusbar.c
	(gimp_statusbar_push_coords)
	(gimp_statusbar_update_cursor): fix braino for
	GIMP_CURSOR_PRECISION_PIXEL_CENTER: going to the pixel's
	center doesn't need any rounding, it simply needs clipping
	the coordinates' fractional parts, gah...

	Review all tools' cursor precision:

	* app/tools/gimpblendtool.c (gimp_blend_tool_init): set cursor
	precision to SUBPIXEL.

	* app/tools/gimptexttool.c (gimp_text_tool_init)
	* app/tools/gimpmeasuretool.c (gimp_measure_tool_init)
	* app/tools/gimpeditselectiontool.c (gimp_edit_selection_tool_init):
	set cursor precision to PIXEL_BORDER.


svn path=/trunk/; revision=28053
2009-02-20 16:57:26 +00:00
Sven Neumann 8a28c073f1 app/core/gimpcoords-interpolate.c applied patch from Alexia Death that
2009-02-14  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcoords-interpolate.c
	* app/display/gimpdisplayshell-coords.c: applied patch from 
Alexia
	Death that fixes issues with the new stroke direction code
	(bug #520078).


svn path=/trunk/; revision=28030
2009-02-14 13:36:28 +00:00
Sven Neumann f64e2a76bf app/core/gimpcoords-interpolate.c app/core/gimpbrush-transform.c
2009-02-10  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcoords-interpolate.c
	* app/core/gimpbrush-transform.c
	* app/paint/gimppaintoptions.c
	* app/display/gimpdisplayshell-coords.c: applied patch from 
Alexia
	Death that fixes the direction of brush rotation (bug #520078).


svn path=/trunk/; revision=28010
2009-02-10 21:07:35 +00:00
Sven Neumann fd4b557fd7 applied patch from Alexia Death that introduces smoothing for the stroke
2009-02-10  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-coords.c
	(gimp_display_shell_eval_event): applied patch from Alexia Death
	that introduces smoothing for the stroke direction (bug 
#520078).


svn path=/trunk/; revision=28009
2009-02-10 19:45:37 +00:00
Michael Natterer 9999ccf790 Bug 520078 – Rotate brushes
2009-02-08  Michael Natterer  <mitch@gimp.org>

	Bug 520078 – Rotate brushes

	Applied a slightly modified patch from Alexia Death:

	* app/core/core-types.h (struct GimpCoords): add "direction" member.

	* app/core/gimpcoords.c: take direction into account in mix(),
	scalarprod(), length_squared(), manhattan_dist() and equal().

	* app/core/gimpcoords-interpolate.c
	(gimp_coords_interpolate_catmull): same here.
	* app/display/gimpdisplayshell-coords.c

	(gimp_display_shell_eval_event): same here.

	* app/paint/gimppaintoptions.[ch]: add properties for direction
	dynamics and adapt dynamics mixing accordingly.

	* app/paint/gimpbrushcore.c (gimp_brush_core_interpolate):
	"interpolate" direction too (in fact, just copy it from
	last_coords since it doesn't change along a straight line).

	* app/paint/gimppaintcore-stroke.c
	(gimp_paint_core_stroke_emulate_dynamics): emulate direction too.

	* app/tools/gimppaintoptions-gui.c: add GUI for direction dynamics.


svn path=/trunk/; revision=28001
2009-02-08 12:55:20 +00:00
Sven Neumann b853a9bccb reverted last change. It's not helpful to use different strings for the
2009-02-02  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-title.c: reverted last change. 
It's
	not helpful to use different strings for the same information 
and
	space is not crucial in the window title.


svn path=/trunk/; revision=27979
2009-02-02 11:00:38 +00:00
Martin Nordholts 9e8b47b5d4 Use dedicated image type strings in the image window title
Use the dedicated image type strings for the image window title, the
enum value strings are too verbose.

svn path=/trunk/; revision=27978
2009-02-01 19:49:40 +00:00
Martin Nordholts 4d7a6b10d1 Added .gitignore files generated with git svn create-ignore.
svn path=/trunk/; revision=27972
2009-01-31 11:37:44 +00:00
Sven Neumann b25b979fc9 removed gimp_image_get_type_string() again.
2009-01-29  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.[ch]: removed gimp_image_get_type_string()
	again.
	
	* app/display/gimpdisplayshell-title.c
	(gimp_display_shell_format_title): use the GimpImageBaseType 
enum
	instead.

	* app/tools/gimptool.c (gimp_tool_oper_update): if the image is
	empty and the tool can't handle that, display a message in the
	statusbar telling the user about this.


svn path=/trunk/; revision=27970
2009-01-29 21:32:30 +00:00
Martin Nordholts 3b79e36d30 New method to get a string representation of the image type.
* app/core/gimpimage.[ch] (gimp_image_get_type_string): New method
to get a string representation of the image type.

* app/display/gimpdisplayshell-title.c
(gimp_display_shell_format_title): Ask the GimpImage for an image
type string instead of making assumptions about its
implementation.

svn path=/trunk/; revision=27947
2009-01-25 19:21:52 +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
Martin Nordholts 073b8ab9d5 Bug 563179 – Scrollbars not resized when we extend the canvas size
* app/display/gimpdisplayshell-handlers.c
(gimp_display_shell_size_changed_detailed_handler): Add explicit
call to gimp_display_shell_scroll_clamp_and_update() at the end to
make sure it is called.

svn path=/trunk/; revision=27762
2008-12-04 20:22:30 +00:00
Sven Neumann 64416069e0 app/core/gimpprojection.c (gimp_projection_get_tiles_at_level) cosmetics.
2008-11-21  Sven Neumann  <sven@gimp.org>

	* app/core/gimpprojection.c (gimp_projection_get_tiles_at_level)
	cosmetics.

	* app/display/gimpdisplayshell-render.[ch]: added const 
qualifier.


svn path=/trunk/; revision=27697
2008-11-21 17:59:04 +00:00
Martin Nordholts 5aeb568650 s/gimp_container_children_type/gimp_container_get_children_type/
s/gimp_container_policy/gimp_container_get_policy/
s/gimp_container_num_children/gimp_container_get_n_children/

* app/actions/actions.c
* app/actions/file-actions.c
* app/actions/file-commands.c
* app/actions/tool-options-actions.c
* app/actions/tools-actions.c
* app/actions/tools-commands.c
* app/actions/vectors-actions.c
* app/core/gimpcontainer-filter.c
* app/core/gimpcontainer.c
* app/core/gimpcontainer.h
* app/core/gimpimage-convert.c
* app/core/gimpimage-flip.c
* app/core/gimpimage-merge.c
* app/core/gimpimage-resize.c
* app/core/gimpimage-rotate.c
* app/core/gimpimage-scale.c
* app/core/gimpimage-undo.c
* app/core/gimpimage.c
* app/core/gimpimagefile.c
* app/core/gimplist.c
* app/core/gimpundostack.c
* app/dialogs/palette-import-dialog.c
* app/dialogs/quit-dialog.c
* app/display/gimpdisplay.c
* app/display/gimpdisplayshell-layer-select.c
* app/display/gimpdisplayshell-title.c
* app/gui/gui-vtable.c
* app/menus/tool-options-menu.c
* app/tools/gimp-tools.c
* app/widgets/gimpcontrollerlist.c
* app/widgets/gimpimagepropview.c
* app/widgets/gimpsettingsbox.c
* app/widgets/gimpviewablebutton.c
* app/xcf/xcf-load.c
* app/xcf/xcf-save.c

svn path=/trunk/; revision=27692
2008-11-20 22:45:19 +00:00
Michael Natterer 176f4c5689 app/dialogs/module-dialog.c app/display/gimpscalecombobox.c
2008-11-16  Michael Natterer  <mitch@gimp.org>

	* app/dialogs/module-dialog.c
	* app/display/gimpscalecombobox.c
	* app/tools/gimpgegltool.c
	* app/tools/gimprectangleoptions.c
	* app/widgets/gimpactionview.[ch]
	* app/widgets/gimpcomponenteditor.c
	* app/widgets/gimpcontainerentry.[ch]
	* app/widgets/gimpcontrollereditor.c
	* app/widgets/gimpcontrollerlist.c
	* app/widgets/gimpfileprocview.c: s/NUM_COLUMNS/N_COLUMNS/


svn path=/trunk/; revision=27674
2008-11-16 20:17:43 +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
Martin Nordholts 1dd185c397 Bug 560903 – Explicit zooming with e.g. '1' should handle
zoom-focus better

* app/display/display-enums.h: Added
GIMP_ZOOM_FOCUS_RETAIN_CENTERING_ELSE_BEST_GUESS.

* app/display/gimpdisplayshell-scale.c
(gimp_display_shell_scale_get_zoom_focus): Take the new enum into
account; if the image is centered, keep it centered, else use the
best-guess method.

* app/actions/view-commands.c (view_zoom_explicit_cmd_callback):
Use the new enum for explicit zooming.

* app/display/display-enums.c: Regenerated.

svn path=/trunk/; revision=27653
2008-11-15 10:24:56 +00:00
Martin Nordholts 9089377f32 Bug 560245 – Zoom selection always centered in the Navigation tab
* app/display/gimpdisplayshell-scale.c (gimp_display_shell_scale):
Also take the image center and not only the zoom focus point into
account when deciding whether or not to center the image after
zoom.

svn path=/trunk/; revision=27651
2008-11-15 08:04:06 +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
Sven Neumann 47c39d6c97 removed function gimp_display_shell_scroll_get_scaled_viewport_offset() as
2008-11-14  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-scroll.[ch]: removed function
	gimp_display_shell_scroll_get_scaled_viewport_offset() as it was
	only returning -shell->offset_x and -shell->offset_y and it
	started to show up in profiles.

	* app/display/gimpdisplayshell-draw.c
	* app/display/gimpdisplayshell-transform.c
	* app/display/gimpdisplayshell-scale.c: use the shell offsets
	directly.


svn path=/trunk/; revision=27644
2008-11-13 23:16:11 +00:00
Sven Neumann 987824b301 check that the resulting area has positive width and height.
2008-11-14  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-preview.c
	(gimp_display_shell_draw_quad): check that the resulting area 
has
	positive width and height.


svn path=/trunk/; revision=27642
2008-11-13 23:12:56 +00:00
Martin Nordholts efb5c20ef8 Move the instance struct to the header but add a typed opaque priv pointer
* app/display/gimpcursorview.[ch]: Move the instance struct to the
header but add a typed opaque priv pointer to it so we can avoid
exposing implementation details. Also move the class struct to the
header.

svn path=/trunk/; revision=27641
2008-11-13 20:12:49 +00:00
Sven Neumann ada8336822 added gimp_image_get_display_name().
2008-11-13  Sven Neumann  <sven@gimp.org>

	* app/core/gimpimage.[ch]: added gimp_image_get_display_name().

	* app/dialogs/palette-import-dialog.c
	* app/display/gimpdisplayshell-close.c
	* app/display/gimpdisplayshell-title.c
	* app/pdb/gimppdb-utils.c

	* app/widgets/gimpviewabledialog.c: use the new method instead 
of
	getting the image URI and mangling it with
	file_utils_uri_display_basename().


svn path=/trunk/; revision=27637
2008-11-13 12:09:05 +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
Martin Nordholts a092afea5b Show selection info from the image under the cursor.
* app/display/gimpcursorview.c ()
(gimp_cursor_view_update_cursor): Show selection info from the
image under the cursor.

(gimp_cursor_view_clear_cursor): Start showing selection info from
the active image again.

svn path=/trunk/; revision=27608
2008-11-10 22:18:33 +00:00
Sven Neumann 84953f5744 added translation context.
2008-11-10  Sven Neumann  <sven@gimp.org>

	* app/display/gimpcursorview.c: added translation context.


svn path=/trunk/; revision=27604
2008-11-10 19:40:34 +00:00
Martin Nordholts a9d1c12720 Bug 138101 – Pointer (Information) tab should display selection
bounds

* app/display/gimpcursorview.c: Show the position and size of the
bounding box of the selection in the active image using the unit
of the active image window.

(gimp_cursor_view_format_as_unit): Don't add the unit abbreviation
if the unit is px.

svn path=/trunk/; revision=27603
2008-11-10 18:43:26 +00:00
Martin Nordholts 60424fa0af Clean up and simplify little.
* app/display/gimpnavigationeditor.c: Clean up and simplify
little.

svn path=/trunk/; revision=27588
2008-11-09 20:01:44 +00:00
Martin Nordholts 9aded56913 Avoid critical warnings when converting an image window with a unit other
* app/display/gimpdisplayshell-scale.c
(gimp_display_shell_scale_update_rulers): Avoid critical warnings
when converting an image window with a unit other than pixels into
a the empty image window. Probably fixes some of the crashes
reported by Windows users.

svn path=/trunk/; revision=27586
2008-11-09 19:56:03 +00:00
Michael Natterer 069bbbd142 move GimpCursorView typedef from here...
2008-11-09  Michael Natterer  <mitch@gimp.org>

	* app/widgets/widgets-types.h: move GimpCursorView typedef from
	here...

	* app/display/display-types.h: ...to here.


svn path=/trunk/; revision=27585
2008-11-09 19:34:12 +00:00
Martin Nordholts 983c3751c2 Prepare GimpCursorView for a dependency to GimpDisplayShell.
* app/widgets/gimpcursorview.[ch]: Move from here...

* app/display/gimpcursorview.[ch]: ...to here.

* app/widgets/Makefile.am
* app/display/Makefile.am: Change accordingly.

* app/actions/cursor-info-actions.c
* app/dialogs/dialogs-constructors.c
* app/actions/cursor-info-commands.c
* app/display/gimpdisplayshell-cursor.c: Update includes.

svn path=/trunk/; revision=27581
2008-11-09 17:51:43 +00:00
Sven Neumann 02817081ff use NC_() to mark enum values for translation. Use a lower-case short form
2008-11-06  Sven Neumann  <sven@gimp.org>

	* tools/gimp-mkenums: use NC_() to mark enum values for 
translation.
	Use a lower-case short form of the type name as translation 
context.

	* libgimp/libgimp-intl.h: define the NC_() macro as noop.

	* libgimpbase/gimpbasetypes.[ch]
	* libgimpbase/gimpbase.def: added new functions to set and
	get a translation context on an enum type.

	* app/base/Makefile.am
	* app/core/Makefile.am
	* app/display/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* app/text/Makefile.am
	* app/tools/Makefile.am
	* app/widgets/Makefile.am
	* libgimp/Makefile.am
	* libgimpbase/Makefile.am:
	* libgimpconfig/Makefile.am
	* libgimpthumb/Makefile.am
	* libgimpwidgets/Makefile.am: register the translation context
	with the enum types.

	* app/display/display-enums.h
	* libgimpbase/gimpbaseenums.h
	* libgimpconfig/gimpcolorconfig-enums.h: removed old-style 
explicit
	translation context.

	* app/base/base-enums.c
	* app/core/core-enums.c
	* app/display/display-enums.c
	* app/paint/paint-enums.c
	* app/plug-in/plug-in-enums.c
	* app/text/text-enums.c
	* app/tools/tools-enums.c
	* app/widgets/widgets-enums.c
	* libgimpbase/gimpbaseenums.c
	* libgimpconfig/gimpcolorconfig-enums.c
	* libgimpwidgets/gimpwidgetsenums.c: regenerated.


svn path=/trunk/; revision=27562
2008-11-06 08:28:28 +00:00
Sven Neumann a40525ac39 when dropping multiple images to the empty image window, open them as
2008-11-04  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-dnd.c
	(gimp_display_shell_drop_uri_list): when dropping multiple 
images
	to the empty image window, open them as seperate images.


svn path=/trunk/; revision=27554
2008-11-04 22:32:15 +00:00
Sven Neumann cc7222d8e4 added missing include.
2008-11-04  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplay-foreach.c: added missing include.

	* app/actions/debug-commands.c
	* plug-ins/common/lcms.c
	* plug-ins/common/mail.c
	* plug-ins/file-bmp/bmp-write.c
	* plug-ins/file-fits/fits.c
	* plug-ins/file-jpeg/jpeg.c
	* plug-ins/file-uri/uri.c
	* plug-ins/help/gimphelpdomain.c
	* plug-ins/ifs-compose/ifs-compose.c
	* plug-ins/print/print.c: fixed use of g_message() with literal
	strings.


svn path=/trunk/; revision=27551
2008-11-04 14:05:24 +00:00
Sven Neumann 4762b73403 bumped minimum required version of GLib to 2.18.0.
2008-11-04  Sven Neumann  <sven@sven>

	* configure.in: bumped minimum required version of GLib to 
2.18.0.

	* INSTALL: document the updated dependency.

	* app/core/gimp.[ch]: introduced gimp_message_literal(), a 
variant
	of gimp_message() that takes a literal string.

	* app/errors.[ch]: removed format arguments from 
gimp_fatal_error()
	and gimp_terminate() and let them take a literal string instead.

	* app/tools/gimptool.[ch]: introduced 
gimp_tool_message_literal(),
	a variant of gimp_tool_message() that takes a literal string.

	* app/actions/documents-commands.c
	* app/actions/drawable-commands.c
	* app/actions/edit-commands.c
	* app/actions/error-console-commands.c
	* app/actions/file-commands.c
	* app/actions/gradients-commands.c
	* app/actions/image-commands.c
	* app/actions/layers-commands.c
	* app/actions/palettes-commands.c
	* app/actions/plug-in-commands.c
	* app/actions/select-commands.c
	* app/actions/vectors-commands.c
	* app/config/gimprc.c
	* app/core/gimp-modules.c
	* app/core/gimp-parasites.c
	* app/core/gimp-templates.c
	* app/core/gimp-units.c
	* app/core/gimpchannel.c
	* app/core/gimpcontainer-filter.c
	* app/core/gimpdrawable-bucket-fill.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage.c
	* app/core/gimpimagefile.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimplayer.c
	* app/core/gimpselection.c
	* app/dialogs/convert-dialog.c
	* app/dialogs/dialogs.c
	* app/dialogs/palette-import-dialog.c
	* app/dialogs/preferences-dialog.c
	* app/dialogs/quit-dialog.c
	* app/dialogs/stroke-dialog.c
	* app/display/gimpdisplayshell-dnd.c
	* app/file/file-open.c
	* app/file/file-procedure.c
	* app/file/file-save.c
	* app/file/file-utils.c
	* app/gegl/gimpcurvesconfig.c
	* app/gegl/gimplevelsconfig.c
	* app/gui/gui-message.c
	* app/gui/gui.c
	* app/gui/session.c
	* app/paint/gimpbrushcore.c
	* app/paint/gimpclone.c
	* app/paint/gimpheal.c
	* app/paint/gimpperspectiveclone.c
	* app/paint/gimpsourcecore.c
	* app/pdb/gimppdb-utils.c
	* app/pdb/gimpprocedure.c
	* app/plug-in/gimpplugin-message.c
	* app/plug-in/gimpplugin.c
	* app/plug-in/gimppluginmanager-restore.c
	* app/plug-in/gimppluginprocedure.c
	* app/text/gimptextlayer.c
	* app/tools/gimp-tools.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpblendtool.c
	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpbucketfilltool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdesaturatetool.c
	* app/tools/gimpeditselectiontool.c
	* app/tools/gimpforegroundselecttool.c
	* app/tools/gimpfreeselecttool.c
	* app/tools/gimpgegltool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimpimagemaptool-settings.c
	* app/tools/gimpiscissorstool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimppainttool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpselectiontool.c
	* app/tools/gimpsourcetool.c
	* app/tools/gimpthresholdtool.c
	* app/tools/gimptransformtool.c
	* app/tools/gimpvectortool.c
	* app/widgets/gimpactionview.c
	* app/widgets/gimpcontrollerlist.c
	* app/widgets/gimpcontrollers.c
	* app/widgets/gimpdataeditor.c
	* app/widgets/gimpdevices.c
	* app/widgets/gimpdnd-xds.c
	* app/widgets/gimperrordialog.c
	* app/widgets/gimphelp.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimppdbdialog.c
	* app/widgets/gimpsettingsbox.c
	* app/widgets/gimpvectorstreeview.c
	* app/widgets/gimpwidgets-utils.c
	* app/xcf/xcf-load.c
	* tools/pdbgen/pdb/convert.pdb
	* tools/pdbgen/pdb/edit.pdb
	* tools/pdbgen/pdb/floating_sel.pdb
	* tools/pdbgen/pdb/image.pdb: use the _literal variants for
	g_set_error(), gimp_message() and gimp_tool_message().

	* app/pdb/convert-cmds.c
	* app/pdb/edit-cmds.c
	* app/pdb/floating-sel-cmds.c
	* app/pdb/image-cmds.c: regenerated.


svn path=/trunk/; revision=27548
2008-11-04 12:33:09 +00:00
Michael Natterer 87dc343b21 remove public functions get_tiles(), get_image(), get_image_type() and
2008-11-04  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpprojection.[ch]: remove public functions
	get_tiles(), get_image(), get_image_type() and get_bytes().

	* app/actions/debug-commands.c
	* app/actions/layers-commands.c
	* app/core/gimpprojection-construct.c
	* app/display/gimpdisplayshell-render.c
	* app/paint/gimppaintcore.c
	* tools/pdbgen/pdb/layer.pdb: use the GimpPickable API insatead.

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


svn path=/trunk/; revision=27547
2008-11-04 12:07:17 +00:00
Sven Neumann fe520925b7 app/base/Makefile.am app/core/Makefile.am app/display/Makefile.am
2008-11-03  Sven Neumann  <sven@gimp.org>

	
	* app/base/Makefile.am
	* app/core/Makefile.am
	* app/display/Makefile.am
	* app/paint/Makefile.am
	* app/plug-in/Makefile.am
	* app/text/Makefile.am
	* app/tools/Makefile.am
	* app/widgets/Makefile.am
	* libgimp/Makefile.am
	* libgimpbase/Makefile.am: 
	* libgimpconfig/Makefile.am
	* libgimpthumb/Makefile.am
	* libgimpwidgets/Makefile.am: micro-optimization in the 
generated
	enum registration code.

	* app/base/base-enums.c
	* app/core/core-enums.c
	* app/display/display-enums.c
	* app/paint/paint-enums.c
	* app/plug-in/plug-in-enums.c
	* app/text/text-enums.c
	* app/tools/tools-enums.c
	* app/widgets/widgets-enums.c
	* libgimpbase/gimpbaseenums.c
	* libgimpconfig/gimpcolorconfig-enums.c
	* libgimpwidgets/gimpwidgetsenums.c: regenerated.


svn path=/trunk/; revision=27538
2008-11-03 21:38:13 +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
Michael Natterer a748e3f58e add new functions gimp_get_image_iter(), display_iter() and
2008-11-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimp.[ch]: add new functions gimp_get_image_iter(),
	display_iter() and tool_info_iter().

	* app/tools/gimp-tools.c
	* app/tools/gimptexttool.c
	* app/tools/gimpvectortool.c
	* app/dialogs/quit-dialog.c
	* app/gui/gui.c
	* app/menus/windows-menu.c
	* app/actions/images-commands.c
	* app/actions/tools-actions.c
	* app/actions/windows-actions.c
	* app/actions/tool-options-commands.c
	* app/display/gimpdisplay.c
	* app/display/gimpdisplay-foreach.c
	* app/widgets/gimptoolbox.c
	* tools/pdbgen/pdb/image.pdb: use them here.

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


svn path=/trunk/; revision=27526
2008-11-02 21:34:14 +00:00
Michael Natterer d1ca165b4e add new functions gimp_image_get_layer_iter(), channel_iter() and
2008-11-02  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: add new functions
	gimp_image_get_layer_iter(), channel_iter() and vectors_iter()
	which return the GList inside the resp. GimpList.

	* app/actions/channels-actions.c
	* app/actions/layers-actions.c
	* app/actions/vectors-actions.c
	* app/core/gimpimage-convert.c
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-flip.c
	* app/core/gimpimage-item-list.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-resize.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage.c
	* app/core/gimpimage.h
	* app/core/gimpprojection-construct.c
	* app/display/gimpdisplayshell-draw.c
	* app/file/file-open.c
	* app/tools/gimpaligntool.c
	* app/tools/gimpdrawtool.c
	* app/vectors/gimpvectors-compat.c
	* app/vectors/gimpvectors-export.c
	* app/widgets/gimplayertreeview.c
	* app/xcf/xcf-save.c
	* tools/pdbgen/pdb/image.pdb: use the new functions instead of
	peeking both into the image and the list. Remove inclusions of
	"gimplist.h" or change them into "gimpcontainer.h" if needed.

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


svn path=/trunk/; revision=27524
2008-11-02 20:46:57 +00:00
Michael Natterer 106b09f5ae bail out instead of crashing if the tool has no display.
2008-10-31  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimptexttool.c (gimp_text_tool_key_press): bail out
	instead of crashing if the tool has no display.

	(gimp_text_tool_draw)
	(gimp_text_tool_draw_preedit)
	(gimp_text_tool_draw_selection)
	(gimp_text_tool_xy_to_offset): need to adjust all drawing and
	event coordinates by a possible negative offset between logical
	rectangle and ink rectangle (if the ink rectangle is larger than
	the logical one).

	* app/display/gimpdisplayshell-callbacks.c
	(gimp_display_shell_canvas_tool_events): continue normally if
	tool_manager_key_press_active() returns FALSE.


svn path=/trunk/; revision=27484
2008-10-30 23:13:24 +00:00
Martin Nordholts 31e64dace0 Bug 558215 – unit and zoom entries in Statusbar not visible
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_canvas_size_allocate): Don't try to be clever,
call gimp_display_shell_scaled() whenever the canvas size changes
so a newly created display shell gets updated properly.

svn path=/trunk/; revision=27469
2008-10-29 22:28:48 +00:00
Michael Natterer 68e6d7a610 Add some infrastructure for the on-canvas text editing GSoC project:
2008-10-26  Michael Natterer  <mitch@gimp.org>

	Add some infrastructure for the on-canvas text editing GSoC
	project:

	* app/tools/gimptoolcontrol.[ch]: add boolean wants_all_key_events
	member and API to set and get it.

	* app/tools/gimptool.[ch]: add GimpTool::get_popup() which returns
	the tool's context menu if it has one, or NULL otherwise.

	* app/tools/tool_manager.[ch]: add tool_manager_get_popup_active()
	wrapper.

	* app/display/gimpdisplayshell-callbacks.c: check if the tool has
	a popup menu and show it instead of the usual right-click menu.

	Also call the tool's key_press() unconditionally if it wants all
	key events, but this code needs more thinking.


svn path=/trunk/; revision=27416
2008-10-26 16:25:24 +00:00
Michael Natterer 6a7af472ea Bug 557870 – "Qmask" message popping up here and there
2008-10-25  Michael Natterer  <mitch@gimp.org>

	Bug 557870 – "Qmask" message popping up here and there

	* app/display/gimpdisplayshell-title.c
	(gimp_display_shell_format_title): use
	gimp_viewable_get_description() instead of gimp_object_get_name()
	for displaying the active drawable's name so the quick mask and
	the floating selection have the same names as in the
	layers/channels dialogs.


svn path=/trunk/; revision=27405
2008-10-25 15:29:35 +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
Michael Natterer 3b053f79fa don't #include "libgimpwidgets/gimpwidgets.h".
2008-10-23  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell.h: don't #include
	"libgimpwidgets/gimpwidgets.h".

	* app/display/gimpdisplayshell-draw.c
	* app/display/gimpdisplayshell-scale.c
	* app/tools/gimpeditselectiontool.c: include it here.


svn path=/trunk/; revision=27375
2008-10-23 09:42:55 +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
Martin Nordholts 2427cc5495 Bug 556804 – Zoom drop down doesn't update
* app/display/gimpdisplayshell-scale.c
* app/display/gimpdisplayshell-callbacks.c: Fix calls to
gimp_display_shell_scaled() when Resize window on zoom is enabled.

svn path=/trunk/; revision=27366
2008-10-22 19:02:00 +00:00
Michael Natterer dba9e0c5e8 add new functions gimp_image_get_layer_by_index(), _channel_by_index() and
2008-10-10  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: add new functions
	gimp_image_get_layer_by_index(), _channel_by_index() and
	_vectors_by_index().

	* app/core/gimpprojection-construct.c
	* app/display/gimpdisplayshell-layer-select.c
	* app/xcf/xcf-load.c: use them instead of looking the items up
	in image->container and casting the return value.


svn path=/trunk/; revision=27206
2008-10-10 11:45:00 +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
Michael Natterer 0e4a35a2d8 Remove the last code duplication from the undo system (or if not the last
2008-10-09  Michael Natterer  <mitch@gimp.org>

	Remove the last code duplication from the undo system (or if not
	the last then at least the most ugly):

	* app/core/gimpimage.[ch] (gimp_image_add_layer,channel,vectors):
	add "gboolean push_undo" parameter and add the item without
	touching undo if it's TRUE. Changed assertions from
	g_object_is_floating() to !gimp_item_is_attached() so they also
	take items from the undo stack and not only newly created ones.

	(gimp_image_remove_layer,channel,vectors): add "push_undo"
	parameter here too. Also add a "new_active" parameter where an
	optional new active item can be passed.

	(gimp_image_remove_layer,channel): these functions must not be
	called with push_undo=FALSE and a floating selection attached to
	the layer/channel. This can't currently happen; added warnings in
	case other code is changed and makes it happen anyway.

	* app/core/gimpchannelundo.c
	* app/core/gimplayerundo.c
	* app/vectors/gimpvectorsundo.c: use above functions to add/remove
	items instead of duplicating (parts of) their code. Pass
	push_undo=FALSE and the previously active item to the remove()
	functions.

	* app/actions/channels-commands.c
	* app/actions/edit-commands.c
	* app/actions/layers-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimp-edit.c
	* app/core/gimpchannelundo.c
	* app/core/gimpimage-crop.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-quick-mask.c
	* app/core/gimpimage-scale.c
	* app/core/gimplayer-floating-sel.c
	* app/core/gimplayerundo.c
	* app/core/gimpselection.c
	* app/core/gimptemplate.c
	* app/display/gimpdisplayshell-dnd.c
	* app/text/gimptext-compat.c
	* app/tools/gimptexttool.c
	* app/tools/gimpvectortool.c
	* app/vectors/gimpvectors-import.c
	* app/vectors/gimpvectorsundo.c
	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpitemtreeview.[ch]
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimpvectorstreeview.c
	* app/xcf/xcf-load.c
	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/paths.pdb: changed accordingly (pass TRUE
	unless it's a new image like when loading and XCF file).

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


svn path=/trunk/; revision=27200
2008-10-09 19:40:41 +00:00
Michael Natterer 62e7dcc640 reorder sections consistently. Remove redundant CFLAGS.
2008-10-07  Michael Natterer  <mitch@gimp.org>

	* app/*/Makefile.am: reorder sections consistently. Remove
	redundant CFLAGS.


svn path=/trunk/; revision=27163
2008-10-07 11:58:14 +00:00
Hans Breuer d94419a9fd updated include <string.h> for memcmp() include <string.h> for strcmp()
2008-10-03  Hans Breuer  <hans@breuer.org>

	* **/makefie.msc gimpdefs.msc app/gimpcore.def : updated
	* app/core/gimpcurve.c : include <string.h> for memcmp()
	* app/gegl/gimpcurvesconfig.c : include <string.h> for strcmp()

svn path=/trunk/; revision=27118
2008-10-03 19:27:54 +00:00
Sven Neumann 632b8d3fba bail out early if shell->display is NULL. Fixes crash reported on the
2008-10-03  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-scale.c
	(gimp_display_shell_scale_update_scrollbars)
	(gimp_display_shell_scale_update_rulers): bail out early if
	shell->display is NULL. Fixes crash reported on the 
mailing-list.


svn path=/trunk/; revision=27117
2008-10-03 19:20:46 +00:00
Martin Nordholts 259801e34e Bug 553534 – centering issues after image scaling and setting zoom
to 100%

* app/display/display-enums.h: Added a GimpZoomFocus enum with
'best guess', 'pointer' or 'image center' values.

* app/display/gimpdisplayshell-scale.[ch]
(gimp_display_shell_scale): Take a GimpZoomFocus parameter and
pass it on to

(gimp_display_shell_scale_get_zoom_focus): which returns the
requested zoom focus point if one was given, else makes a best
guess.

* app/actions/view-commands.c
* app/display/gimpstatusbar.c
* app/display/gimpnavigationeditor.c
* app/display/gimpdisplayshell-callbacks.c
* app/display/gimpdisplayshell-scale-dialog.c: For explicit-zoom
commands like "zoom to 100%", always use the image center as the
zoom focus point. For all other zooming, continue to use the
best-guess method.

* app/display/display-enums.c: Regenerated.

svn path=/trunk/; revision=27104
2008-10-02 14:53:35 +00:00
Martin Nordholts 958de4c297 Bug 554125 – Tab key doesn't hide utility windows when there is no
image open.
	
* app/widgets/gimpdialogfactory.[ch]: Add 'toggle_visibility' to
GimpDialogFactory and as a parameter to gimp_dialog_factory_new(),
and set it there.

(gimp_dialog_factories_hide_foreach): Don't hide dialogs belonging
to factories with toggle_visibility FALSE.

* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_canvas_tool_events): Move no-image event
handling to a new helper function, and make pressing Tab hide
windows.

* app/dialogs/dialogs.c (dialogs_init): Allow toggling visibility
for all factories except the display-factory.

svn path=/trunk/; revision=27077
2008-09-29 15:42:56 +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
Michael Natterer 4a91523321 use the new helper function here too.
2008-09-25  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell-dnd.c
	(gimp_display_shell_drop_pixbuf): use the new helper function here
	too.


svn path=/trunk/; revision=27060
2008-09-25 16:59:02 +00:00
Sven Neumann 92a5eec265 moved duplicate code to a helper function.
2008-09-25  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-dnd.c
	(gimp_display_shell_drop_component)
	(gimp_display_shell_drop_drawable): moved duplicate code to a
	helper function.


svn path=/trunk/; revision=27058
2008-09-25 15:41:57 +00:00
Michael Natterer 68c21b49e9 Revert the change which adds GError parameters to
2008-09-17  Michael Natterer  <mitch@gimp.org>

	Revert the change which adds GError parameters to
	gimp_image_add_{channel,layer,vectors}():

	* app/actions/channels-commands.c
	* app/actions/edit-commands.c
	* app/actions/layers-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimp-edit.c
	* app/core/gimpimage-duplicate.c
	* app/core/gimpimage-merge.c
	* app/core/gimpimage-quick-mask.c
	* app/core/gimpimage.[ch]
	* app/core/gimplayer-floating-sel.c
	* app/core/gimpselection.c
	* app/core/gimptemplate.c
	* app/display/gimpdisplayshell-dnd.c
	* app/text/gimptext-compat.c
	* app/tools/gimptexttool.c
	* app/tools/gimpvectortool.c
	* app/vectors/gimpvectors-import.c
	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpitemtreeview.[ch]
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimpvectorstreeview.c
	* app/xcf/xcf-load.c: revert.

	Instead, fix it at the PDB level:

	* app/core/gimpimage.c: turn the "added to wrong image" warning
	into a g_return_val_if_fail() assertion.

	* app/pdb/gimppdb-utils.[ch] (gimp_pdb_item_is_floating): add a
	"dest_image" parameter and fail if the passed item is not for this
	image.

	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/layer.pdb
	* tools/pdbgen/pdb/paths.pdb: pass the dest image to
	gimp_pdb_item_is_floating().

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


svn path=/trunk/; revision=26970
2008-09-17 11:41:54 +00:00
Michael Natterer b0dab70de8 add GError parameter to gimp_image_add_{channel,layer,vectors}() and
2008-09-17  Michael Natterer  <mitch@gimp.org>

	* app/core/gimpimage.[ch]: add GError parameter to
	gimp_image_add_{channel,layer,vectors}() and remove calls to
	g_warning(). Changed checks to be possible failures at all.

	* app/widgets/gimpitemtreeview.h (GimpAddItemFunc): add the GError
	here too.

	* app/actions/channels-commands.c
	* app/actions/edit-commands.c
	* app/actions/layers-commands.c
	* app/actions/vectors-commands.c
	* app/core/gimp-edit.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/core/gimptemplate.c
	* app/display/gimpdisplayshell-dnd.c
	* app/text/gimptext-compat.c
	* app/tools/gimptexttool.c
	* app/tools/gimpvectortool.c
	* app/vectors/gimpvectors-import.c
	* app/widgets/gimpchanneltreeview.c
	* app/widgets/gimpitemtreeview.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptoolbox-dnd.c
	* app/widgets/gimpvectorstreeview.c
	* app/xcf/xcf-load.c: pass a NULL error.

	* tools/pdbgen/pdb/image.pdb
	* tools/pdbgen/pdb/paths.pdb: pass the error.

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


svn path=/trunk/; revision=26963
2008-09-17 08:27:35 +00:00
Sven Neumann 8172ba88a1 improved the new DND code.
2008-09-04  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-dnd.c: improved the new DND code.


svn path=/trunk/; revision=26867
2008-09-04 18:14:56 +00:00
Sven Neumann 05e7e9dc54 handle drops on the empty image window.
2008-09-04  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell-dnd.c
	(gimp_display_shell_drop_drawable) 
(gimp_display_shell_drop_pixbuf):
	handle drops on the empty image window.


svn path=/trunk/; revision=26864
2008-09-04 15:45:23 +00:00
Sven Neumann 8ec1d65a4a removed trailing whitespace
svn path=/trunk/; revision=26852
2008-09-04 08:37:32 +00:00
Michael Natterer 435f6e3974 app/display/gimpdisplayshell-callbacks.c libgimpwidgets/gimpcolorselect.c
2008-09-03  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell-callbacks.c
	* libgimpwidgets/gimpcolorselect.c
	* modules/color-selector-water.c
	* plug-ins/ifs-compose/ifs-compose.c: instead of using
	gdk_window_get_pointer() if GdkEventMotion::is_hint is TRUE,
	simply always use the coords from the event and call
	gdk_event_request_motions() to ask for more motion events. This is
	the recommended way and also works for events from devices other
	than the core pointer.

	* plug-ins/ifs-compose/ifs-compose.c (design_area_motion): some
	code cleanup while i was at it.


svn path=/trunk/; revision=26843
2008-09-03 19:24:51 +00:00
Michael Natterer 9d18f2aa9e use gtk_widget_get_style() instead of widget->style.
2008-09-02  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpstatusbar.c: use gtk_widget_get_style() instead
	of widget->style.


svn path=/trunk/; revision=26837
2008-09-02 12:55:46 +00:00
Martin Nordholts 1d7e141c2d We need to set the scale before using it. Fixes at least
2008-08-31  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-scale.c
	(gimp_display_shell_set_initial_scale): We need to set the scale
	before using it. Fixes at least gimp_display_shell_fill() and
	Image -> Duplicate giving weird initial scales.

svn path=/trunk/; revision=26823
2008-08-31 09:12:55 +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
Martin Nordholts 3cfd2a33c0 Canonically calculate scale to use for zoom-focus calculations so that it
2008-08-28  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-scale.c
	(gimp_display_shell_scale_to): Canonically calculate scale to use
	for zoom-focus calculations so that it also works when not in Dot
	by dot-mode.

svn path=/trunk/; revision=26805
2008-08-28 19:35:14 +00:00
Martin Nordholts 2975f815a8 Make the size-changed-detailed signal also contain previous image size.
2008-08-28  Martin Nordholts  <martinn@svn.gnome.org>

	* app/core/gimpimage.[ch]: Make the size-changed-detailed signal
	also contain previous image size.

	* app/display/gimpdisplayshell-handlers.c
	(gimp_display_shell_size_changed_detailed_handler): Take the
	previous image size into account and center the image if it starts
	to fit (axis indepentently) in the viewport due to the resize.

	* app/core/gimpundo.h
	* app/core/gimpimage-undo.c
	* app/core/gimpimageundo.[ch]
	* app/core/gimpimage-undo-push.[ch]: Manage the
	previous-size-information.

	* app/core/gimpimage-crop.c
	* app/core/gimpimage-scale.c
	* app/core/gimpimage-rotate.c
	* app/core/gimpimage-resize.c: Propagate previous size to the
	size-changed-detailed signal emission and the undo-system.

svn path=/trunk/; revision=26804
2008-08-28 19:12:03 +00:00
Martin Nordholts b5b51b475f libgimpwidgets/gimpwidgets.c
2008-08-26  Martin Nordholts  <martinn@svn.gnome.org>

	* libgimpwidgets/gimpwidgets.c

	* plug-ins/common/file-xbm.c
	* plug-ins/common/file-wmf.c
	* plug-ins/common/file-svg.c
	* plug-ins/common/file-gih.c
	* plug-ins/common/blur-motion.c
	* plug-ins/file-jpeg/jpeg-save.c
	* plug-ins/lighting/lighting-ui.c
	* plug-ins/map-object/map-object-ui.c

	* app/tools/gimpsheartool.c
	* app/tools/gimpaligntool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimplevelstool.c
	* app/dialogs/resize-dialog.c
	* app/dialogs/offset-dialog.c
	* app/widgets/gimppaletteeditor.c
	* app/widgets/gimpcolormapeditor.c
	* app/dialogs/layer-options-dialog.c
	* app/display/gimpdisplayshell-scale-dialog.c: Pass page_size = 0
	to gimp_spin_button_new() to adapt to new and correct value
	clamping in GTK+.

svn path=/trunk/; revision=26778
2008-08-26 19:32:14 +00:00
Martin Nordholts d9e5942ec6 Fix stupid slip-up in my last commit
svn path=/trunk/; revision=26777
2008-08-26 18:59:23 +00:00
Martin Nordholts dd672dde70 New function.
2008-08-26  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-scroll.c
	(gimp_display_shell_scroll_unoverscrollify): New function.

	* app/display/gimpdisplayshell-autoscroll.c
	(gimp_display_shell_autoscroll_timeout): Make sure the autoscroll
	does not result in overscroll. This more or less finalizes the
	implementation of the enhancement request in bug #362915.

svn path=/trunk/; revision=26775
2008-08-26 18:50:54 +00:00
Martin Nordholts ad693bbf9e If no scroll should be applied we can return early.
2008-08-26  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-scroll.c
	(gimp_display_shell_scroll): If no scroll should be applied we can
	return early.

svn path=/trunk/; revision=26774
2008-08-26 17:53:54 +00:00
Martin Nordholts fb56170667 Pass the scroll amount in variables that we can modify as we please before
2008-08-26  Martin Nordholts  <martinn@svn.gnome.org>

	* app/display/gimpdisplayshell-autoscroll.c
	(gimp_display_shell_autoscroll_timeout): Pass the scroll amount in
	variables that we can modify as we please before they actually
	reach gimp_display_shell_scroll().

svn path=/trunk/; revision=26773
2008-08-26 17:47:30 +00:00