Benjamin Otte [Tue, 27 Mar 2012 03:11:58 +0000 (05:11 +0200)]
stylepropertyimpl: Add color parsing function
This is in preparation for removing the specified type and computed type
properties from GtkCssStyleProperty, which is in preparation for really
using GtkCssValue classes and not GTypes.
Benjamin Otte [Mon, 26 Mar 2012 23:43:12 +0000 (01:43 +0200)]
cssvalue: Add _gtk_css_value_equal()
For now, we return FALSE for all default css values, so this is not very
useful.
I also think of this as an optimization equal, not a guaranteed equal,
because we don't even have a notion of what "equal" means.
For example, for background-repeat, "repeat, repeat" and "repeat"
are functionally equivalent. But the cssvalue has no idea that it's used
for background-repeat.
As a more complicated example, "repeat, no-repeat" and "repeat" are
equal to what one sees as long as there's only one image listed
background-image-source. But once you start transition'ing to an image
with 2 sources, it's different...
Benjamin Otte [Mon, 26 Mar 2012 16:58:23 +0000 (18:58 +0200)]
tests: Change expected errors to conform with output
This change isn't strictly correct, but I can't be bothered until we get
a tokenizer that can really differentiate between allowed values and
invalid syntax.
Benjamin Otte [Sun, 18 Mar 2012 22:02:33 +0000 (23:02 +0100)]
stylecontext: Add setter for widget
... and actually set the widget on the style context. Note that this
function does not take a reference on the widget, which is a very good
reason to keep it private.
Benjamin Otte [Sun, 18 Mar 2012 15:13:09 +0000 (16:13 +0100)]
matcher: Add a superset matcher
This matcher always matches only on some relvant things and ignores the
rest. This allows you to match only on name and class, but ignore state
and parents/siblings for example.
Benjamin Otte [Sun, 18 Mar 2012 01:11:44 +0000 (02:11 +0100)]
selector: Rewrite position tracking
We now track the position as a (type,a,b) tuple where the numbers make
up the an + b formula from CSS3 nth-child.
Also, the get_sibling() and get_sibling_index() vfuncs were replaced by
a has_position() vfunc. This is mostly so that the matcher can always
return TRUE. And I need that for the everything matcher.
Benjamin Otte [Fri, 16 Mar 2012 04:14:41 +0000 (05:14 +0100)]
styleprovider: Add a custom object for a list of style providers
This way, we don't have to do magic inside GtkStyleContext, but have a
real API.
As a cute bonus, this object implements GtkStyleProvider itself. So we
can just pretend there's only one provider.
Rob Bradford [Mon, 16 Apr 2012 14:29:44 +0000 (15:29 +0100)]
build: Add an enable flag to allow enabling Cairo GL backend
This change adds --enable-wayland-cairo-gl which turns on the define used in
the Wayland backend to determine whether to use EGL surfaces with Cairo GL or
whether to use the Cairo image backend with an SHM surface (the default).
Part of the fix for: https://bugzilla.gnome.org/show_bug.cgi?id=672361
Rob Bradford [Wed, 4 Apr 2012 16:20:13 +0000 (17:20 +0100)]
wayland: Add support for rendering into an SHM buffer with Cairo image backend
The first version of this change included a bug that meant that if you don't
compile for any other backend then it wouldn't search for cairo. Credit for
identifying the bug goes to darxus@chaosreigns.com.
Michael Vogt [Mon, 16 Apr 2012 04:51:43 +0000 (06:51 +0200)]
GtkImage: Move g_clear_object() to gtk_image_finalize()
This moves the freeing of the icon_helper from the destory to the finalize
function to avoid segfaults when trying to access a destroyed object before it
is disposed. This often happens in signal handlers which get called
asynchronously after destroy.
application-window: try to use the desktop name in the fallback menu
Try to fetch the name from the application desktop file for the
fallback menu if possible, instead of forcing applications to use
g_set_application_name or hardcoding "Application".
In the Quartz backend, there are two methods by which windows are
resized. The first method is fully handled by Quartz and does not appear
in the event stream the application resizes. The second method is when
we resize windows by ourselves. In OS X this happens when a GTK+ resize
grip is used. This resize grip is larger than the Quartz resize grip.
When the resize is started outside the "Quartz area", we have to handle
it by ourselves.
This patch fixes this manual window resizing by ignoring events while we
are in the process of resizing (such that the events actually arrive at
the sendEvent handler of GdkQuartzWindow where this resize is handled).
When the resize has finished we break all grabs such that GDK is not
stuck thinking the cursor is still in the resize window.
Benjamin Otte [Tue, 10 Apr 2012 14:14:59 +0000 (16:14 +0200)]
Revert part of "textview: Remove extra magic for drawing children"
This partially reverts commit df37446f9b4116887865b7ecfddeb535fbc0eacb.
The commit changed API that was public (or at least semi-public) and
it's not worth changing that.
entrycompletion: set_property() should call property setters
gtk_entry_completion_set_property() was setting many properties by
directly modifying priv values, bypassing notification invocation and
possibly another actions done by gtk_completion_entry_set_xxx ()
functions. Fix by invoking set_xxx() instead of setting the property
value directly.
The real bug observerd was that setting text-column property using
g_object_set() caused SIGFPE later when entry completion was about to
appear. gtk_entry_completion_set_text_column () apparently does way
more important things than just setting priv->text_column member.