When a widget is app_paintable, its background should not be drawn by
the theme, thus we should not try to override its background again when
style-updated is fired.
This is a bit of a hack, but it fixes gray surfaces observed for DnD
windows with recent GTK+.
As used in Totem and gnome-contacts. The widget
takes either a GtkMenu or a GMenuModel to construct
its menu, and can be given a parent widget to use to
position the drop-down (as used in GtkMenuToolButton).
https://bugzilla.gnome.org/show_bug.cgi?id=668013
If the icon view is empty, we cannot get a reasonable size request from
the cell renderers. So all values we would compute are pretty much
useless.
So we special case it.
This also gets rid of a bunch of crashers from div-by-0 in corner cases.
https://bugzilla.gnome.org/show_bug.cgi?id=677809
This is useful for 2 reasons:
(1) Items actually exist and are clickable
(2) Size computations don't divide by 0
I've not seen problems with this in the wild (mostly because
item-padding defaults to non-0), but noticed this while fixing other
bugs.
Minimum size is necessary so you can see the item. If we can't get that
we need to scroll.
Natural as the maximum is used so that the spacing between items doesn't
increase when resizing the iconview, but empty space is added to the
right/bottom instead.
https://bugzilla.gnome.org/show_bug.cgi?id=677809
While working on the "iconview: Don't shrink items" patch I noticed that
gtk_icon_view_compute_n_items_for_size modifies the natural and minimum
item sizes it got from gtk_icon_view_get_preferred_item_size when
calculating the max number of items which will fit, but later on it
checks against these sizes when calculating the item_size, and these
checks expect these values to be unmodified.
This patch fixes this by modifying the natural and minimum values in
advance and doing all computations with modified values.
https://bugzilla.gnome.org/show_bug.cgi?id=677809
The previous code assumed that the width was always enough for more than
one column, which is obviously not correct when a number of columns is
hardcoded.
With this patch, it will now always check that the width is enough and
otherwise cause scrolling.
https://bugzilla.gnome.org/show_bug.cgi?id=677809
GtkToolbar doesn't have its own GdkWindow to draw on (it calls
gtk_widget_set_has_window(FALSE) in _init), but only an event window
(input-only).
Since gtk_widget_get_window() in that case will return the GdkWindow of
the parent container, by calling gtk_style_context_set_background() here
we're overriding the base background of the container instead of our.
While in most cases this doesn't have any noticeable effect, since
the toplevel GtkWindow will paint its background on top of it at the
beginning of the draw cycle, when the classic window hierarchy is
broken, such as when widgets are rendered through a clutter-gtk
offscreen embedding, the background will become visible, which is
undesirable.
Fix this by having GtkToolbar not call gtk_style_context_set_background
in its style_updated handler.
When I added the versioned annotation, I accidentally backdated
it, so the Deprecated: tag in the docs said 3.4, but the annotation
said 3.0. Fix it so we say 3.4 in both places.
When inline-selection is set, and the completion popup is showing,
pressing left abruptly jumps to the beginning of the entry text.
This is not expected, since the cursor is at the end of the text before
the left key is pressed, and this behavior is completely inconsistent
with how an entry would normally behave.
The behavior can be observed in Epiphany by selecting a completion match
and pressing left.
This patch changes the code so that it just runs the default entry key
press keybindings in such a case.
https://bugzilla.gnome.org/show_bug.cgi?id=677915
Mark the new_order argument as zero-terminated array, even though it does not
need to be zero terminated (it has an implicit length not given by a constant
or another method argument). It does not hurt if bindings append an extra zero
to the array as long as it has enough elements, and this makes the method
introspectable.
https://bugzilla.gnome.org/show_bug.cgi?id=677941
Remove the 'you shall not connect' message from this signal.
While it is a keybinding signal, using it from applications is
fine and, in fact, expected.
There are three bugs here:
- we should check if the value type is transformable instead of being
compatible, since that's all we care about in order to call
g_value_transform()
- the check is only meaningful in the direction
passed-in-type->column-type and not viceversa
- we should init the destination GValue to the column type before
calling g_value_transform on it, or the destination type information
will be missing and the method will fail
Thanks to Jasper St. Pierre and Colin Walters for all the help in
tracking this down.
https://bugzilla.gnome.org/show_bug.cgi?id=677649
There are three bugs here:
- we should check if the value type is transformable instead of being
compatible, since that's all we care about in order to call
g_value_transform()
- the check is only meaningful in the direction
passed-in-type->column-type and not viceversa
- we should init the destination GValue to the column type before
calling g_value_transform on it, or the destination type information
will be missing and the method will fail
Thanks to Jasper St. Pierre and Colin Walters for all the help in
tracking this down.
https://bugzilla.gnome.org/show_bug.cgi?id=677649