Benjamin Otte [Mon, 9 Feb 2015 21:03:13 +0000 (22:03 +0100)]
cssnode: Refactor node tree modification code
This allows adding more API for it.
It also includes code that tracks modifications and invalidates siblings
and their positions whenever nodes get added or removed.
Benjamin Otte [Mon, 9 Feb 2015 17:38:57 +0000 (18:38 +0100)]
cssnode: Add hackery to allow bypassing widget paths
If we know the parent's get_path_for_child() implementation is safe to
be used with GtkCssNode because it doesn't do anything special, we do
that. Unfortunately that requires whitelisting vfuncs because the vfunc
is public API so anyone can override it.
Benjamin Otte [Mon, 9 Feb 2015 16:26:07 +0000 (17:26 +0100)]
cssnode: Remove now unused arg from vfunc
Benjamin Otte [Mon, 9 Feb 2015 15:41:06 +0000 (16:41 +0100)]
cssnode: Add a matcher for nodes
... and use that matcher by default - ie for transient nodes.
Benjamin Otte [Mon, 9 Feb 2015 15:14:03 +0000 (16:14 +0100)]
cssnode: Make widget node not copy the path
Instead, use gtk_widget_get_path() which makes GtkWidget cache the path.
This is a temporary solution until we can get rid of widget paths.
This increases memory usage quite noticably.
Benjamin Otte [Mon, 9 Feb 2015 14:21:48 +0000 (15:21 +0100)]
cssnode: Make widget node use new matcher
Benjamin Otte [Mon, 9 Feb 2015 10:29:48 +0000 (11:29 +0100)]
cssnode: Make path node create matcher without copying
... the WidgetPath. This uses the functionality introduced in the
previous commits.
Benjamin Otte [Mon, 9 Feb 2015 10:24:29 +0000 (11:24 +0100)]
cssmatcher: Allow widget path matcher to take a node declaration
The node declaration has the same functionality as
gtk_css_node_declaration_add_to_widget_path(). So instead of using that
function on a path, you can use the original path and the declaration in
a matcher.
Benjamin Otte [Mon, 9 Feb 2015 08:41:48 +0000 (09:41 +0100)]
cssnode: Split out a function
So far the vfunc is kinda quirky (the path argument is an out argument
for something you have to free when you're done with the matcher), but
I'm about to change that.
Benjamin Otte [Sun, 15 Feb 2015 21:26:13 +0000 (22:26 +0100)]
widget: Create widget path classes from proper style
We don't want to add the current classes to the widget path - which
might potentially be different after a gtk_style_context_save() - but
the root node's ones. So what better thing to do than actually using the
root node?
Benjamin Otte [Sun, 8 Feb 2015 15:44:11 +0000 (16:44 +0100)]
widget: Use correct type for widgetpath creation
This is relevant when the widget path is created while the widget is
still constructing. G_OBJECT_TYPE(widget) might not point to the final
type yet.
Benjamin Otte [Sun, 8 Feb 2015 15:37:08 +0000 (16:37 +0100)]
widget: Create the CssNode
... and pass it to the style context instead of having the style context
create it for us.
Benjamin Otte [Sun, 8 Feb 2015 11:15:27 +0000 (12:15 +0100)]
cssnode: Refactor invalidation propagation
We want to be sure to gtk_css_node_invalidate() all potential changes.
Benjamin Otte [Sat, 7 Feb 2015 18:03:37 +0000 (19:03 +0100)]
stylecontext: Don't queue animate tick callbacks anymore
Instead, just mark nodes permanently as invalid.
Benjamin Otte [Sat, 7 Feb 2015 17:53:07 +0000 (18:53 +0100)]
cssnode: Handle invalidate queueing differently
Instead of directly requesting the layout phase, register a tick
callback. This is what the docs suggest for animations and it's what we
need for the next commit.
Benjamin Otte [Sat, 7 Feb 2015 16:19:07 +0000 (17:19 +0100)]
cssnode: Change way invalidation is handled
Have a queue_validate() vfunc and a dequeue_validate() vfunc that are
called only on root nodes so they can queue a validation on their frame
clocks.
Benjamin Otte [Sat, 7 Feb 2015 09:30:27 +0000 (10:30 +0100)]
cssnode: Refactor gtk_css_widget_node_validate()
Makes it clearer what actually happens in that function.
Benjamin Otte [Thu, 5 Feb 2015 05:49:59 +0000 (06:49 +0100)]
cssnode: Only recreate styles when needed
Benjamin Otte [Wed, 4 Feb 2015 03:43:55 +0000 (04:43 +0100)]
cssnode: Automatically recreate style on get_style() call
When the style is invalid, redo it.
Make this a vfunc, so the widget nodes can opt out.
Benjamin Otte [Tue, 3 Feb 2015 14:36:01 +0000 (15:36 +0100)]
cssnode: Track pending changes here
... instead of GtkCssWidgetNode.
Benjamin Otte [Mon, 2 Feb 2015 14:35:08 +0000 (15:35 +0100)]
stylecontext: Move gtk_style_context_validate() to GtkCssWidgetNode
Benjamin Otte [Mon, 2 Feb 2015 14:34:32 +0000 (15:34 +0100)]
stylecontext: Move style creation functions to CssNode code
Benjamin Otte [Sun, 1 Feb 2015 15:43:58 +0000 (16:43 +0100)]
stylecontext: Redo handling of differing state
Instead of passing an "override_state" flag, create a new CssNode just
for this simple lookup.
Benjamin Otte [Sun, 1 Feb 2015 06:33:40 +0000 (07:33 +0100)]
stylecontext: Get rid of stylecontext argument
... to a bunch of functions.
This requires a tiny change to the heuristics for the style cache - we
now cache styles when they have the same style provider as their parent
instead of when they have the default provider - but that change doesn't
have any effect in practice.
Benjamin Otte [Sat, 31 Jan 2015 15:30:05 +0000 (16:30 +0100)]
cssnode: Add gtk_style_context_get_style_provider()
... and use it when looking up properties.
Benjamin Otte [Fri, 30 Jan 2015 15:28:41 +0000 (16:28 +0100)]
stylecontext: Remove children list
It's not needed.
Benjamin Otte [Fri, 30 Jan 2015 15:27:17 +0000 (16:27 +0100)]
stylecontext: Move validation into GtkCssNode
Benjamin Otte [Fri, 30 Jan 2015 10:42:22 +0000 (11:42 +0100)]
stylecontext: Export gtk_style_context_get_root()
.. in the private header. This avoids tiny wrapper functions.
Benjamin Otte [Wed, 28 Jan 2015 04:14:47 +0000 (05:14 +0100)]
cssnode: Track invalid flag
Remove it from GtkStyleContext.
Benjamin Otte [Mon, 26 Jan 2015 05:13:01 +0000 (06:13 +0100)]
cssnode: Implement refcounting
The parent refs the child, so gtk_css_node_set_parent() adds/removes a
reference.
We should probably refactor this so that we name the function
parent.add(node) instead of node.set_parent(parent) - makes the
refcounting more clear.
Benjamin Otte [Mon, 26 Jan 2015 01:18:06 +0000 (02:18 +0100)]
stylecontext: Handle parent in CssNode code
Make CssNode a real tree with a DOM-like API.
Benjamin Otte [Sun, 25 Jan 2015 05:14:48 +0000 (06:14 +0100)]
stylecontext: Move relevant_changes tracking to GtkCssWidgetNode
Benjamin Otte [Sun, 25 Jan 2015 01:40:40 +0000 (02:40 +0100)]
cssnode: Handle invalidation
Handle invalidation of node inside the CssNode code, don't do it in the
stylecontext.
Benjamin Otte [Sat, 24 Jan 2015 19:57:17 +0000 (20:57 +0100)]
stylecontext: Get rid of create_query_path()
Move that functionality into GtkCssNode.
Benjamin Otte [Sat, 24 Jan 2015 19:52:34 +0000 (20:52 +0100)]
stylecontext: Change arguments for build_properties
Instead of passing the style declaration, take the node's style
declaration. Add arguments to allow overriding the state for the one
case where this didn't work.
Benjamin Otte [Sat, 24 Jan 2015 19:05:33 +0000 (20:05 +0100)]
stylecontext: Compute rootness of CssNode
.. instead of passing it as an argument.
Benjamin Otte [Sat, 24 Jan 2015 18:51:05 +0000 (19:51 +0100)]
stylecontext: Pass cssnode to build_properties
Benjamin Otte [Sat, 24 Jan 2015 18:44:47 +0000 (19:44 +0100)]
stylecontext: Simplify a function
Benjamin Otte [Sat, 24 Jan 2015 17:55:54 +0000 (18:55 +0100)]
stylecontext: Remove values cache
The code is confusing the stylecontext=>node transition, so I'll remove
it.
WIth the recent introduction of the parent style cachen, I'm not sure
it's worth it at all. Some crude benchmarking suggests a slight speedup
when removing the cache.
So no guarantees about adding it back later.
Benjamin Otte [Mon, 12 Jan 2015 02:58:21 +0000 (03:58 +0100)]
cssnode: Split into 3 objects
- GtkCssWidgetNode
for style contexts owned by a widget
- GtkCssPathNode
for style contexts using a GtkWidgetPath
- GtkCssTransientNode
for nodes created with gtk_style_context_save()/restore()
Benjamin Otte [Sat, 10 Jan 2015 22:49:04 +0000 (23:49 +0100)]
cssnode: Turn into a GObject
This will allow us to use subclasses.
Benjamin Otte [Sat, 10 Jan 2015 21:35:38 +0000 (22:35 +0100)]
stylecontext: Turn CssNode accesses into getters/setters
That way we can hide the struct in the source file.
Benjamin Otte [Fri, 9 Jan 2015 23:47:32 +0000 (00:47 +0100)]
stylecontext: Split out GtkCssNode into own file
The functionality of it is supposed to grow, so better put it in a
custom file early.
This is just a naive split so far, the next patches will split things
further.
Benjamin Otte [Wed, 18 Mar 2015 14:22:09 +0000 (15:22 +0100)]
render: Make image effect not depend on state
Instead rely on -gtk-image-effect only. Adwaita should already work this
way.
Relying on state was a leftover feature from the GTK 2 days.
Benjamin Otte [Tue, 17 Mar 2015 15:45:05 +0000 (16:45 +0100)]
notebook: Protect against invalid allocations
A widget can be mapped but not have a size allocated yet. In that case
avoid computing a broken rectangle.
https://bugzilla.gnome.org/show_bug.cgi?id=746301
Carlos Garnacho [Tue, 17 Mar 2015 16:59:15 +0000 (17:59 +0100)]
wayland: Fix thinko in wl_data_source.cancelled handler
The wl_data_source may be the clipboard's. Looking up the drag context in
order to get the display isn't going to fare well there. So, just use the
default display, and only look up the drag context when we know we need it.
https://bugzilla.gnome.org/show_bug.cgi?id=746386
Christian Hergert [Tue, 10 Feb 2015 00:41:48 +0000 (16:41 -0800)]
textview: add support for underline and strikethrough colors
This commit adds the GtkTextTag:underline-rgba and :strikethrough-rgba
properties and the necessary plumbing to apply these colors in GtkTextLayout.
With this change, you can alter the color of underlines including those
of type PANGO_UNDERLINE_ERROR.
You might want to alter the underline color to differentiate between
spelling and grammer mistakes. In code editors, it is convenient to
differentiate between errors and warnings.
Note that the GtkTextAppearance struct is public ABI and has no spare
room for new fields, so we are resorting to some tricky packing to store
the colors in the unused pixel field of the fg_color and bg_color structs.
This packing is accomplished by the macros in gtktextattributesprivate.h.
Signed-off-by: Christian Hergert <christian@hergert.me>
https://bugzilla.gnome.org/show_bug.cgi?id=402168
Matthias Clasen [Wed, 18 Mar 2015 02:02:35 +0000 (22:02 -0400)]
GtkRange: Fix scroll wheel direction for horizontal ranges
The expected behavior here is that scrolling up goes towards
larger values, ie to the right. This matches e.g. volume
sliders in gnome-shell.
https://bugzilla.gnome.org/show_bug.cgi?id=737175
Matthias Clasen [Tue, 17 Mar 2015 12:54:45 +0000 (08:54 -0400)]
scrolled window: Use shift to modify scroll direction
It has been a long-standing request to interpret scroll events
with Shift held down as horizontal instead of vertical, and
some applications are already doing this on their own.
https://bugzilla.gnome.org/show_bug.cgi?id=132197
Matthias Clasen [Tue, 17 Mar 2015 23:38:18 +0000 (19:38 -0400)]
HighContrast: Fix calendar selection
The selected day was not differentiated from other
days at all. Render it white on black instead.
https://bugzilla.gnome.org/show_bug.cgi?id=746369
Matthias Clasen [Tue, 17 Mar 2015 23:34:15 +0000 (19:34 -0400)]
HighContrast: Fix color chooser marks
The checkmark for the selected color was always black,
making it more or less invisible on dark colors.
https://bugzilla.gnome.org/show_bug.cgi?id=746368
Jakub Steiner [Tue, 17 Mar 2015 22:55:10 +0000 (23:55 +0100)]
HighContrast: catch backdrop:insensitive:active of GtkSwitch
https://bugzilla.gnome.org/show_bug.cgi?id=746358
Jakub Steiner [Tue, 17 Mar 2015 22:42:11 +0000 (23:42 +0100)]
HighContrast: unbreak GtkExpander
- the open state is checked, not active now
https://bugzilla.gnome.org/show_bug.cgi?id=746370
Anders Jonsson [Tue, 17 Mar 2015 21:24:09 +0000 (21:24 +0000)]
Updated Swedish translation
Zahari Yurukov [Tue, 17 Mar 2015 21:03:13 +0000 (23:03 +0200)]
Updated Bulgarian translation
Jakub Steiner [Tue, 17 Mar 2015 17:18:18 +0000 (18:18 +0100)]
HightContrast: make tab buttons not shift size
- only 1px stroke for close buttons in notebook tabs
https://bugzilla.gnome.org/show_bug.cgi?id=746149
Jakub Steiner [Tue, 17 Mar 2015 14:46:22 +0000 (15:46 +0100)]
HighContrast: OSD fixes
- buttons
- labels
- scale trough/slider
https://bugzilla.gnome.org/show_bug.cgi?id=746148
Matthias Clasen [Tue, 17 Mar 2015 10:53:37 +0000 (06:53 -0400)]
Add to release notes
Mention that GtkSearchEntry now 'eats' some keys.
Matthias Clasen [Mon, 16 Mar 2015 20:32:27 +0000 (16:32 -0400)]
3.15.12
Milo Casagrande [Mon, 16 Mar 2015 20:37:06 +0000 (20:37 +0000)]
Updated Italian translation
Jakub Steiner [Mon, 16 Mar 2015 18:40:10 +0000 (19:40 +0100)]
Adwaita: desaturate selected color for backdrop
https://bugzilla.gnome.org/show_bug.cgi?id=746202
Matthias Clasen [Mon, 16 Mar 2015 18:05:48 +0000 (14:05 -0400)]
widget factory: Add an example for an insensitive model button
This will make it easier to make insensitive model buttons
appear properly in other themes.
Jonas Ådahl [Mon, 16 Mar 2015 12:00:50 +0000 (20:00 +0800)]
wayland: Move gtk-shell compatibility version define too
https://bugzilla.gnome.org/show_bug.cgi?id=745721
Matthias Clasen [Mon, 16 Mar 2015 16:51:56 +0000 (12:51 -0400)]
Don't pass invalid rectangles to cairo
This causes pixman warnings, or worse.
Clearly, something is not quite right here, if we end up
redrawing tabs at a time when the allocation is set to (1, 1).
For now, avoid straining the error handling in the lower layers.
https://bugzilla.gnome.org/show_bug.cgi?id=746301
Matthias Clasen [Mon, 16 Mar 2015 15:54:38 +0000 (11:54 -0400)]
unrealize: Don't ref twice
After the recent change to add an outermost ref/unref pair,
we can do away with the inner one.
Carlos Garnacho [Mon, 16 Mar 2015 12:57:03 +0000 (13:57 +0100)]
inspector: Remove flash timeout from widgets being unmapped
Otherwise the timeout can keep running, even if the widget is being
destroyed.
Carlos Garnacho [Mon, 16 Mar 2015 12:46:14 +0000 (13:46 +0100)]
window: Protect against popover destruction on ::unmap
On popover_unmap(), perform the gtk_widget_unmap() call last, so the
GtkWindowPopover data is ensured to be alive throughout the function
if the popover widget is destroyed right on ::unmap.
https://bugzilla.gnome.org/show_bug.cgi?id=745829
Carlos Garnacho [Mon, 16 Mar 2015 15:20:21 +0000 (16:20 +0100)]
widget: Take a ref during ::unrealize emission
In order to prevent invalid memory access/crashes if the widget is
destroyed in a callback of that signal.
https://bugzilla.gnome.org/show_bug.cgi?id=745829
Carlos Garnacho [Mon, 16 Mar 2015 12:45:03 +0000 (13:45 +0100)]
widget: Take a ref during ::unmap emission
This ensures the widget data stays live long enough to perform invariants
check after emission if the widget happens to be destroyed on a callback.
https://bugzilla.gnome.org/show_bug.cgi?id=745829
Zahari Yurukov [Sun, 15 Mar 2015 15:03:21 +0000 (17:03 +0200)]
Updated Bulgarian translation
Benjamin Otte [Mon, 16 Mar 2015 14:44:42 +0000 (15:44 +0100)]
reftests: Fix test on HighContrast theme
We are testing -gtk-icon-style and assume the theme doesn't touch it.
But HighContrast forces symbolic icons. And that breaks the reference
images.
So explicitly set "requested" for everything.
Benjamin Otte [Mon, 16 Mar 2015 14:18:33 +0000 (15:18 +0100)]
spinbutton: Fix get_text_area_size for vertical spinbuttons
Commit
c5905b13b97012fc9e9424718bdce34e0989f512 changed the semantics of
this vfunc and get_entry_size but I only fixed one of them in the
spinbutton subclass.
https://bugzilla.gnome.org/show_bug.cgi?id=746282
Jonas Ådahl [Fri, 13 Mar 2015 07:46:55 +0000 (15:46 +0800)]
wayland: Don't set the wl_surface user_data twice
wl_surface_add_listener already sets the user data pointer, so no need
to do it separately before.
https://bugzilla.gnome.org/show_bug.cgi?id=746141
Jonas Ådahl [Fri, 13 Mar 2015 07:43:49 +0000 (15:43 +0800)]
wayland: Ignore setting the same cursor theme as was already set
If the name and size of the theme is identical to the current
configuration, do nothing.
https://bugzilla.gnome.org/show_bug.cgi?id=746141
Jonas Ådahl [Fri, 13 Mar 2015 07:40:18 +0000 (15:40 +0800)]
wayland: Support scaling of theme based cursors
Support scaling of cursors created from themes. The default scale is
always 1, but if the pointer cursor surface enters an output with a
higher scale, load the larger version of the cursor theme and use the
image from that theme.
This assumes the theme size is set to one that fits with an output scale
= 1.
https://bugzilla.gnome.org/show_bug.cgi?id=746141
Jonas Ådahl [Fri, 13 Mar 2015 13:38:24 +0000 (21:38 +0800)]
wayland: Put interface version defines in a common place
So far only one, but put it somewhere all files can see it.
https://bugzilla.gnome.org/show_bug.cgi?id=746141
Jonas Ådahl [Fri, 13 Mar 2015 07:26:51 +0000 (15:26 +0800)]
wayland: Don't set cursor surface scale when we don't have a surface
The setting of the the surface scale even when the surface is not
created from a surface was introduced due to a crash when getting the
buffers when dividing by the scale. The only reason I can see this is
that we get the buffer from a non-existing surface when the wl_cursor
has not yet been set.
Instead, use the name field to avoid trying to use the non-existing
surface, effectively avoiding the division-by-zero that way.
https://bugzilla.gnome.org/show_bug.cgi?id=746141
Jakub Steiner [Mon, 16 Mar 2015 11:37:54 +0000 (12:37 +0100)]
HC: no border for insensitive backdrop buttons
https://bugzilla.gnome.org/show_bug.cgi?id=746192
Trần Ngọc Quân [Mon, 16 Mar 2015 07:45:46 +0000 (14:45 +0700)]
Updated Vietnamese translation
Signed-off-by: Trần Ngọc Quân <vnwildman@gmail.com>
Matthias Clasen [Mon, 16 Mar 2015 02:54:02 +0000 (22:54 -0400)]
widget-factory: Add an insensitive toolbutton
This will help getting their theming right in HighContrast.
Matthias Clasen [Mon, 16 Mar 2015 02:42:44 +0000 (22:42 -0400)]
widget-factory: Add tab close buttons
This will make it easier to fix issues with such buttons
in HighContrast.
Matthias Clasen [Mon, 16 Mar 2015 02:17:03 +0000 (22:17 -0400)]
gtk3-demo: Stop using follow-state
It is no longer needed.
Matthias Clasen [Mon, 16 Mar 2015 02:15:08 +0000 (22:15 -0400)]
print dialog: Stop using follow-state
It is no longer needed.
Matthias Clasen [Mon, 16 Mar 2015 02:14:47 +0000 (22:14 -0400)]
app chooser widget: Stop using follow-state
It is no longer needed.
Matthias Clasen [Mon, 16 Mar 2015 02:14:24 +0000 (22:14 -0400)]
places sidebar: Stop using follow-state
It is no longer needed.
Matthias Clasen [Mon, 16 Mar 2015 02:09:20 +0000 (22:09 -0400)]
widget-factory: Stop using follow-state
The property is no longer needed, cell renderers now
always follow state.
Josef Andersson [Sun, 15 Mar 2015 21:30:20 +0000 (21:30 +0000)]
Updated Swedish translation
Matej Urbančič [Sun, 15 Mar 2015 20:39:22 +0000 (21:39 +0100)]
Updated Slovenian translation
Ask Hjorth Larsen [Sun, 15 Mar 2015 13:46:54 +0000 (14:46 +0100)]
Updated Danish translation
Nelson Benítez León [Sat, 14 Mar 2015 10:38:40 +0000 (15:38 +0500)]
gemfile: needs add source rubygems.org
`bundle install` command on fedora 21 was failing
with following message:
Your Gemfile has no gem server sources. If you need
gems that are not already on your machine, add a line
like this to your Gemfile:
source 'https://rubygems.org'
After adding that line it worked again.
https://bugzilla.gnome.org/show_bug.cgi?id=746205
Piotr Drąg [Sat, 14 Mar 2015 16:59:27 +0000 (17:59 +0100)]
Updated POTFILES.in and POTFILES.skip
Benjamin Otte [Fri, 13 Mar 2015 17:04:51 +0000 (18:04 +0100)]
entry: Make code do what it's meant to do
With the 3.0 transition, this code went from just querying the entry's
height request to doing a full size request.
Then it got code to revert the features that a full size request does.
And then it grew code that manually computed the baseline.
Avoid this and just do what happened back in the days: Do a regular
height request.
This changes the semantics of the get_frame_size() vfunc wrt its
behavior towards subclasses overwriting the get_height() vfuncs, but I'm
happy to live with that.
Benjamin Otte [Sat, 14 Mar 2015 14:41:34 +0000 (15:41 +0100)]
cellrendererpixbuf: Always follow state
Applications forget to set the follow-state property and then some
themes used a style where normal symbolic icons have the same color as
prelit or selected backgrounds and that suddenly made icons invisible
and who wants that?
https://bugzilla.gnome.org/show_bug.cgi?id=746201
Carlos Soriano [Sat, 14 Mar 2015 12:34:40 +0000 (13:34 +0100)]
gtkstacksidebar: fix missing macro
commit
e41cadd835f9c2 forgot to change some macros.
Samir Ribic [Sat, 14 Mar 2015 09:08:02 +0000 (09:08 +0000)]
Updated Bosnian translation
Matthias Clasen [Sat, 14 Mar 2015 03:24:02 +0000 (23:24 -0400)]
More documentation fixes
With this commit, gtk3-unused.txt is empty (for the first
time in a looong time).
Matthias Clasen [Sat, 14 Mar 2015 02:57:32 +0000 (22:57 -0400)]
GtkStackSidebar: Fix incomplete renaming
Some of the boilerplate macros were missing. Oops
Matthias Clasen [Sat, 14 Mar 2015 02:01:47 +0000 (22:01 -0400)]
More documentation fixes
Matthias Clasen [Sat, 14 Mar 2015 01:59:38 +0000 (21:59 -0400)]
Docs: Update ignored header list
This reduces the warning spam somewhat.
Matthias Clasen [Sat, 14 Mar 2015 01:59:19 +0000 (21:59 -0400)]
Documentation fixes
Add a few missing symbols.