Commit Graph

32834 Commits

Author SHA1 Message Date
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
Benjamin Otte
1d6e896fef sizegroup: Move GtkSizeGroupMode to gtkenums.h
This is in preparation for the next patch, which would otherwise lead to
conflicts.
2012-11-04 15:24:18 +01:00
Benjamin Otte
62f5414742 sizerequest: Cache sizes without size groups
We compute on-demand for size groups anyway, so we can (in theory, this
patch doesn't do that yet) get around costly cache blowing when
invalidating single widgets of a size group this way.
2012-11-04 15:24:17 +01:00
Benjamin Otte
be1bde9111 sizegroups: Use is_visible() instead of get_mapped() for visibility
The current approach of using gtk_widget_get_mapped() is broken:
The usual steps taken when showing a window are:
(1) request the sizes
(2) allocate the sizes
(3) show the window in the allocated size

Showing the window with a random size between steps (1) and (2) would of
course
result in extra work and potential flickering when the widgets get
resized to
their proper sizes.

However, as GtkSizeGroup::ignore-hidden uses gtk_widget_get_mapped() to
determine visibility for a widget, the following will happen:
(1) the widget will request a 0 size
(2) the widget will be allocated a 0 size
(3) the widget will be too small when it is shown

gtk_widget_get_visible() however is set in advance. Note that toggling
visibility also causes a gtk-widget_queue_resize() call already so we
take care of changes in here automatically.
2012-11-04 15:24:17 +01:00
Benjamin Otte
48ff2fc7ed API: Add gtk_widget_is_visible()
This is a recursive gtk_widget_get_visible(): Returns TRUE if the widget
and all its parents are visible.
2012-11-04 15:24:17 +01:00
Benjamin Otte
9f6067a804 sizegroup: Handle hfw in size groups 2012-11-04 15:24:17 +01:00
Benjamin Otte
c8f2328337 sizegroup: Add a function for clarity
... and restructure code to accomodate that function.
2012-11-04 15:24:17 +01:00
Benjamin Otte
dbbdefe4e0 sizegroup: Don't keep groups around everywhere
The code is only interested in the actual widgets that belong together,
not in the groups. So just don't return the groups.
2012-11-04 15:24:17 +01:00
Benjamin Otte
dfea266e1f sizegroup: Check ignore_hidden flag when adding groups
Instead of only checking the ignore_hidden flag when getting the
preferred sizes, respect it already when constructing the list of
widgets. This way, widgets don't queue resizes for groups they're
ignored in anyway.
2012-11-04 15:24:17 +01:00
Benjamin Otte
a1f6887f17 sizegroup: Use for loops
For loops to loop over lists look nicer and actually do the right thing
with "break" and "continue" statements. So they are vastly preferred to
while loops.
2012-11-04 15:24:17 +01:00
Benjamin Otte
8796fe6d1c sizegroups: Restructure code
This way, we do the checks at the start of the effected function, not
before calling it.
2012-11-04 15:24:16 +01:00
Benjamin Otte
8710d97945 sizegroup: Don't cache the sizes anymore
This simplifies code and because sizes are cached by the widgets
themselves, it's not a large performance problem (unless people use huge
amounts of widgets in a single size group, but who does that?
2012-11-04 15:24:16 +01:00
Federico Mena Quintero
9c6e560819 Merge branch 'bgo687196-filesystemmodel-crash' 2012-11-02 14:13:02 -06:00