- Made notebook tabs smaller
- No need to hide/show toplevels after removing from a parent,
if it's visible it will be automatically shown after removing
outside of it's previous parent.
This involves checking the toplevelness of new toplevels before connecting
but not the *old* ones for disconnecting signals. Also take care of handling
a row_reference that becomes invalid over the course of reparenting the
filechooser into another parent.
Now GtkWindow takes some measures when setting toplevelness:
- When a window becomes toplevel after being embedded it saves
the visibility state and reshow's itself so that the window
re-realizes and presents itself again automatically
- When emitting hierarchy-changed, synthetically mark the toplevel
as not anchored, this allows the hierarchy changed propagation to
recurse properly.
GtkWidget also takes care to unset the parent window *after* unparenting
the widget and after emitting the heirarhcy changed that leaves a NULL
toplevel.
That means there are now 2 cycles of "hierarchy-changed" when removing
an embedded toplevel from a parent, first one that makes the new toplevel
a NULL one (since the toplevel flag is not yet restored), the second cycle
makes the removed window toplevel again when setting the parent window
to NULL.
GtkFileChooserDefault watches the toplevel and montitors "set-focus"
signal on it... however the connection needs to be remade when the
GtkFileChooserDialog is in an embedded toplevel.
Measure's taken: GtkWindow propagates hierarchy changes when
_gtk_window_set_is_toplevel() is called, gtk_widget_unparent()
unsets the widget's parent window earlier in the function so that
the possible hierarchy change is still able to properly access the hierarchy.
GtkFileChooserDefault checks if the "new" toplevel is indeed
gtk_widget_is_toplevel() but not the old one, GtkRange has been
updated to use gtk_widget_is_toplevel() inside it's hierarhcy_changed
vfunc, other classes already do this properly.
This patch makes gtk_widget_set_parent_window() undo the toplevelness
of a GtkWindow, GtkWindow then realizes itself as a normal child widget
and behaves like a normal GtkBin by checking gtk_widget_is_toplevel() in
several places (show/hide/map/unmap/draw/size_allocate/check_resize/configure_event).
Seems the redraw was not happenning from keynav when set_focus_cell()
was called because keynav already updates the focus-cell. Now we
just unconditionally redraw the focus item when set_focus_cell() is
called.
Icon View was not initially setting focus on a cell when
focus initially comes into the view. Focusing into whatever
is the first cell in the cursor item when set_cursor_item
is called with a NULL cell fixes this.
GtkIconView sets the minimum width of the text cell to be at least 50
pixels and otherwise twice the width of the first pixbuf cell found
in the icon list.
GtkIconView should have a "grow-only" mode to handle optimization to
only allow icons to grow in width when rows change, however since
GtkIconView still does not handle large numbers of rows for now we'll
just relayout the whole thing whenever a series of rows change.
Also fixed up to watch the context incase of implicit resets.
of each row.
GtkIconView now properly calculates the height of each row separately
using a separate GtkCellAreaContext stored in an array which it can
always easily index with the item->row index for all purposes.
However, I'm going to have to figure a way to store the alignments
for rows separately, this may involve using a separate GtkCellAreaContext
for each row, unfortunately.
Some things still not sorted out, GtkCellAreaContext is not allocated
so icons dont recieve alignments yet, focus navigation is not exactly
what it used to be (maybe we can work around that by observing the
item orientation and explicitly setting focus to the same cell when
navigating in the wrong orientation).