Commit Graph

22536 Commits

Author SHA1 Message Date
Maks Naumov
54806d1295 Fix accessible_class->widget_set initialization
Signed-off-by: Maks Naumov <maksqwe1@ukr.net>

https://bugzilla.gnome.org/show_bug.cgi?id=742778
2015-01-13 19:01:01 -05:00
Maks Naumov
87d36885ac Properly check result of g_utf8_get_char_validated()
g_utf8_get_char_validated() may return -1 or -2
return type is gunichar(guint32)

Therefore such checks like 'gunichar < 0' or 'gunichar > 0'
are always 'false' or 'true'(except when gunichar == 0).

Signed-off-by: Maks Naumov <maksqwe1@ukr.net>

https://bugzilla.gnome.org/show_bug.cgi?id=742774
2015-01-11 15:46:06 -05:00
Maks Naumov
07cf489d2d Fix check for 'y' padding in gtk_cell_renderer_set_padding()
Signed-off-by: Maks Naumov <maksqwe1@ukr.net>

https://bugzilla.gnome.org/show_bug.cgi?id=742764
2015-01-11 15:34:20 -05:00
Matthias Clasen
f120ae7b4d Forgotten file 2015-01-10 21:16:21 -05:00
Matthias Clasen
838e982877 HighContrast: Don't set nonexisting style properties
These don't exist, so setting them can't do any good.
2015-01-10 21:14:56 -05:00
Matthias Clasen
e15152c837 Adwaita: Don't set nonexisting style properties
These don't exist, so setting them can't do any good.
2015-01-10 21:14:02 -05:00
Matthias Clasen
604704a3f0 HighContrast: Also fix separators in file chooser buttons
Same fix as for combo box separators.
2015-01-10 21:12:08 -05:00
Matthias Clasen
88567295f6 Adwaita: Also fix separators in file chooser buttons
Same fix as for combo box separators.
2015-01-10 21:09:30 -05:00
Iain Lane
8c5094c22c gtkfilechooserwidget: When using an extra widget, show or hide the filter combo as appropriate
https://bugzilla.gnome.org/show_bug.cgi?id=742653
2015-01-10 20:37:39 -05:00
Matthias Clasen
0b50e1fff6 HighContrast: draw combo box separators
Same fix as the previous commit.
2015-01-10 20:28:45 -05:00
Matthias Clasen
9c4d478dc7 Adwaita: draw combo box separators
Killing the separator in the button had the unintended side effect
of also killing separators in the popup.

https://bugzilla.gnome.org/show_bug.cgi?id=742704
2015-01-10 20:25:56 -05:00
Nelson Benitez Leon
885b36a6d5 GtkTextView: allow to extend text selection with mouse scrollwheel
Fixes bug 710612
2015-01-10 14:36:17 -05:00
Matthias Clasen
5d9710cc7f file chooser: Add some padidng
https://bugzilla.gnome.org/show_bug.cgi?id=742631
2015-01-10 14:35:56 -05:00
Matthias Clasen
b0e4273325 Forgotten files 2015-01-10 14:35:56 -05:00
Matthias Clasen
366527c2d0 Adwaita: Fix treeview separators in backdrop
https://bugzilla.gnome.org/show_bug.cgi?id=742702
2015-01-10 13:07:55 -05:00
Benjamin Otte
cec5815a0d stylecontext: Stop animations on manual invalidation
If a gtk_style_context_invalidate() is called on a widget's style
context (which nobody should ever do, sheesh!) and we're animating, stop
the animations.

Fixes crashers in Nautilus.
2015-01-10 14:25:40 +01:00
Matthias Clasen
9fcbae2d85 GtkScrolledWindow: Don't start fading right away
When we get a leave event, we need to remove the over bit,
since we may not get motion events that tell us when we lose
proximity, but we don't have to fade out right away - that
will happen on its on due to inactivity a bit later. Having
the indicator stay visible for a bit feels more relaxed.
2015-01-09 21:15:07 -05:00
Matthias Clasen
206f0bbf7f GtkScrolledWindow: Factor out a constant
Define INDICATOR_CLOSE_DISTANCE instead of hardcoding the same
number of pixels in 4 different places.
2015-01-09 21:15:06 -05:00
Matthias Clasen
11eb64a2b6 GtkScrolledWindow: Don't require proximity for track points
These are hard to navigate precisely, so show wide scrollbars
right away.
2015-01-09 21:15:06 -05:00
Matthias Clasen
2a3a7306ef GtkScrolledWindow: Drop device manager complications
We no longer use the presence or absence of particular device
types to determine which scrolling to use.
2015-01-09 21:15:06 -05:00
Matthias Clasen
96fcdebefb GtkScrolledWindow: Drop a redundant field
The Indicator.enabled field was not carrying any extra information,
so just use priv->use_indicators instead.
2015-01-09 21:15:06 -05:00
Matthias Clasen
1c6eca04db GtkScrolledWindow: Rename a private field
touch_mode -> use_indicators, more to the point.
2015-01-09 21:15:06 -05:00
Matthias Clasen
6384167054 inspector: Don't use GSettings directly
It is not necessary here, and using GtkSettings gives us
a greater chance to not fail e.g. on Windows.

https://bugzilla.gnome.org/show_bug.cgi?id=742664
2015-01-09 15:29:34 -05:00
Matthias Clasen
c2ff89bbe3 inspector: be careful about gsize vs guint64
Since gsize doesn't work as a typename in a ui file,
we have to be careful not to pass pointers to wrongly
sized variables when getting the guint64 values out
of the model.

https://bugzilla.gnome.org/show_bug.cgi?id=742664
2015-01-09 14:44:26 -05:00
Emmanuele Bassi
9a38fb79e5 docs: Add missing quote
The missing " breaks the syntax highlighting of the GtkImageMenuItem
example.
2015-01-09 16:42:55 +00:00
David King
a7638d5ecb docs: Add Since for GtkCellRendererPixbuf:surface 2015-01-09 14:51:21 +00:00
David King
9a50203408 docs: Fix some old live.gnome.org URLs 2015-01-09 14:08:20 +00:00
Matthias Clasen
885b3c704f Fix GTK_OVERLAY_SCROLLING=0
This was broken by the recent more dynamic approach.
2015-01-09 06:45:51 -05:00
Matthias Clasen
d5afaa07d3 Fix comment typo 2015-01-09 06:21:37 -05:00
Matthias Clasen
80969e34bc inspector: Show object address
This is useful information when running the application
in a debugger.
https://bugzilla.gnome.org/show_bug.cgi?id=742518
2015-01-09 00:07:01 -05:00
Emmanuele Bassi
79f806fdab Point to copy/cut/delete named icons in the stock item deprecations
We still use symbolic icons for Copy, Cut, and Delete operations inside
toolbars and some menus, so it's worth pointing to the symbolic icon
names in the deprecation notices.

https://bugzilla.gnome.org/show_bug.cgi?id=741969
2015-01-08 23:50:22 -05:00
Matthias Clasen
08f69c53a5 file chooser: Don't force a scrollbar
No point in showing the scrollbar when it is not needed.
https://bugzilla.gnome.org/show_bug.cgi?id=742343
2015-01-08 22:27:47 -05:00
Timm Bäder
57714b9774 gtklabel: Don't accept unhandled mouse buttons
If the pressed mouse button neither triggers a context menu nor
activates a link, set the sequence's state to DENIED.

https://bugzilla.gnome.org/show_bug.cgi?id=742010
2015-01-08 21:52:26 -05:00
Benjamin Otte
9474215a43 cssimage: Fix angle computation for gradients to corners 2015-01-08 19:30:59 +01:00
Benjamin Otte
29984c5282 stylecontext: Handle theme changes for cached styles
We need to clear the cache manually on full revalidates because
_gtk_css_change_for_child() will clear the full revalidation flags.
And then gtk_style_context_update_cache() will not do the right thing
(which is to clear itself).
2015-01-07 18:06:59 +01:00
Benjamin Otte
bc07a540c7 stylecontext: Rename GtkStyleInfo to GtkCssNode 2015-01-07 15:44:53 +01:00
Benjamin Otte
2664082549 stylecontext: update_animating() properly
Because we can switch from animating to non-animating pretty much
anywhere, do the check for animations unconditionally instead of trying
to cram it into the correct if path (and failing).
2015-01-07 14:26:48 +01:00
Benjamin Otte
059cd3e51f stack: Remove commented out line
It always shows up in my greps and confuses me.
2015-01-07 14:26:48 +01:00
Benjamin Otte
fe33ee426a stylecontext: Add a parent style cache
We now cache the results of lookups on the parent GtkCssStyle. This
allows sharing styles between widgets (recursively). However, this
only works if the styles can't potentially depend on siblings -
neither directly via sibling selectors or via position pseudo-classes
like :first-child.
Unfortunately, Adwaita currently uses first-child a lot, and in
particular for labels, which are the most common widgets.

The big benefits of this change are both less CPU - due to not needing
to compute styles again - and less memory usage - due to sharing of
the styles between widgets. Here's some nonscientific numbers I
collected while pondering the usefulness of this patch:

                    glade   glade   widget
                    demo    demo    factory
                    runtime styles  styles
Adwaita before      19.1s   5800    1150
Adwaita now         18.9s   3800     970
Adwaita hacked now  14.5s   3100     910
simple before       11.3s   5800    1150
simple now          10.8s   1300     590

Adwaita: Adwaita as provided by GTK
Adwaita hacked: Adwaita with the first/last-child for GtkLabel removed
simple: A 250 lines simple GTK theme I use for testing
before: This patch not applied
now: this patch applied

glade demo runtime: Starting glade opening a large file and closing it
glade demo styles: GtkCssStaticStyle objects after opening glade with
                   the large file as per inspector
widget factory styles: GtkCssStaticStyle objects after startup as per
                       inspector
2015-01-07 14:26:48 +01:00
Benjamin Otte
27285f1f0f cssstyle: Have a default style
This way we can initialize the default style info with a style and
ddon't need to special case NULL everywhere.
2015-01-07 14:26:48 +01:00
Benjamin Otte
ef9aa8b0ae stylecontext: Use correct parent on updates
Previously we looked at the save/restore state when determining the
parent. This is wrong in the case where we're updating the cache though.

So we now save the parent in the style info.
2015-01-07 14:26:48 +01:00
Benjamin Otte
89b5d15415 stylecontext: Fix cache updating
After the parent changes in commit
3a337156d1 we need to refresh the cached
styles after the current style. After all, they now depend on the base
style.
2015-01-07 14:26:48 +01:00
Benjamin Otte
730f429168 cssstaticstyle: Handle relevant change
Relevant change is returned from style lookups, so keep is with the
object that holds those values.
2015-01-07 14:26:48 +01:00
Benjamin Otte
ad199e4cf9 stylecontext: Use correct parent style for lookups
After 3a337156d1 style lookups still used
the parent context's style as the parent style, even though after a
gtk_style_context_save() the root style of the style context is the
proper parent.

Testcase attached.
2015-01-07 14:26:48 +01:00
Benjamin Otte
26f36ef8ae cssnodedeclaration: Store the GType of the node 2015-01-07 14:26:48 +01:00
Benjamin Otte
9645daf48f cssstyle: Move function from vfunc to static func
compute_dependencies() is only used internally by GtkCssStaticStyle,
so there's no need to have it elsewhere.
2015-01-07 14:26:47 +01:00
Benjamin Otte
cd056adb2f cssstaticstyle: Move function
And with that move, GtkCssStaticStyle is immutable.
2015-01-07 14:26:47 +01:00
Benjamin Otte
8b823d7e13 cssstaticstyle: Move function
We want the new() return values to be immutable, so we have to move the
code that modifes them.
2015-01-07 14:26:47 +01:00
Benjamin Otte
b7be202089 stylecontext: Refactor update_properties()
It now always returns a new instance.
2015-01-07 14:26:47 +01:00
Benjamin Otte
7406ec84bc stylecontext: Simplify function
Instead of computing the changes manually everywhere from the parent
changes, just pass in the parent changes.
2015-01-07 14:26:47 +01:00