Commit Graph

17207 Commits

Author SHA1 Message Date
Benjamin Otte
0185e323db cssvalue: Add animation enum properties 2012-09-17 20:39:11 +02:00
Benjamin Otte
e6c951a303 styleprovider: Add query function for keyframes 2012-09-17 20:39:11 +02:00
Benjamin Otte
c4cdb33b32 cssprovider: Add parsing support for @keyframes 2012-09-17 20:39:10 +02:00
Ryan Lortie
3ee837564e gtk.symbols fixup 2012-09-17 12:34:33 -04:00
Ryan Lortie
dd143479fe gtkmodelmenu: simplify logic, expose bind API
Make the main (and only) entry-point to gtkmodelmenu.c the now-public
gtk_menu_shell_bind_model().

Move the convenience constructors (gtk_menu_new_from_model() and
gtk_menu_bar_new_from_model()) to their proper files.

Remove the private header file.

Simplify the code a bit by making the initial populate part of the
bind() call.

https://bugzilla.gnome.org/show_bug.cgi?id=682831
2012-09-17 12:31:22 -04:00
Ryan Lortie
778aa7ade0 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).

https://bugzilla.gnome.org/show_bug.cgi?id=683738
2012-09-17 12:31:22 -04:00
Ryan Lortie
338b5f6c2d 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.

https://bugzilla.gnome.org/show_bug.cgi?id=682630
2012-09-17 12:31:21 -04:00
William Jon McCann
b05224b059 Add back gtk_css_provider_get_named
Was in the original patch but was not in 1f5dea9 probably due to
a bad rebase.

https://bugzilla.gnome.org/show_bug.cgi?id=683896
2012-09-17 09:54:26 -04:00
Cosimo Cecchi
e34467a375 menubutton: set DROPDOWN_MENU hint on the menu toplevel
Restore the behavior introduced in
598163e526, which regressed in commit
5a3442bf9c.
2012-09-17 09:50:03 -04:00
Ignacio Casal Quinteiro
50e5323e51 Do not introspect gtk_color_button_get_rgba.
This method is deprecated so it gets in the way of the
implemented gtk_color_chooser_get_rgba.
2012-09-17 14:52:08 +02:00
Matthias Clasen
70384941fb Preserve gtk_widget_get_default_style semantics
Make sure that we return a GtkStyle even if there's no screen yet.
2012-09-17 07:53:44 -04:00
Matthias Clasen
bc17073a25 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
2012-09-16 23:28:06 -04:00
Sébastien Granjoux
af5ecd77e3 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.

https://bugzilla.gnome.org/show_bug.cgi?id=676890
2012-09-16 23:28:02 -04:00
Sébastien Granjoux
f9e435df43 GtkAssistant: bgo#658694 - Unable to change current page in prepare handler 2012-09-16 23:27:57 -04:00
William Jon McCann
e044676584 Destroy the legacy style with the screen
https://bugzilla.gnome.org/show_bug.cgi?id=683896
2012-09-16 21:36:18 -04:00
William Jon McCann
92ddf14457 Don't leak a ref to the tooltip window
https://bugzilla.gnome.org/show_bug.cgi?id=683896
2012-09-16 21:36:18 -04:00
William Jon McCann
9bd408a58f Destroy the icon factory with the screen
https://bugzilla.gnome.org/show_bug.cgi?id=683896
2012-09-16 21:35:58 -04:00
William Jon McCann
8a9a3949dd Don't leak a ref to the settings
https://bugzilla.gnome.org/show_bug.cgi?id=683896
2012-09-16 20:21:06 -04:00
William Jon McCann
1f5dea9eba Bind the themes to the lifecycle of the screen
https://bugzilla.gnome.org/show_bug.cgi?id=683896
2012-09-16 20:20:44 -04:00
William Jon McCann
5debed5ae2 Shut down a11y when an app shuts down
https://bugzilla.gnome.org/show_bug.cgi?id=684076
2012-09-16 19:31:23 -04:00
Colomban Wendling
5b8d67a0aa 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.

https://bugzilla.gnome.org/show_bug.cgi?id=684156
2012-09-16 19:09:45 -04:00
Ignacio Casal Quinteiro
909873bc6f Load settings.ini also from XDG_CONFIG_DIRS
https://bugzilla.gnome.org/show_bug.cgi?id=683874
2012-09-16 19:04:14 -04:00
Matthias Clasen
e64317f8e1 Add missing argument in GTK_SPINNER_GET_CLASS 2012-09-16 19:02:29 -04:00
Ignacio Casal Quinteiro
f981fb08b3 gtkoverlay: fix get-child-position annotation 2012-09-16 19:03:14 +02:00
Matthias Clasen
01cfe1b595 Plug a leak 2012-09-16 00:49:04 -04:00
Matthias Clasen
78c44d31d3 Small tweaks to the DND docs
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.
2012-09-15 16:17:03 -04:00
Matthias Clasen
98ca019c74 Fix a memory leak in GtkCssStringValue 2012-09-15 16:17:03 -04:00
Benjamin Otte
ea9081ae3b cssimage: Make cross-fades cross-fade properly
We need to use OPERATOR_SOURCE to properly fade out the start image
when the end image contains transparency.
2012-09-14 17:33:02 -04:00
Juan Pablo Ugarte
2064987e31 Added GtkActionGroup:accel-group property.
Fixes bug #671786 "Glade XML files cannot set an ImageMenuItem accelerator key from an Action"
2012-09-14 17:58:51 -03:00
Cosimo Cecchi
52ea721551 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
b94e6c0a80. 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.

https://bugzilla.gnome.org/show_bug.cgi?id=684038
2012-09-14 13:38:15 -04:00
Cosimo Cecchi
f57778e71e stylecontext: fix a StyleData refleak
We were failing to unref the style data in some code paths.

https://bugzilla.gnome.org/show_bug.cgi?id=683627
2012-09-13 17:00:20 -04:00
Matthias Clasen
ba2e43111e Plug a small memory leak 2012-09-13 00:14:16 -04:00
Matthias Clasen
357db76c62 Fix doc comment
The setting was only introduced in 3.6.
2012-09-13 00:10:50 -04:00
Alejandro Piñeiro
5ff328d21f a11y: Solved leak on gtk_widget_accessible_get_description
https://bugzilla.gnome.org/show_bug.cgi?id=643611
2012-09-12 21:15:59 +02:00
Adrian Johnson
dd7e8e9414 Don't rotate pdf landscape output 2012-09-12 15:38:37 +02:00
Stefano Facchini
fb18145c06 box: Fix typo
https://bugzilla.gnome.org/show_bug.cgi?id=683718
2012-09-11 21:40:46 +02:00
Kristian Rietveld
64324a5da0 Implement gtk-primary-button-warps-slider GtkSetting
Make GtkRange honor the setting and implement it in the
quartz backend, it proxies the "click in the scroll bar to"
property from the OS X PrefPane.
2012-09-11 11:19:09 +02:00
Cosimo Cecchi
143a600466 menubutton: clear arrow_widget on remove()
So that we clear its pointer also in case somebody else calls
gtk_container_remove() on the button.
Fixes criticals at startup in e.g. Nautilus.
2012-09-04 09:38:28 -04:00
Cosimo Cecchi
d05191a010 entry: fix requisition width/height to use the current pango layout
This way, we can ensure that width/height changes due to the use of
gtk_entry_set_attributes() are correctly reflected in the size request.

https://bugzilla.gnome.org/show_bug.cgi?id=683168
2012-09-03 11:45:51 -04:00
Paolo Borelli
afd99d3579 Make spinbutton orientable
https://bugzilla.gnome.org/show_bug.cgi?id=683168
2012-09-03 11:45:51 -04:00
Carlos Garnacho
81045779f6 Improve CSS styling of touch text selection handles
Don't hook on the widget style context and set up instead
a widget path for itself. Also use a common style class
for both handles, with an extra top/bottom class for each
handle.
2012-09-03 17:08:02 +02:00
Benjamin Otte
260b587c9c cssvalue: Implement transitioning arrays
Or rather: Implement it for backgrounds, as the animation rules for
arrays vary by property.
2012-09-03 12:54:14 +02:00
Benjamin Otte
e3fc081c5d cssvalue: Pass property ID to transition function
This is to allow animating arrays properly. I'm not really thrilled
about this solution (we leak propertys into the values again...), but
it's the best I can come up with - I prefer it to having N different
array types...
2012-09-03 12:54:14 +02:00
Benjamin Otte
fd7668bfb5 cssvalue: Don't allow empty arrays anymore
CSS arrays aren't empty, even the ones that appear empty contain one
"none" element.
2012-09-03 12:54:14 +02:00
Benjamin Otte
912d5a5c23 cssvalue: Make the array parser no longer parse "none"
Arrays that support it, handle it themselves.
2012-09-03 12:54:14 +02:00
Benjamin Otte
44ba5d253f css: Redo bindings parsing
I want to get away from the ability to have 0-length arrays, all css
arrays are single element.
Even if the element is "none", it is still a "none" element.
2012-09-03 12:54:14 +02:00
Claudio Saavedra
21d0db8254 gtkliststore: fix documentation typo 2012-09-03 11:00:15 +03:00
Matthias Clasen
8c3a668d52 Add a way to test touch features
The GTK_TEST_TOUCHSCREEN envvar is now checked in entries
and textviews to allow testing of text handles with other
kinds of devices.
2012-09-03 00:19:46 -04:00
Carlos Garnacho
5bda3a001d Implement touch text selection in GtkTextView
GtkTextHandle is used to indicate both the cursor position
and the selection bound, dragging the handles will modify
the selection and scroll if necessary.

Backwards text selection is also blocked for touch devices,
so the handles don't get inverted positions and possibly
obscure portions of the selected text.
2012-09-03 00:19:46 -04:00
Carlos Garnacho
d38efb1713 Implement touch text selection in GtkEntry
GtkTextHandle is used to indicate both the cursor position
and the selection bound, dragging the handles will modify
the selection and scroll if necessary.

Backwards text selection is also blocked for touch devices,
so the handles don't get inverted positions (This is more
important though on GtkTextView, as inverted handles may
obscure portions of the selected text, good for consistence
though)
2012-09-03 00:19:46 -04:00