Commit Graph

20 Commits

Author SHA1 Message Date
Michael Natterer fbfaa960e1 Bug 705797 - Empty right panel cannot be completely closed
Reduce the minimum width of the "You can drop foo here" label to one
pixel, so it can be hidden as completely as possible while keeping the
label visible.
2013-11-03 16:04:58 +01:00
Michael Natterer 74bc070147 Bug 635303 - Can't attach a dialog at the bottom of a minimized toolbox
Ensure a minimum size of the drop area and make sure it stays visible
at the bottom of a minimized toolbox. This wastes a few pixels at the
bottom of a toolbox that contains no dockables.
2012-10-07 19:49:33 +02:00
Michael Natterer 573faa39b0 Bug 669795 - Toolbox can't be shrinked to 1 or 2 columns
Reduce the requested width of the "You can drop foo here" label to 16
pixels, which makes is look a bit crappy, but at least the toolbox
becomes shrinkable to < 3 columns. Whoever keeps this empty space
around without using it shall henceforth be punished by having to see
that distorted and misplaced label.
2012-07-30 18:04:27 +02:00
Michael Natterer 867da8f293 app: add gimp_context_get_foreground,background_pixel()
which takes a Babl format to convert from/to.
Include <gegl.h> in a million places.
2012-05-02 17:50:41 +02:00
Michael Natterer 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
Michael Natterer 42a5f8f834 Bug 666065 - "you can drop dockable dialog" of the toolbox
Set the height request of the "You can drop dockable dialogs here"
label to 0, so the toolbox can be properly resized to its minimum
again.
2011-12-16 09:40:54 +01:00
Michael Natterer 11239c4b17 app: don't use g_list_length() to check if a list is empty 2011-10-09 00:27:53 +02:00
Michael Natterer 2c175b068d libgimpwidgets: add gtk_paned_new() to gimp3migration.[ch]
and use it all over the place.
2011-10-02 14:36:42 +02:00
Martin Nordholts c0208e70c0 app: Resurrect "You can drop dockable dialogs here"
Resurrect the help string "You can drop dockable dialogs here" inside
GimpPanedBox. It got killed when we removed GimpDockSeparator.
2011-08-16 22:33:39 +02:00
Michael Natterer 1e013e774c app: some cleanup in gimp_paned_box_position_drop_indicator() 2010-12-18 23:28:20 +01:00
Michael Natterer de3a5896f3 app: remove the children manually in dispose() for the reason below 2010-06-26 23:26:00 +02:00
Michael Natterer b43be361ff app: add a forgotten g_object_unref()
so all dockables are destroyed when a dock is destroyed.
2010-06-23 22:50:45 +02:00
Martin Nordholts 11b1300b6f app: Introduce gimp_dialog_factory_get_singleton()
Instead of including dialogs/dialogs.h everywhere, introduce
gimp_dialog_factory_get_singleton(). The dialog factory singleton is
still initialized by dialogs.c though.

Right now the assumption is that we never will have another dialog
factory instance around. There were so many problems before when we
had four of them, so let's just keep one of them around.
2010-02-28 23:23:24 +01:00
Martin Nordholts ba37aaa532 app: Support multi-column DnD in toolbox window
Add a drag handler to the toolbox so it's possible to create
multi-column docks in the toolbox dock window.
2010-01-22 20:48:34 +01:00
Martin Nordholts ef6bd20c3b app: When paned widget is removed, clear drag handler
When paned widget is removed, clear drag handler. Not clearing was a
copy and paste mistake.
2009-12-17 19:51:13 +01:00
Martin Nordholts 7b85cf4de8 app: Use a GdkWindow instead of GimpDockSeparators for dockable DND
Make drag-and-drop rearrangement of dockables happen directly in the
existing widget hierarchy so we don't have to use special, ugly
widgets (read GimpDockSeparator:s) for that.

More specifically, make edges of dockables and dockbooks have the same
semantics as the GimpDockSeparators had. We put a highlight colored
GdkWindow on top of the widget in question to highlight these special
drop areas. This GdkWindow is not taken into consideration in the GTK+
drag-and-drop code, so it does not interupt the DND interaction.

To achive this, there is a problem we must solve: Drag events in GTK+
are propagated inwards and out, but we sometimes want ancenstor
widgets to take care of drop events. We solve this by introducing the
concept of "drag handlers". A drag handler is asked if it will handle
a given drag event, and if it will, a client will let the drag event
be propagated upwards in the widget hierarchy. Right now, the
GimpPanedBox is the only "drag handler". The code could be generalized
more but it doesn't feel worth it at this point.

The size of the special drop area is 5px, the same size as the default
GtkPaned handles. This is because the plan is to later use these
handles as drop areas too.

Other changes of interest are:
 * We need to take care of "drag-motion", "drag-drop" and widget
   highlightning ourselves. We can not use the GtkDestDefaults
   conveniences with gtk_drag_dest_set() any longer since we need more
   control.
 * Make the drop callback pass the insert index directly instead of a
   GimpDockSeparator
 * Add some GIMP_LOG() debug output for DND
 * Disable the GimpDockSeparator code in GimpToolbox
2009-11-29 18:22:12 +01:00
Martin Nordholts 9ea1d490a4 app: Make gimp_paned_box_remove_widget() more destruction friendly
When closing a GimpDockWindow, the GtkBox code might already have
removed the widget. In that case we don't need to do anything.
2009-11-29 15:07:40 +01:00
Martin Nordholts 4bd2230a55 app: Chain up GimpPanedBox::finalize() 2009-10-24 20:33:09 +02:00
Martin Nordholts b700f219de app: Make created GtkPaned subclass depend on GimpPanedBox orientation 2009-10-24 20:08:08 +02:00
Martin Nordholts eb9b365864 app: Add GimpPanedBox
Add a new class GimpPanedBox that wraps the arrangement of widgets
into GtkPaned hierarchies. It takes over the separator management from
GimpDock and the GtkPaned management from
gimpwidgets-utils.[ch]. GimpPanedBox can be both vertically and
horizontally oriented.

Change GimpDock to use this widget and make some other minor
adaptations.
2009-10-24 18:53:46 +02:00