Commit Graph

32996 Commits

Author SHA1 Message Date
Alexander Larsson
e60c9219f1 Make _gtk_css_lookup_get_missing inline
This is called a lot in the loop in gtk_css_style_provider_lookup which
actually showed up on profiles.
2012-11-09 10:16:23 +01:00
Alexander Larsson
1c4158a649 gtk_css_style_provider_lookup: minor loop optimiziation
This is a minor performance improvement but this loop
is run a lot so it actually matters in large state
changes.
2012-11-09 10:16:18 +01:00
Alexander Larsson
55d65571f3 Exit early in gtk_style_context_update_cache codepaths
If lookup->missing is empty we don't need to continue looking.
We short circuit in several places as this can happen
after iteratively makeign lookup->missing smaller.
2012-11-09 10:15:23 +01:00
Alexander Larsson
77912a65e2 Fix cnp bug in _gtk_bitmask_intersects
We need to use the allocated codepath if *any* argument is
allocated, not if one arg is not allocated.
This bug caused unnecessary calls to _gtk_bitmask_is_allocated,
as well as return completely wrong result if both bitmask are
allocated.
2012-11-09 10:11:47 +01:00
Alexander Larsson
8a40d8fe2a gdk: Add gdk_window_has_alpha helper
This centralizes the current checks for has_alpha_bg, which
lets us extend the check later.

https://bugzilla.gnome.org/show_bug.cgi?id=687842
2012-11-09 10:08:22 +01:00
Alexander Larsson
c94002f8c0 Add "parent widget" button to test property editor
Without this its hard to access the properties of container
widgets.

https://bugzilla.gnome.org/show_bug.cgi?id=687842
2012-11-09 10:08:22 +01:00
Jasper St. Pierre
f4438a1ffc gtkbin: Remove the silliest code on earth
What is this bin doing with all these crazy deltas? Company does:

<Company> that can safely be removed
<Company> in general, code that isn't obvious can either be understood
<Company> with a bit of thinking or it can be removed
<Company> if in doubt, go for the 2nd of those :)

Most GtkBin subclasses override this strange garbage anyway, so it's
not like this code is ever *run*, per se. Just make it proxy directly
to the child, and hope nothing goes wrong.
2012-11-08 19:19:53 -05:00
Jasper St. Pierre
3563d11fc6 gtkbin: Complete more of a base implementation for GtkBin subclasses
Implement get_preferred_width, get_preferred_height, and size_allocate.
This allows GtkBin subclasses to be quick and easy, without the
author doing the subclassing to have to do much work.
2012-11-08 19:19:46 -05:00
Jasper St. Pierre
7b950944b0 gtkversion.h.in: Put the documentation inside the header guards
This fixes a warning with gobject-introspecion scanning
2012-11-08 19:19:00 -05:00
Benjamin Otte
ffeef28dbc reftests: Add test for recent fix 2012-11-08 23:34:30 +01:00
Benjamin Otte
0d9a45d460 label: Fix another sizing corner case causing segfaults
If the "wider" label is the smaller one, use the wider size for both
cases. This can happen when ellipsizing a single character, which is
often smaller than the ellipsizing glpyph(s).
2012-11-08 23:34:30 +01:00
Benjamin Otte
947fed0961 stylecontext: Fix a memleak 2012-11-08 23:34:30 +01:00
Benjamin Otte
ba88174614 stylecontext: Remove unused function 2012-11-08 23:34:29 +01:00
Benjamin Otte
598f86eaf3 cssvalue: Convert shadows to GtkCssColorValue 2012-11-08 23:34:29 +01:00
Benjamin Otte
3cb6ae3df3 cssimage: Use GtkCssColorValue 2012-11-08 23:34:29 +01:00
Benjamin Otte
bd31bd6d63 cssstyleproperty: Replace symbolic colors with GtkCssColorValue 2012-11-08 23:34:29 +01:00
Benjamin Otte
e3f407a71d cssvalue: Add GtkCssColorValue
This is mostly copy/paste from GtkSymbolicColor and is indeed intended
to replace it.
2012-11-08 23:34:06 +01:00
Benjamin Otte
1a213679bd symboliccolor: Change the print output
Functions should not have a space before the opening parenthesis. So
change output like
  alpha (@color, 0.5)
to
  alpha(@color, 0.5)
and do the same for "shade" and "mix".

Tests have been updated accordingly.
2012-11-08 23:34:06 +01:00
Benjamin Otte
e063a0fdf1 symboliccolor: Split out HSLA code 2012-11-08 23:34:05 +01:00
Matthias Clasen
cff4718e91 Update a11y test results
These are expected changes, since a11y class name show up in the
dumps.
2012-11-07 20:21:50 -05:00
Matthias Clasen
ffa42cb5bb Nuke GtkBoxAccessible
It didn't contain anything useful.
2012-11-07 20:17:30 -05:00
Cosimo Cecchi
f9db800713 text-cell-accessible: fix a double unref
We're unreffing the GtkCellRenderer object twice, causing the
application to crash when trying to access the renderer later.

https://bugzilla.gnome.org/show_bug.cgi?id=687872
2012-11-07 15:46:16 -05:00
Cheng-Chia Tseng
178e072e8a Updated Traditional Chinese translation(Hong Kong and Taiwan) 2012-11-07 02:35:44 +08:00
Benjamin Otte
b42a4e2276 gradient: Add color stops to the right gradient
This was causing an infinite loop happily eating up memory.

https://bugzilla.gnome.org/show_bug.cgi?id=687467
2012-11-06 21:29:58 +01:00
Benjamin Otte
5e59033eb3 tests: Include config.h 2012-11-06 21:29:58 +01:00
Benjamin Otte
58021c9e98 Disable deprecation checks for all libraries we depend on on stable branches.
This is so newer versions of those libraries don't cause more warnings
with a stable GTK version.
We don't ever want to turn off deprecation warnings for master however,
because that's where we get rid of deprecated API we use.

Note that only glib allows use to easily do this, so nothing is done for
Pango, gdk-pixbuf or Cairo here.
2012-11-06 21:29:58 +01:00
Benjamin Otte
e9dc0e391d cssimage: Fix huge memleak
When transitioning gradients, we were leaking the gradient structs. Not
good.

https://bugzilla.gnome.org/show_bug.cgi?id=687467
2012-11-06 18:04:10 +01:00
Cosimo Cecchi
9876fc4f17 css: Fix copy/paste error
Benjamin replaced start with end in a bunch of locations, but not all of
them apparently.
2012-11-06 18:04:10 +01:00
Piotr Drąg
aa534812f5 Updated POTFILES.skip 2012-11-05 23:04:55 +01:00
Benjamin Otte
959bfbb66e reftests: Add a reftest for latest fix 2012-11-05 19:34:23 +01:00
Benjamin Otte
debe81b1ea label: Handle crazy corner cases
With ellipsizing, the ellipsized text can have a smaller height than the
non-ellipsized text. So the wider text is also higher. Example:
  .<big>TEXT</big>
will ellipsize to the small text.

Reported-By: Rico Tzschichholz <ricotz@t-online.de>
2012-11-05 19:34:23 +01:00
Adorilson Bezerra
cdadbb069f Fixed Brazilian Portuguese Translation 2012-11-05 12:12:32 -02:00
Matthias Clasen
9ebeb4e68a Bump GLib dependency to 2.35
And drop deprecated g_type_init() calls.
2012-11-04 13:01:38 -05:00
Benjamin Otte
8bdc2aa228 reftests: Add test for recent fix
This test checks the fix in a46368dede
2012-11-04 17:58:18 +01:00
Benjamin Otte
075667e927 reftests: Mark windows as popup
This makes the tests run faster and should always be done.
2012-11-04 17:58:06 +01:00
Stefano Facchini
a46368dede sizerequest: do not derefence NULL pointers 2012-11-04 17:48:02 +01:00
Paolo Borelli
1beb9db7b0 gtkmenubutton: remove weak pointer when needed
We must make sure to remove the weak pointer when disposing the widget
or when resetting the align widget otherwise glib will try to nullify
invalid memory.
2012-11-04 17:12:14 +01:00
Paolo Borelli
5830363787 gtkmenubutton: set menu to NULL in dispose.
Prevent menu to be detached multiple times.
2012-11-04 17:12:14 +01:00
Benjamin Otte
7f870abf17 sizerequest: Restructure code
Make the compute_size_request() function take into account size groups
itself instead of doing a weird "bump_requisition" call.
2012-11-04 16:10:20 +01:00
Benjamin Otte
7501f9770f sizerequest: Move sizegroups function to different source file 2012-11-04 16:02:14 +01:00
Benjamin Otte
8bdff7a564 sizegroup: Construct the set of sizegroup peers as a hash table
This way we don't need a marker on GtkWidgetParivate that needs to be
unset later, so we have all our data in the same place and can avoid
problems with reentrancy and shenanigans like that.

But the main reason I wrote that is cleaner code.
2012-11-04 15:47:03 +01:00
Benjamin Otte
1ef057f983 reftests: Add a test from evolution
This was used in a bug report.

https://bugzilla.gnome.org/show_bug.cgi?id=677609
2012-11-04 15:28:43 +01:00
Benjamin Otte
756ebea036 reftests: Add a test for all the recent sizegroup hackery 2012-11-04 15:28:43 +01:00
Benjamin Otte
dd6931d1ba sizegroup: Use _gtk_widget_compute_size_for_orientation()
With this function now available, we can do size computation in 2
ways:
(1) Compute size with size groups
(2) Compute size without size groups

And have (1) use (2) instead of setting flags on widgets. This patch
does exactly that.
2012-11-04 15:28:43 +01:00
Benjamin Otte
c3148a81d2 sizerequest: Move optimization
With size groups now doing hfw, doing the optimization for CONSTANT_SIZE
was done too early. Size groups need to know that it's a hfw request, so
the other widgets in the size group get the correct behavior.
2012-11-04 15:28:43 +01:00
Benjamin Otte
aba0c5cc3b label: Redo get_preferred_width/height()
This is important for size groups mostly, but also has some small fixes.
The label-sizing reftest as been updated accordingly.
2012-11-04 15:28:43 +01:00
Benjamin Otte
f55fe7e20b label: Fix ellipsize and wrap being set
The label code assumed that Pango treats this as "wrap to as much space
as possible and then ellipsize all the lines", but for Pango, ellipsize
takes precedence over wrap. So do the same thing in GtkLabel.

Also updated is the reftest that checked this behavior.
2012-11-04 15:28:43 +01:00
Benjamin Otte
035e55d1ab reftests: Improve reftest performance
Get rid of all the event boxes in this test. Event boxes need GDK
windows which cost a lot of performance when running the test and they
clip the label output.

Getting rid of the clipping also shows 2 bugs in this test that weren't
visible before. Those will be fixed in a followup patch.
2012-11-04 15:28:42 +01:00
Benjamin Otte
f48b30c13a reftests: Make label-sizing tests use better CSS
ow that labels can have backgrounds, just use label backgrounds
2012-11-04 15:28:42 +01:00
Benjamin Otte
02bc589583 sizerequest: Export _gtk_widget_compute_size_for_orientation()
and add an "ignore_size_groups" flag to it. This way we can use it for
size group shenanigans.
2012-11-04 15:24:18 +01:00