Commit Graph

173 Commits

Author SHA1 Message Date
6008c2019b Bug 664584: WM DELETE event in single window mode is synonym to file-quit.
In multi-window mode, closing an image window is only meant to close
the current image (unless this is the last empty window).
In single window mode though, you are meaning to close the whole program.

Thanks to Niels Martignène for the original patch.
2013-05-12 04:56:15 +09:00
3972da5256 app: add signal GimpDisplayShell::rotated and use it to update the menu 2013-04-21 03:15:22 +02:00
5880685472 Bug 675549 - image region does not have focus unless clicked on
We cannot simply randomy move the focus from e.g. a text entry back to
the canvas. Instead introduce global handling of "Escape" and a
"primary_focus_widget" that is always set the the image window's
active canvas. When Escape is pressed, move the focus to that primary
focus widget, or beep if it is already there. Text widgets still get
the key events before that logic and can consume the Escape.
2013-04-09 15:41:20 +02:00
0884880579 app: small indentation fix in GimpImageWindow 2013-03-10 19:55:48 +01:00
9da0f489e1 Bug 694665 - SWM should distribute remaining space to main frame
Save the "right-docks-position" as negative value in pixels from the
right window border. Change the image window restoring code to
interpret negative values like that, but keep the meaning of positive
values for compatibility with existing sessionrc files.
2013-02-27 23:46:00 +01:00
a907741d8a Bug 692900 - Dragging left canvas border doesn't respect dock borders
Don't allow the single window's docks to shrink smaller than their
requisition, because that's horribly broken.
2013-02-06 23:27:37 +01:00
d4c72cd5ab Bug 595708 - WM_WINDOW_ROLE should be unique
Make the roles of toolbox, dock and image window unique by adding a
serial number, resulting in e.g. gimp-dock-1.
2012-10-07 18:16:35 +02:00
3084c8be7a Bug 684785 - typo in log message
Apply patch from Okano Takayoshi that fixes the typo.
2012-09-25 22:01:31 +02:00
2c54f4b340 Bug 679256 - SWM image tabs must have a minimum width
Set all tabs to the same width so very narrow images' tabs stay
clickable.
2012-07-09 22:53:17 +02:00
89760cf044 app: Save the maximized state of the main window in the sessionrc file. 2012-05-27 20:42:02 +02:00
c1cfe98d35 Bug 676522 - Changing tabs in single-window-mode should switch the active image
Change the active image when switching tabs in single-window-mode.
2012-05-23 01:25:22 +02:00
fbd746f95a app: don't rely on gtk_container_remove() to always destroy the child
Instead, either destroy the child instead of removing it, or remove
*and* destroy it in cases where the remove() api on the "parent"
doesn't match GTK+'s parent/child relation (like with all our dock
widgets). We can't rely on remove() to implicitly detstroy, because
there might be arbitrary other code holding references, such as
accessibility modules and whatnot. Most likely fixes unclear crashes
in accessibility code and other crashes we blamed GTK+ for.
2012-02-21 00:36:18 +01:00
b3c8cbd5a5 app: remove all docks from GimpImageWindow in dispose()
Seems to fix irregularly occuring warnings on exit about dialogs
being still around.
2012-02-13 00:12:50 +01:00
c2d26d7e03 app: Keep canvas in place when image tabs show/hide 2012-01-04 22:09:07 +02:00
2c175b068d libgimpwidgets: add gtk_paned_new() to gimp3migration.[ch]
and use it all over the place.
2011-10-02 14:36:42 +02:00
3e336199b9 app: use gtk_box_new() 2011-09-30 11:29:11 +02:00
ed00cff9d3 app: don't use image_window->menubar if it's NULL 2011-09-16 23:24:49 +02:00
9cfa0a5dde app: use a smaller icon for the image tabs' close button
Also make sure the visibility of the icon doesn't depend on
GTK+ settings by packing it manually.
2011-09-15 09:04:38 +02:00
a11989542a app: Add a close button to image window tabs
It takes a bit more space, but it needs to be easy to close images.
2011-08-24 23:02:19 +02:00
b9ccf189b4 Bug 650348 - Window unmaximizes when a document is closed
Refactor GimpImageWindow session management. As far as session
management goes, there are four states and four transitions that are
interesting.

The states are:

 State    Window mode     Images opened
 ------------------------------------------
  s1          swm               0
  s2          swm              >0
  s3          mwm               0
  s4          mwm              >0

The transitions are:

  Transition     Description
 -------------------------------------------
      t1         Enter single-window mode (swm)
      t2         Enter multi-window mwm (mwm)
      t3         Open an image
      t4         Close an image

When thinking of it like this, it is pretty easy to see when to call
gimp_image_window_session_clear() and when to call
gimp_image_window_session_apply(). So kill
gimp_image_window_set_entry_id() and handle all transitions in
gimp_image_window_session_update().
2011-08-09 20:25:06 +02:00
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
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
bb39703c7a app: Update appearance after adding dock
Since gimp_display_shell_appearance_update() depends on docks being
present, call it in gimp_image_window_add_dock(). Otherwise the resize
handle will be present when starting in single-window mode.
2011-06-06 16:07:25 +02:00
42c2c747d8 Bug 603848 - Single-window mode is not properly session managed yet
Make GimpImageWindow implement GimpDockContainer and
GimpSessionManaged so that GIMP can be started in single-window mode.
2011-06-04 12:22:20 +02:00
75259bf4bb app: Call gimp_image_window_session_update() early
Call gimp_image_window_session_update() at the end of
gimp_image_window_constructed() so that if GIMP is closed right after
being started, the image window session info has the widget
initialized (and also so that the correct size is setup initially).
2011-06-04 12:22:20 +02:00
1ebd2b5113 Revert "app: Make alt+[number] switch tabs in single-window mode"
This reverts commit 110b3daa97.
2011-05-07 23:54:54 +02:00
c35ff719a7 app/libgimp*: remove stuff found by -Wunused-but-set-variable 2011-05-01 23:23:19 +02:00
5c55f8e897 app: Fix Alt+0 case when switching tabs 2011-04-06 11:58:58 +05:30
110b3daa97 app: Make alt+[number] switch tabs in single-window mode 2011-04-06 11:52:10 +05:30
166c76b62d Bug 630069 - In single-window mode, canvas badly positioned in all successive tabs
The problem is that gimp_image_window_keep_canvas_pos() connects a
signal handler too early, with data not yet valid, the handler is
executed after the canvas position is computed correctly and so
invalid data overrides the valid.

Checks the return value of gtk_widget_translate_coordinates() to avoid
connecting handlers when their execution is considered harmful.
2011-03-09 07:34:27 +01:00
145db8d57c Bug 639305 - Image tabs pushes toolbox to left
Set the notebook to scrollable. Not a final fix, but enough to fix the
immediate problem.
2011-03-01 00:56:23 +01:00
c09ad998a4 app: split tool event handling out into an own file
it was simply getting too hairy in the callbacks.c file.
2011-02-24 02:15:53 +01:00
bbe0e757b8 app: some GimpImageWindow cleanup
- implement GObject::constructed() instead of ::construct()
- remove the display pause/resume idle hack because any tool
  drawing flickering is gone now by using cairo
- some formatting cleanup
- remove some unused local variables
2010-11-26 09:19:36 +01:00
0e17e44ba4 app: move code from GtkObject::destroy() to GObject::dispose() 2010-09-26 22:35:49 +02:00
ddc63de6d6 app: remove "gboolean use_offsets" from gimpdisplayshell-transform.[ch] 2010-09-23 19:24:04 +02:00
8b31211639 Fix the bulid after GtkNotebookPage got deprecated in gtk-2-22
In all GtkNotebook::switch_page() callbacks, simply replace
GtkNotebookPage* by gpointer.
2010-07-16 15:24:25 +02:00
39c7405954 app: disconnect from the dialog factory in dispose() instead of finalize() 2010-06-24 18:38:18 +02:00
cf1cc6dc6f app: private->shells might be a list with one element upon destroy; free it 2010-06-22 23:06:35 +02:00
ab6d5553d9 app: Don't unmaximize image window when switching tabs in swm
It is when we apply session info to the image window we unmaximize, so
don't apply session info to the image window when all we do is
switching tabs in single-window mode.
2010-06-19 11:08:17 +02:00
1ca7c6df50 Bug 613841 - Reducing toolbox width in single window mode
Allow to resize left and right dock areas arbitrarilly small.
2010-05-15 20:55:29 +02:00
a2c70822d4 Use accessors from GTK+ 2.20 instead of using sealed members directly 2010-04-19 19:21:07 +02:00
0c4409c897 app: Session manage empty- and single-image window separately
Session manage empty- and single-image window separately. So when
starting up, the default 2.6 UI is the same. But when enabling
single-window mode, the image window will become much larger then the
empty-image window. These conceptually different windows will then
from that point be session managed separately: switching mode switches
size of the image window.
2010-03-13 16:35:57 +01:00
77dab5257e app: Introduce image window session utility functions
Introduce image window session utility functions
gimp_image_window_session_clear() and
gimp_image_window_session_apply().
2010-03-13 12:56:27 +01:00
e6fa0c65c2 app: Simplify GimpImageWindow session management
Refactor session management with the "gimp-empty-image-window" in
GimpImageWindow. In particular, only have one entry point to
gimp_dialog_factory_add_foreign() and remove the is_empty instance
struct member.
2010-03-13 12:41:06 +01:00
d44ee9e2c4 app: Update Windows->Toolbox menu entry depending on if toolbox exists
Update Windows->Toolbox menu entry depending on if toolbox exists. If
an existing toolbox will be raised, set "Toolbox". If it will create a
new toolbox, set "New Toolbox". We need this special treatment since
there can be only one toolbox, so "New Toolbox" will remove any
toolbox docks from Recently Closed Docks. If we would just have
"Toolbox" it could be misinterpreted as "get me the toolbox I just
closed".
2010-03-07 12:24:26 +01:00
1aeb315ecf undef GTK_DISABLE_DEPRECATED in many places which undef GSEAL_ENABLE
because the widget flag access macros (e.g. GTK_WIDGET_REALIZED) are
now deprecated in GTK+ master.
2010-03-06 23:14:29 +01:00
6647c495f3 app: Store GimpDialogsState per dialog factory
Get rid of the file-static variable 'dialogs_state' from
gimpdialogfactory.c and move it into the GimpDialogFactory struct.
2010-02-28 18:48:39 +01:00
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
2c0573d6cd app: gimp_image_window_keep_canvas_pos() should work in canvas coords
gimp_image_window_keep_canvas_pos() should to work in GimpCanvas
coordinates, not GimpDisplayShell coordinates.
2010-02-28 15:22:56 +01:00
ed5830fb7b app: Pause tool drawing while hiding docks in single-window mode
Freeze the active tool until the UI has stabilized. If it draws while
we hide widgets there will be flicker. See bug 602223.
2010-02-25 22:08:57 +01:00