Current code only guess resolution for a single monitor. Ideally
the widget sizes could be different depending on the window where a
given widget is on. But that's a start.
The function has been unused since commit b5cc2a9.
Its work is now divided into gimp_tool_palette_set_toolbox() and
gimp_tool_palette_hierarchy_changed().
Allow overriding icon sizes set in themes from the preferences.
This initial commit updates only toolbox icons. More to come.
4 options are available: small, medium, large and huge (the later would
likely be useful for HiDPI screens).
Uses a new widget GimpIconSizeScale.
...after entering single window mode
In GimpToolPalette, implement GtkWidget::hierarchy_changed() and
re-set the tooltips using the new toplevel's actions.
In gimp_widget_set_accel_help(), make sure we don't connect to the
same action twice, and make sure we disconnect everything if either
the widget or the accel_group go away.
... starting with toolbox buttons.
This is particularly a problem in single window mode (and sometimes in
multi-window mode) where canvas easily loses focus, hence key events.
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.
Set the dock window's geometry hints after the tool palette's style is
known, not after the toolbox' style is known, so we get the right tool
button dimensions for minimum size and size increments.
Make GimpToolbox and GimpToolPalette use the GimpUIManager and
GimpDialogFactory of the top container instead of holding references
on their own. If they hold references on their own, we need to update
these when we move e.g. GimpToolbox between different top level
containers such as GimpDockWindow and GimpImageWindow. Failure to do
this cased problems talked about in bug 646794 (case 2).