Commit Graph

10 Commits

Author SHA1 Message Date
Michael Natterer 843866e7e7 app: make things behave more reasonable with multiple monitors
There is now a preference option that determines whether windows
should be opened on the same monitor as before. It should be disabled
when the machine gets monitors plugged/unplugged dynamically ("laptop")
and enabled when there is a static multi-monitor setup ("wokstation").
This is merely the current simplistic policy on top of the newly added
underlying infrastructure:

- pass integer monitor numbers around in all places where we already
  pass around a GdkScreen. Pass the "current" monitor to these changed
  APIs, where "current" is either the monitor where the action-triggering
  widget is, or if that is unavailable the monitor where the mouse is.

- add gimp_widget_get_monitor() in order to easily get to the monitor,
  just like gtk_widget_get_screen().

- add screen and monitor parameters in some places that were missed
  before.

- in sessionrc, save all window positions relative to the window's
  monitor, and save the monitor separately, if it's not the screen's
  primary monitor.

- when restoring window positions, use the stored monitor when the new
  prefs options says so (use the screen's primary monitor if there is
  no stored monitor), otherwise use current monitor that is now passed
  around.
2014-05-02 03:01:23 +02:00
Michael Natterer 25cc5922b6 app: add gimp_tool_gui_set_focus_on_map() and use it 2013-06-08 15:34:23 +02:00
Michael Natterer 1982cf1db7 app: add gimp_tool_gui_set,get_overlay()
which allow to toggle embedded and dialog style gui.
2013-06-08 01:32:34 +02:00
Michael Natterer ad8d12ed69 app: add "response" signal to GimpToolGui
and connect to it instead of to gimp_tool_gui_get_dialog()'s signal.
One more step towards on-the-fly embedding/detaching.
2013-06-07 23:45:11 +02:00
Michael Natterer 0afa7d30f0 app: add gimp_tool_gui_set_description() and use it 2013-06-07 17:01:39 +02:00
Michael Natterer 9a811d276e app: add gimp_tool_gui_set_alternative_button_order() and use it
Also make some of GimpToolGui's memory management proper, there was
no leak but it needs to be proper in order to add runtime switching
between dialog and overlay.
2013-06-07 15:18:24 +02:00
Michael Natterer 88387d6e8d app: remove the "shell" parameter from gimp_tool_dialog_new() and gui_new() 2013-06-07 12:19:42 +02:00
Michael Natterer 60b7dc15f1 app: add gimp_tool_gui_set_default_response() 2013-06-07 11:39:24 +02:00
Michael Natterer 761ddf0835 app: add gimp_tool_gui_set_response_sensitive() 2013-06-07 11:02:42 +02:00
Michael Natterer 2876e43d00 app: add new helper object GimpToolGui
which delegates a tool's dialog to either a GimpToolDialog or an
embedded GimpOverlayDialog.
2013-06-07 10:24:51 +02:00