Commit Graph

32294 Commits

Author SHA1 Message Date
Benjamin Otte
3a65fbfc13 cssvalue: Implement dependency tracking for gradients 2012-08-28 15:42:25 +02:00
Benjamin Otte
3cf6db8b1a cssvalue: Handle dependencies for typed values 2012-08-28 15:42:24 +02:00
Benjamin Otte
11d0f9e408 css: Make color lookup handle dependencies 2012-08-28 15:42:24 +02:00
Matthias Clasen
27fd3fdf81 css: Handle some more simple cases of dependencies 2012-08-28 15:42:24 +02:00
Benjamin Otte
012526241a cssvalue: First step of proper dependency tracking
Instead of using the EVERYTHING aka FIXME value for tdependencies,
actually compute the dependencies in a bunch of simple cases.
2012-08-28 15:42:24 +02:00
Benjamin Otte
8ff08e7c5e stylecontext: Update computed values when dependencies change
This fixes the longstanding bug where GTK would not update styles when
parent styles would change.

https://bugzilla.gnome.org/show_bug.cgi?id=672046
2012-08-28 15:42:24 +02:00
Benjamin Otte
a770f0c3eb stylecontext: Refactor some code
This just changes the arguments passed to build_properties() and moves
that function around in the source file. No functional changes are
happening.
2012-08-28 15:42:24 +02:00
Benjamin Otte
1d7b23845f css: Pass relevant properties to css lookup code
This is not used yet in this patch.
2012-08-28 15:42:24 +02:00
Benjamin Otte
6fbd8b0003 computedvalues: Pass dependencies to set_value()
This simplifies the code.
2012-08-28 15:42:24 +02:00
Benjamin Otte
8874a06ba0 stylecontext: Compute correct changes
... in the case where no change of the DOM tree actually happened.

We don't do anything yet with that information, this patch just
correctly computes it.
2012-08-28 15:42:24 +02:00
Benjamin Otte
5d2acb1fe9 stylecontext: Split out a function for simplicity 2012-08-28 15:42:23 +02:00
Benjamin Otte
9b228c59d5 cssomputedvalues: Track dependencies
We now track what values have dependencies on what other values so that
we could in theory recompute them when we need to.
2012-08-28 15:42:23 +02:00
Benjamin Otte
2cb9dac14c stylecontext: Pass the changes in the parent to validation function
This way, inherited properties can be updated.
2012-08-28 15:42:23 +02:00
Benjamin Otte
0e2f35ed88 css: Introduce dependencies for value computations
When values are computed, they might depend on various other values and
we need to track this so we can update the values when those other
values change. This is the first step in making that happen.

This patch does not do any dependency tracking at all, instead it uses
GTK_CSS_DEPENDS_ON_EVERYTHING as a sort of FIXME.
2012-08-28 15:42:23 +02:00
Benjamin Otte
9e7e65ca6e css: Move computing of initial and inherit values
... to the compute vfunc. Simplifies code quite a bit. But makes the
code no longer a simple step-by-step implementation of the spec.
2012-08-28 15:40:57 +02:00
Benjamin Otte
6dc3113edc cssstyleproperty: Get rid of unused API
Both _gtk_css_style_property_print_value() and
_gtk_css_style_property_compute_value() aren't necessary anymore and are
replaced by _gtk_css_value_print() and _gtk_css_value_comptue()
respectively.
2012-08-28 15:40:57 +02:00
Benjamin Otte
36c79712a1 csscustomproperty: Move compute code to GtkCssTypedValue
This way, we don't need the print_value vfunc anymore.
2012-08-28 15:40:57 +02:00
Benjamin Otte
c9b918b70f cssstyleproperty: Don't set print or compute vfuncs anymore
Nobody does that these days.
2012-08-28 15:40:57 +02:00
Benjamin Otte
ec4c1e5682 cssstyleproperty: Remove all useless compute vfuncs
Now that we call _compute() by default, we don't need any special cases
anymore that do the same thing.
2012-08-28 15:40:57 +02:00
Benjamin Otte
bc5d383b9d cssstyleproperty: Call _compute() in the compute function
... instead pof just reffing the value.
2012-08-28 15:40:57 +02:00
Benjamin Otte
c0df9067dc css: Move special case for 0px borders
This is in preparation for the next commits.
2012-08-28 15:40:56 +02:00
Benjamin Otte
09f9fd42b4 css: Fold color value computation into gtksymboliccolor.c
This gets rid of the public function
_gtk_css_rgba_value_compute_from_symbolic().
The fallback is now handled using a switch statement instead of letting
the caller pass the function.
2012-08-28 15:40:56 +02:00
Benjamin Otte
9b4ed66218 css: Pass property_id to compute function
This is a reorganization of how value computing should be done.
Previously the GtkCssStyleProperty.compute vfunc was supposed to take
care of special cases when it needed those for computation. However,
this proved to be very complicated in cases where values were nested and
only the last value (of a common type) needed to be special cased.

A common example for this was the fallback handling for unresolvable
colors.

Now, we pass the property's ID along with all compute functions so we
can do the special casing where it's necessary.
Note that no actual changes happen in this commit. This will happen in
follow-ups.
2012-08-28 15:40:56 +02:00
Benjamin Otte
9b953829fb css: Introduce _gtk_css_value_compute()
This commit is essentially a large reorganization. Instead of all value
subtypes having their own compute function, there is the general
_gtk_css_value_compute() function that then calls a vfunc on the
subtype.
2012-08-28 15:40:56 +02:00
Nilamdyuti Goswami
3f00801e9a Implemented FUEL entries to Assamese translation 2012-08-28 00:25:52 +05:30
Nilamdyuti Goswami
d70ccc67dd Implemented FUEL entries to Assamese translation 2012-08-28 00:25:52 +05:30
Jiro Matsuzawa
6bd45f9503 [l10n] Update Japanese translation 2012-08-28 00:03:02 +09:00
Kjartan Maraas
5ccf7913b2 Updated Norwegian bokmål translation 2012-08-27 10:24:01 +02:00
Adel Gadllah
13a821e70b gkimmulticontext: Remove left over debug print
Remove the g_print debug statement from propagate_purpose.

https://bugzilla.gnome.org/show_bug.cgi?id=682747
2012-08-26 22:26:23 -04:00
Tom Tryfonidis
7bc85458cc Updated Greek translations 2012-08-26 23:05:07 +03:00
Nilamdyuti Goswami
488305d2b4 Assamese translation updated 2012-08-26 22:06:09 +05:30
Nilamdyuti Goswami
322a1e72f9 Assamese translation updated 2012-08-26 22:00:31 +05:30
William Jon McCann
b3a65248f5 Fix a typo in the the comments
https://bugzilla.gnome.org/show_bug.cgi?id=682724
2012-08-26 22:54:55 +08:00
Piotr Drąg
45cc254431 Updated Polish translation 2012-08-26 14:52:56 +02:00
Thomas Hindoe Paaboel Andersen
3e7b66fcee Docs: GtkAspectFrame: use top/bottom for vertical alignment
Before left/right was used.

https://bugzilla.gnome.org/show_bug.cgi?id=682662
2012-08-26 01:01:59 +02:00
Timothy Arceri
2ab8e75319 Use new printer setting to reduce code required by application
Updated demo to use new setting that allows an application to change the
output filename without the need to create the uri itself.

https://bugzilla.gnome.org/show_bug.cgi?id=676787
2012-08-25 17:47:55 -04:00
Matthias Clasen
870c39fafe GtkIMMultcontext: Propagate input purpose and hints
The lack of this was pointed out by Carlos Garnacho in
https://bugzilla.gnome.org/show_bug.cgi?id=651244
2012-08-25 15:42:42 -04:00
Carlos Garnacho
8d4487b0be Add GTK_INPUT_HINT_INHIBIT_OSK to GtkInputHints
This hint may be used in text widgets to inhibit their
input methods. The most compelling usecase is calculator
applications, which already have a builtin and better
suited onscreen keyboard.

https://bugzilla.gnome.org/show_bug.cgi?id=651244
2012-08-25 15:42:30 -04:00
Matthias Clasen
0cb56312b9 Trivial: Fix a whitespace messup
Pointed out by Carlos Garnacho in bug 651244.
2012-08-25 14:24:20 -04:00
Daniel Mustieles
3b495daccc Updated Spanish translation 2012-08-25 12:08:08 +02:00
Nguyễn Thái Ngọc Duy
ac0c937d2c Updated Vietnamese translation 2012-08-25 11:19:37 +07:00
Nguyễn Thái Ngọc Duy
f98b501b12 po/vi: import from Damned Lies 2012-08-25 11:17:02 +07:00
Piotr Drąg
4c36ba89a2 Updated Polish translation 2012-08-25 00:29:48 +02:00
William Jon McCann
e296bff85f Improve the layout of the mount operation dialog
This improves the layout of the mount operations dialog to:
 * Make primary labels bold in all cases
 * Lay out the widgets in a grid
 * Put space between the two radio groups to distinguish them

https://bugzilla.gnome.org/show_bug.cgi?id=682552
2012-08-24 18:10:39 -04:00
Daniel Mustieles
b078b9af86 Updated Spanish translation 2012-08-23 17:42:22 +02:00
Alexander Larsson
29a42085c6 Remove gdk_window_flush_if_exposing as its not needed anymore
We no longer support modifying GdkWindow hierarchies during
expose events. This is not working anymore anyway as the
flush operation now does not push already rendered pixels
in the flushed window from the double buffer to the window.

https://bugzilla.gnome.org/show_bug.cgi?id=679144
2012-08-23 16:31:31 +02:00
Alexander Larsson
e112cdacd4 Fix flashing in non-double-buffered widgets
Avoid copying back partially drawn double-buffer data
when flushing to avoid flicker. This means non double
buffered widgets must draw opaque pixels in its expose
handlers, and that you are not allowed to use direct
rendering (or modify GdkWindow pos/size/order) from
inside the expose handler of a double buffered widget.

See https://bugzilla.gnome.org/show_bug.cgi?id=679144 for more
details
2012-08-23 16:31:30 +02:00
Ryan Lortie
828a97d773 GtkWidget: fix insert_action_group(NULL)
gtk_widget_insert_action_group (widget, "foo", NULL) is valid, but
g_action_muxer_insert (muxer, "foo", NULL) is not.  Use
g_action_muxer_remove() for that case.
2012-08-23 08:18:11 -04:00
Alexander Larsson
820b0cafe0 gdkwindow.c: Fix up window debug code
Make this build and fully print clip regions.
2012-08-23 12:16:43 +02:00
Alexander Larsson
04811d9483 Avoid unnecessary window flushes
The code was calling _gdk_window_ref_cairo_surface in a few places
where the intent was not to read/write to the surface, but just look
at its type (to e.g. create a similar surface). This is bad, as that
operation causes a flush which may cause unnecessary work and/or
flashing. Instead we just get the impl surface in these cases.
2012-08-23 12:16:43 +02:00