Commit Graph

32 Commits

Author SHA1 Message Date
Michael Natterer a3c65e6d17 app: get rid of including menus/ stuff from widgets/ and other places
Add GimpMenuFactory can always be found in a GimpDialogManager, use
gimp_dialog_factory_get_menu_factory() where we have a dialog factory
instead of accessing "global_menu_factory" or redundantly passing a
menu factory around where we already pass around a dialog factory.
2016-11-23 19:38:44 +01:00
Michael Natterer cbf2311134 app: make new images jump around much less
Implement a mechanism to suspend/resume GimpImageWindow's "keep canvas
pos" logic which is used to keep the image in place across widget
changed such as show/hide rulers.

gimp_display_shell_fill(): call suspend()/resume() around
gimp_display_shell_appearance_update(), and center the image after
calculating the initial scale factor, so the image jumping at least
starts at the approximately right position.
2016-01-11 01:50:29 +01:00
Michael Natterer 7f23fbec34 app: add screen and monitor to all display and image window constructors
so they appear on the proper monitor as well.
2014-05-02 20:21:41 +02:00
Jehan 816f651b82 Bug 675436 - Tabs always present when docks shown and absent when docks hidden
The main change is that even with only 1 image in single window mode,
there is now a tab.
Also whatever the number of images when you hide docks with Tab, no tabs
are shown.
2013-07-22 01:19:32 +09:00
Michael Henning 89760cf044 app: Save the maximized state of the main window in the sessionrc file. 2012-05-27 20:42:02 +02:00
Martin Nordholts 3ce4c49314 app: Handle special case "Toolbox" in GimpSingleWindowStrategy
The special case isn't pretty, but the current design can't handle it
nicely. This is not the first special case for the toolbox.
2011-07-20 16:36:36 +02:00
Martin Nordholts 07556242b0 app: Make positioning of new dockables depend on window mode
Add GimpWindowingStrategy with create_dockable_dialog() and use it in
dialogs_create_dockable_cmd_callback(). There are two implementations:
GimpSingleWindowStrategy and GimpMultiWindowStrategy. Depending on the
window mode, we want new dockables to appear in different places when
created. In single-window mode, they should appear inside the single
image window. In multi-window mode, a new dock window is created.
2011-07-03 21:20:36 +02:00
Martin Nordholts 78ddb19347 app: Keep canvas position on all display shell widgets
Don't use gimp_image_window_keep_canvas_pos() only for docks, use it
for all widgets in the display shell: the rulers, the menu bar, the
statusbar and the scrollbars. It is not really necessary for the two
latter ones because they are below and/or to the right of the canvas,
but we include them for completeness. Plus, they might get moved
around some day...
2010-02-28 15:22:56 +01:00
Martin Nordholts 82a0b95147 app: Update image window side docks visiblity from the image window
Update image window side docks visiblity from the image window itself
instead of from the ui configurer. The image window has a dependency
to the config object anyway, so no need to complicate things.
2010-02-24 19:53:48 +01:00
Martin Nordholts bf830398a5 app: Cleanup GimpImageWindow and dependencies, only one dialog factory
Cleanup GimpImageWindow and dependencies like GimpDisplay, there is
only one dialog factory now.
2010-02-20 11:09:51 +01:00
Martin Nordholts f3235e6f45 app: Add "dock-factory" property to GimpImageWindow
With the introduction of a single-window mode, not only dock windows
needs to be able to create docks, the image window also needs to. So
give it a "dock-factory" property.
2009-12-08 19:49:13 +01:00
Martin Nordholts fdf2454666 app: Add gimp_image_window_new/destroy()
Add gimp_image_window_new/destroy() so we have a central place where
the Gimp::image_windows list is managed.
2009-10-25 22:02:38 +01:00
Martin Nordholts 19baff1a50 app: Add gimp_image_window_get_shell() 2009-10-25 21:57:14 +01:00
Martin Nordholts 676e7f8c31 app: Formating 2009-10-09 20:04:56 +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 d1958a5103 app: Add GimpDockColumns to the left and right of a GimpImageWindow 2009-10-04 02:10:11 +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 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 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 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 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 e9c7b47284 Add "display-factory" construct-only property of type GimpDialogFactory 2009-09-28 22:55:43 +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 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 1823494122 Keep the main_vbox around in the GimpImageWindow struct (temp hack) 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 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