Commit Graph

1906 Commits

Author SHA1 Message Date
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