Makefile.decl does not work well with scripts that stay
in srcdir, so generate test-simplify from test-simplify.in,
just os that it ends up in builddir.
"Yo, we heard you like traversing NULL-terminated arrays to operate on
them, so we called g_strv_length() as the for condition, so you can
iterate the array while iterating the array."
Instead of making famed rapper and television producer Xzibit proud, we
should avoid calling g_strv_length() on an array while looping on the
array, to avoid quadratic complexity.
We do this in various places that deal with arrays of strings that we
cannot really guess are short enough not to matter — e.g. the list of
CSS selectors in the inspector, or the required authentication
information for printing.
Previously, the unpremultiplied values from the GdkRGBA were taken. Now
we premultiply the color values as specified by the CSS specs.
This is only relevant when transitioning with translucent colors.
An example is the halfway transition between transparent (0, 0, 0, 0)
and white (1, 1, 1, 1). Previously, all 4 values where transitioned
separately and the result was semi-transparent gray (0.5, 0.5, 0.5,
0.5).
By depending on the alpha value, the result is now semi-transparent
white (1, 1, 1, 0.5) which is what one would naively expect.
New reftest: color-transition
On some slower machines (e.g. an ARM OBS builder), this test is failing
with a race condition where we're trying to fetch the style before it's
applied.
https://bugzilla.gnome.org/show_bug.cgi?id=749593
gtk-reftest already had an --output=DIR option to tell it where
to save all the resulting images. Now you can combine this with
the --compare-with=DIR option in a second run to make gtk-reftest
compare the .out.png files from the first run with the .out.png
files of the current run, instead of producing .ref.png files.
The intended use for this is to verify that changes do not affect
the generated output.
Sometimes path nodes can survive longer than the style context that
created them. Don't crash in those cases.
Fixes startup of mutter.
Testcase included.
https://bugzilla.gnome.org/show_bug.cgi?id=746407
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.
It seems to be buggy in ways that make the test fail
with a critical when the test bus is brought down.
At the same time, drop manual settings of environment
variables that we can set globally.
gtk_tree_selection_real_modify_range() has a g_return_if_fail() if the
start or end paths passed to it do not correspond to real tree nodes.
However, GtkTreePaths inherently do not have to be valid, so it should
be acceptable to call gtk_tree_selection_select_range() with
non-existent paths. Replace the g_return_if_fail() by a silent return,
and add a unit test.
https://bugzilla.gnome.org/show_bug.cgi?id=712760
Don't try to paint onto an error surface. This happens for example when
gdk_cairo_set_source_pixbuf() is called with a pixbuf that is too big
for Cairo to handle.
Spotted by Christian Boxdörfer
GPUs generally have problems when you create a 35000px wide surface.
Luckily X catches this and sends a BadAlloc. Which GTK immediately
abort()s on.
Testcase included.
https://bugzilla.redhat.com/show_bug.cgi?id=1163579
If a side of the box is 0px wide, make the corners owned by the adjacent
sides. This avoids spilling over of unwanted colors from the 0-width
side into the corner.
New test for this case is included.
After 3a337156d1 style lookups still used
the parent context's style as the parent style, even though after a
gtk_style_context_save() the root style of the style context is the
proper parent.
Testcase attached.
1) Use font-size instead of color
This makes it easier to compare reference and test because the values
don't change.
2) Actually sort the reference properly
This unbreaks the test.
We recently changed the uppercase licensing text to lower case. The
reference test that checks the contents of the about dialog has to be
fixed to reflect that change.
These turned out to break existing ui files, concretely
GWeatherLocationEntry was no longer guessed correctly.
Update the testcases to reflect this, and add a testcase
for GWeather.
This fixes shadows that are animated not updating the clip of the widget
they are drawn on. An example of this are the buttons in the CSS shadows
example in gtk-demo.
Reftest included
Remove checks for NULL before g_free() and g_clear_object().
Merge check for NULL, freeing of pointer and its setting
to NULL by g_clear_pointer().
https://bugzilla.gnome.org/show_bug.cgi?id=733157
Windows needs a shared library to link the modules against, otherwise
the undefined symbols make it not work.
So build a shared library on Windows.
We don't want a library elsewhere, as that just complicates things, so
we only make the library shared on Windows and keep it as a noinst
library otherwise.
https://bugzilla.gnome.org/show_bug.cgi?id=736338
This is a noinst library for now, but the idea is to turn it into a
proper DLL on Windows, so that we can install it and properly link the
modules to it. Windows doesn't allow undefined symbols in modules.
https://bugzilla.gnome.org/show_bug.cgi?id=736338
... just because there is no style context instantiated yet. Instead,
instantiate a style context during realize() and ask it.
Fixes problems with dim labels not being dimmed on first show.
Testcase included.
https://bugzilla.gnome.org/show_bug.cgi?id=735240
Just pretend that the main widget is an empty widget the size of the
overlay.
Makes it possible to write testcases where no size requests are run on
overlay widgets before size_allocate() is called.
Testcase included.
with non-installed tests the build would get an empty $(reftestdir)
which would screw up the LDFLAGS.
An rpath seems to be required to make libtool build a shared object.
Without an rpath line, it only builds a static object.
https://bugzilla.gnome.org/show_bug.cgi?id=735401
NULL was returned in case of an empty last line. Every users needed to
special-case this. Now it will return the expected result: char_len of 0
with one PangoLogAttr.
In compute_log_attrs(), 'paragraph' will be the empty string "" with
'char_len' == 0.
pango_get_log_attrs() works fine with an empty string, it will return
one correct PangoLogAttr (because there is one text position for the
empty string).
It fixes the unit tests for gtk_text_iter_is_cursor_position().
https://bugzilla.gnome.org/show_bug.cgi?id=156164
For functions using _gtk_text_buffer_get_line_log_attrs():
- gtk_text_buffer_backspace()
- some gtk_text_iter functions (word/sentence/cursor boundaries)
As the FIXME comments show, there is a bug with
gtk_text_iter_is_cursor_position() for an empty last line.
https://bugzilla.gnome.org/show_bug.cgi?id=156164