Robin Gareus
cbf5f3d622
Fix crash when changing Pane widgets -- #7198
...
Gtkmm2Ext::Pane::on_add() uses a pointer to a std::vector<> element
in the destroy notify callback. If the vector is modified, that pointer
becomes invalid.
Add 2 widgets "A", "B". remove "B", add another one "C".
Now if A is destroyed, notify_child_destroyed(PTR) points to
invalid memory and not to "A".
2017-01-08 12:39:07 +01:00
Robin Gareus
c33f94f686
Enforce minimum pane sizes
...
* enforce minimum size of child widgets
* honor manually set child-minsize in size-requests
* ignore hidden children (eg. VCA)
* clamp divider position (instead of just ignoring out-of-bounds moves)
2017-01-02 17:13:56 +01:00
Robin Gareus
de04da27ee
Fix crash when unpacking or deleting pane
...
Gtk::Widget_Class::dispose_vfunc_callback calls hide() which invokes
Pane::handle_child_visibility which calls Pane::reallocate which
tries to get the allocation of the widget being destroyed.
2016-12-21 17:10:37 +01:00
Paul Davis
e9752ff93e
remove debug output
2016-08-09 21:26:27 -04:00
Paul Davis
81211a91b1
minor safety fix for the Pane
2016-07-20 10:48:07 -04:00
Paul Davis
82d3afb851
Gtkmm2ext::Pane: attempt to track child lifetime, since Gtkmm 2.4 doesn't do this correctly
2016-07-20 10:48:07 -04:00
Paul Davis
b8f5306d5b
fix incorrect restoration of pane positions on Apple.
...
Code to check if we were to close to an edge (for window resizing) blocked all divider setting,
because it would be called with a current widget allocation of 1x1
2016-07-18 12:49:36 -04:00
Paul Davis
cf52d6e4b4
enough with umpteen "i18n.h" files. Consolidate on pbd/i18n.h
2016-07-14 14:45:23 -04:00
Paul Davis
0eb509ac2e
remove debug output from Pane code
2016-06-14 11:46:24 -04:00
Paul Davis
9142d1edf5
working version of pane position mgmt for OS X
2016-06-13 09:52:54 -04:00
Paul Davis
ceb0bce971
write some code to limit pane handle positions on OS X.
...
So far untested, and uncompiled
2016-06-13 09:10:47 -04:00
Paul Davis
9a1c24dda7
fix thinko in Pane expose event handler.
...
There are always less dividers than children
2016-06-08 12:26:24 -04:00
Paul Davis
9a50d15c7f
fix crashing bug in Pane when accessing dividers
2016-06-06 16:05:43 -04:00
Paul Davis
5700296cb6
add a destructor for Gtkmm2ext::Pane that unparents the children.
...
This seems to be required, although there is confusion in Gtkmm3 about this.
2016-06-06 16:05:25 -04:00
Paul Davis
a047d814f6
fix case where pane divider is not redrawn after a leave event.
2016-06-01 22:30:17 -04:00
Paul Davis
d680c1f1db
fix styling of pane dividers (the original reason for the "*Pane*" widget=>style spec)
2016-06-01 22:23:34 -04:00
Paul Davis
8c74a1b99c
make pane divider placement a little safer
2016-05-31 15:30:45 -04:00
Paul Davis
47b85c3845
fix default pane divider cursor for vertical panes
2016-05-31 15:30:45 -04:00
Paul Davis
4ef8e862b3
shrink down pane divider/handle width
2016-05-31 15:30:45 -04:00
Paul Davis
0baedac4f4
fix pane behaviour when children are hidden/shown
2016-05-31 15:30:45 -04:00
Paul Davis
229b026356
explicitly expose dividers
...
hmm, seems important to understand how this worked before
2016-05-31 15:30:45 -04:00
Paul Davis
7c6cfd9fa0
more sensible API for Pane::set_child_minsize
2016-05-31 15:30:45 -04:00
Paul Davis
d8b02be745
provide a mechanism to avoid allocating too small of a space to a Pane child
...
Gtk::Notebook throws an assertion if allocated too small a space during drawing (at least with Clearlooks)
2016-05-31 15:30:45 -04:00
Paul Davis
067616a84f
various work on Pane, including cursors, more styling stuff, and making the forall_vfunc safe against gtk_container_remove
2016-05-31 15:30:45 -04:00
Paul Davis
9694a3181b
Pane: use style-provided colors, and change colors on enter/leave/dragging
2016-05-31 15:30:45 -04:00
Paul Davis
3c4503a849
fix use of widget allocation origin in Gtkm2mext::Pane
2016-05-31 15:30:45 -04:00
Paul Davis
29b9c4ecc3
set default pane divider position to 0.5
2016-05-31 15:30:45 -04:00
Paul Davis
ce68505a51
working but incomplete version of new Pane replacement widget
2016-05-31 15:30:45 -04:00