Alexander Larsson
410541f82b
Rename GtkIcon to GtkIconPaintable
2020-02-04 17:19:22 +01:00
Benjamin Otte
138de60ab2
icontheme: Remove GENERIC_FALLBACKS
...
Instead, rely on people passing fallbacks explicitly.
Alternatively, GThemedIcon provides the functionality to create
fallbacks, which is what GtkImage and the testsuite now use.
That method is slightly better, too, so the expected test results
have been updated accordingly.
2020-02-04 16:51:54 +01:00
Benjamin Otte
571021cbc1
icontheme: Pass fallbacks as optional argument to lookup_icon()
...
This way, we can remove gtk_icon_theme_choose_icon() completely.
2020-02-04 16:51:54 +01:00
Benjamin Otte
f7a5dd7b8b
icontheme: Remove contexts
...
There is no way to query contexts or do anything useful with them.
So don't keep track of them and don't make them an argument in public
APIs with the docs saying "I don't know what to use here, maybe read
some spec somewhere".
2020-02-04 16:51:54 +01:00
Benjamin Otte
3bba52ed67
icontheme: Remove crayon APIs
...
We expose no API to get at any colors for drawing symbolics, so we
shouldn't have APIs to draw with them.
Apart from that, those APIs look like a box of crayons, not like an
icontheme.
2020-02-04 16:43:59 +01:00
Benjamin Otte
bbbe39fb44
icontheme: Make text direction a lookup argument
...
Most users were just forgetting to set the proper flags.
And flags aren't the right way to set this anyway, it was just
acceptable as a workaround during GTK3 to not break API.
2020-02-04 16:41:36 +01:00
Benjamin Otte
b713b9f68d
icontheme: Remove async APIs
...
Widgets would not use them properly. In fact, the only user was using
them wrong.
As icons are loaded async by default, this call isn't necessary.
2020-02-04 16:41:36 +01:00
Benjamin Otte
bfebc2b01a
icontheme: Remove gtk_icon_theme_get_default()
...
The API encouraged wrong usage - most of the users were indeed wrong.
Use the correct version instead:
gtk_icon_theme_get_for_display (gtk_widget_get_display ())
2020-02-04 16:41:36 +01:00
Alexander Larsson
d1cd578d59
icon-theme: Add i/o priority to choose_icon_async()
...
This is set on the GTask and lower priority will be loaded before,
this can be used to prioritize some icons for preloading.
2020-01-30 15:15:08 +01:00
Alexander Larsson
b087f9ca51
icon-theme: Drop the _for_scale() versions and always take scale
2020-01-30 10:53:43 +01:00
Alexander Larsson
e2f778602b
icon-theme: Rename GtkIconInfo to GtkIcon
2020-01-30 10:53:43 +01:00
Alexander Larsson
0d666f0cec
icon-theme: Use gtk_icon_theme_choose_icon_async in tests
2020-01-29 19:06:16 +01:00
Alexander Larsson
97b24b0732
tests: Use gtk_icon_info_download_colored_texture instead of load_symbolic
2020-01-29 19:06:16 +01:00
Alexander Larsson
dbe021239f
icons: Convert use of load() to download_texture()
2020-01-29 19:06:16 +01:00
Timm Bäder
590e70d4d1
icontheme: Return a paintable from gtk_icon_info_load_icon
2019-09-09 17:36:26 +02:00
Timm Bäder
fd16ac4d5e
icontheme: Return paintables from more API
2019-09-09 17:36:26 +02:00
Matthias Clasen
1d72e3e193
Drop builtin icon test
...
We don't have these icons anymore.
2018-07-22 17:16:20 +00:00
Matthias Clasen
33ec75944f
Fix the icontheme test
...
We rely on log messages here. Since logging is per-display
now, we need to set a display on our custom icontheme object
to get the expected log messages.
2018-01-16 15:42:28 -05:00
Philip Withnall
76721e736e
gtkicontheme: Don’t emit warning about fallback theme when in unit tests
...
In order to eliminate g_test_expect_message() (which doesn’t work with
G_LOG_USE_STRUCTURED), make the warning about the fallback theme not
existing be conditional on the icon theme search path containing a
system path. Any application code which modifies the search path does so
through appends and prepends, so this should not affect whether the
warning is emitted in production.
https://bugzilla.gnome.org/show_bug.cgi?id=769485
2016-08-06 17:13:25 -04:00
Matthias Clasen
5ab2b8f562
Make icontheme test work with structured logging
...
Since we've opted in to G_LOG_USE_STRUCTURED, this test
now needs to do its thing using a log writer function.
2016-08-02 23:23:43 -04:00
Matthias Clasen
b1d691dbfd
testsuite: Fix up icontheme test
...
This test was relying on GtkIconTheme using g_print for
debug spew. Adapt it to use g_logv instead.
2016-02-28 21:40:23 -05:00
Cosimo Cecchi
0093b156d7
testsuite: add a test for non-square symbolic icons
...
To verify the previous fix.
https://bugzilla.gnome.org/show_bug.cgi?id=750605
2015-06-12 08:55:23 -07:00
Matthias Clasen
df8a688656
icon-theme: Test inheritance vs. generic fallback
...
Add a few tests that check the behavior of icon theme inheritance
vs generic fallback vs symbolic icons.
2014-09-21 16:34:27 -04:00
Matthias Clasen
d8934ea233
testsuite: Adapt to changed builtin icon paths
2014-07-02 17:17:48 -04:00
Matthias Clasen
86d2315b27
icon-theme: Add another lookup order test
...
This tests rtl lookup order for non-symbolic icons.
2014-06-25 13:53:30 -04:00
Matthias Clasen
7119037743
Add a test for async icon loading
2014-06-23 21:25:21 -04:00
Matthias Clasen
769fc52055
Adapt icontheme tests
...
With our new, improved icon theme spec compliance, some of the
tests need updates to their expected outcomes.
2014-06-22 11:52:11 -04:00
Matthias Clasen
99c0b3db06
Adapt the icontheme tests
...
With the new way of dealing with the legacy stock icons,
the builtin test needed some small updates.
2014-06-20 01:17:46 -04:00
Matthias Clasen
a8939e7cff
icontheme: Add some more tests
...
This test checks that gtk_icon_theme_list_icons and
gtk_icon_theme_has_icon work as expected.
2014-06-20 01:17:45 -04:00
Matthias Clasen
a6f1f8dacf
Add more icon theme tests
...
This test checks various directory size behaviours, with and
without the FORCE_SIZE flag.
2014-06-18 19:09:25 -04:00
Matthias Clasen
8253b76bf6
Add a test for builtin icons
...
We want to get rid of these, but as long as we still have them,
make sure they work.
2014-06-17 14:38:18 -04:00
Matthias Clasen
84cf748eae
Add more icontheme tests
...
This test is focused on svgs, and how we scale them when
loading.
2014-06-14 15:10:49 -04:00
Benjamin Otte
45a64cd7d4
testsuite: Add a test for symbolic icons in specific sizes
...
Check that loading symbolics works, even if the symbolic is only
available in a fixed size.
2014-06-12 12:34:09 +02:00
Matthias Clasen
f750f70c7d
tests: Make icontheme test installable
...
To make the icontheme test run successfully when installed,
we need to use the correct test-framework-provided location,
and we need to install the test theme without stripping its
subdirectory structure.
2014-05-21 13:46:49 -04:00
Benjamin Otte
0f788ab1be
testsuite: Add rtl icontheme tests
2014-05-14 04:55:11 +02:00
Matthias Clasen
0f5814aa33
icontheme: Add a test for lookup order
...
Add tests that verify the expected lookup order between -symbolic,
-rtl/-ltr and generic fallback.
2014-05-14 04:28:36 +02:00
Matthias Clasen
26c2975007
testsuite: Add icontheme tests for generic fallback
2014-05-14 04:28:36 +02:00
Benjamin Otte
77a9539e07
icontheme: Do a failed lookup at the beginning
...
Do this to catch the g_warning() that the icontheme code emits the first
time a lookup fails.
2014-05-14 04:28:36 +02:00
Benjamin Otte
5f794773aa
testsuite: Add more icontheme tests
...
Check that the lookup order works properly when forcing either symbolic
or regular icons.
2014-05-14 04:28:36 +02:00
Benjamin Otte
5ba4a085e2
testsuite: Add a basic icontheme test
...
Most of the work here is creating the infrastructure to have a custom
icon theme to add icons to and run tests against.
2014-05-14 04:28:35 +02:00