Benjamin Otte [Wed, 12 Sep 2012 13:27:59 +0000 (15:27 +0200)]
animation: Add _gtk_style_animation_is_static()
This will be useful to not trigger updates all the time when nothing is
happening (ie due to animations being paused or due to them having
reached their final value).
Benjamin Otte [Mon, 10 Sep 2012 11:57:56 +0000 (13:57 +0200)]
css: Add animation support
This adds the GtkCssAnimation class and the code needed to hook it into
GtkStyleContext. It takes the values out of the CSS "animation"
properties and does animations. See
http://dev.w3.org/csswg/css3-animations/
for details.
Note that the code for starting and stopping animations with widget
visibility doesn't work yet.
Benjamin Otte [Mon, 10 Sep 2012 11:50:10 +0000 (13:50 +0200)]
widget: Use gtk_widget_queue_draw() for queueing redraws
This change is necessary because the old code did not accound for corner
cases (like translucent child windows), which could stop
gtk_widget_queue_resize() to not trigger redraws.
Ryan Lortie [Mon, 10 Sep 2012 18:36:23 +0000 (14:36 -0400)]
GtkAccelLabel: add manual accel API
Add an API to GtkAccelLabel for hardcoding the accel key to be displayed
(ie: allowing us to bypass the GtkAccelGroup lookup).
Use that from the GMenuModel-based GtkMenu construction code instead of
passing around the accel group.
This makes accel labels work in bloatpad again.
This patch effectively removes any hope of automatic runtime accel
changes in GMenuModel-based menus without additional application
support but it leaves the door open for this to be supported again in
the future (if we decide that it's important).
Ryan Lortie [Fri, 24 Aug 2012 18:11:37 +0000 (14:11 -0400)]
GtkModelMenuItem: add a submenu action attribute
Add support for a stateful action associated with a submenu. The action
state is set to TRUE when the menu is shown and FALSE when it is
unshown.
This is useful to avoid unnecessary processing for menus that have
frequently-changing content.
A possible future feature is to add support for asynchronously filling
the initial state of the menu by waiting until the action actually emits
its state-change signal to TRUE before showing the menu.
A silly example has been added to Bloatpad to demonstrate the new
feature.
Move the gtk_shadow_type check down to gtk_render_frame
In gtk_menu_bar_draw, the check for shadow type != none
disables rendering of the background instead of the frame.
The check should be moved down to gtk_render_frame.
Patch by Peter de Ridder,
http://bugzilla.gnome.org/show_bug.cgi?id=670390
button: Clear highlight when a button is removed from a container
A button is highlighted if the private variable in_button is TRUE.
This variable is set when the pointer is over the button and cleared when
it left the button. When a button is hidden while there is the pointer over
it, GTK generates a leave notification event, in_button is set to FALSE.
But when a button is removed from a container but not destroyed, it is
unrealized and loose its window. It cannot receive the leave notification
event and in_button stay TRUE. So when the button get a new parent it is still
highlighted.
fontchooserwidget: scroll to the currently selected row
Scroll to the selection when setting it so the selected font is
visible on screen. This is especially useful if an initial font is
set for the user to see it.
As pointed out by Columban Wendling in
https://bugzilla.gnome.org/show_bug.cgi?id=684096,
the GtkWidget DND docs were referring to several drag context
members that are private, nowadays.
togglebutton: always set PRELIGHT state when in_button = TRUE
Previously, we would avoid setting the prelight state flag when
button_down was TRUE and draw_indicator = FALSE, which is the normal
case of a GtkToggleButton during a mouse press.
It looks like this behavior was introduced a long time ago with commit b94e6c0a8036a0489ac8ca71de75ba7611218e50. I believe the reason was that
a widget in GTK2 couldn't have more than a single state (e.g.
hover+active) at a given moment.
Michael Natterer [Fri, 14 Sep 2012 13:18:33 +0000 (15:18 +0200)]
quartz: Bug 674108 - Hard crash due to wrong NSAutoreleasePool stacking
Apply patch from Kristian Rietveld which addresses two issues
in gdkeventloop-quartz.c:
This patch moves the autorelease pool drain and introduces protection against
the invalidated ufds. Basically, when we suspect ufds has been invalidated by a
recursive main loop instance, we refrain from calling the collect function.
(cherry picked from commit 79b3326eaab18b942bd7e03ae8d24544182cb3dd)
After my recent fix for this, nautilus was still having problems
telling keeping F10 and Shift-F10 apart. With this change, we are
treating levels with the same symbol like inactive levels, ignoring
them entirely.
The widget-factory was pretty much overflowing, so I've
made it page, and started to fill the second page with
vertical spin buttons. New examples and widgets should
be added to page 2 now.