summaryrefslogtreecommitdiff
path: root/testsuite/gtk
Commit message (Collapse)AuthorAgeFilesLines
* Stop using gtk_main and gtk_main_quitMatthias Clasen2020-02-092-7/+9
| | | | Replace these calls with direct use of GMainContext api.
* Stop using gtk_main_quitMatthias Clasen2020-02-097-109/+307
| | | | | Stop using gtk_main and gtk_main_quit in tests and examples. These APIs are on the way out.
* tests: Stop using gtk_events_pendingMatthias Clasen2020-02-091-22/+22
| | | | Just use the GMainContext api directly.
* testsuite: Stop using gtk_main_do_eventMatthias Clasen2020-02-091-3/+11
| | | | | | Instead, emit ::event on the surface. Neither of these is a proper test api, but one works as well as the other.
* testsuite: Get rid of GtkToolbarBenjamin Otte2020-02-071-1/+1
| | | | Just use GtkBox instead
* Merge branch 'better-test-isolation-2' into 'master'Matthias Clasen2020-02-063-5/+58
|\ | | | | | | | | Better test isolation See merge request GNOME/gtk!1391
| * testsuite: Make tests run without a11y busMatthias Clasen2020-02-052-1/+30
| | | | | | | | | | | | Not having an a11y bus around causes warnings from at-spi, which make tests fail. Explicitly ignore those warnings.
| * tests: Initialize dbus before gtkAlexander Larsson2020-02-042-5/+26
| | | | | | | | | | | | | | | | | | | | These days initilizing gtk may create a connection to the sesson bus, so we have to initialize GTestDBus before initalizing gtk, or we'll use the address of the "real" session bus (and remember that in the global). To further muck things up, g_test_dbus_up() resets important env vars like DISPLAY and XDG_RUNTIME_DIR, which we have to re-set.
| * Don't use xsettings or xft defaults in testsuiteAlexander Larsson2020-02-031-0/+3
| | | | | | | | | | | | | | | | | | This adds a GDK_DEBUG=default-settings flag which disables reads from xsettings and Xft resources, and enables this for the testsuite. This is one less way to get different testresults depending on the environment. In particular, it was failing the css tests for me due to getting the wrong font size because i have a different dpi.
* | testsuite: Remove the stylecontext testBenjamin Otte2020-02-052-133/+0
| | | | | | | | | | | | | | Stylecontexts are on their way out and I'm removing API that the testsuite was relying on, so remove the tests. Put the useful parts of the tests elsewhere.
* | Rename GtkIcon to GtkIconPaintableAlexander Larsson2020-02-042-11/+11
| |
* | icontheme: Remove GENERIC_FALLBACKSBenjamin Otte2020-02-041-88/+168
| | | | | | | | | | | | | | | | | | 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.
* | icontheme: Pass fallbacks as optional argument to lookup_icon()Benjamin Otte2020-02-042-4/+4
| | | | | | | | This way, we can remove gtk_icon_theme_choose_icon() completely.
* | icontheme: Remove contextsBenjamin Otte2020-02-041-1/+1
| | | | | | | | | | | | | | | | 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".
* | icontheme: Remove crayon APIsBenjamin Otte2020-02-041-2/+1
| | | | | | | | | | | | | | | | 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.
* | icontheme: Make text direction a lookup argumentBenjamin Otte2020-02-042-81/+125
| | | | | | | | | | | | 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.
* | icontheme: Remove async APIsBenjamin Otte2020-02-041-43/+0
| | | | | | | | | | | | | | 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.
* | icontheme: Remove gtk_icon_theme_get_default()Benjamin Otte2020-02-042-2/+3
|/ | | | | | | 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 ())
* icon-theme: Add i/o priority to choose_icon_async()Alexander Larsson2020-01-301-2/+2
| | | | | This is set on the GTask and lower priority will be loaded before, this can be used to prioritize some icons for preloading.
* icon-theme: Drop the _for_scale() versions and always take scaleAlexander Larsson2020-01-302-6/+6
|
* icon-theme: Rename GtkIconInfo to GtkIconAlexander Larsson2020-01-302-12/+12
|
* icon-theme: Use gtk_icon_theme_choose_icon_async in testsAlexander Larsson2020-01-291-52/+12
|
* tests: Use gtk_icon_info_download_colored_texture instead of load_symbolicAlexander Larsson2020-01-291-4/+1
|
* icons: Convert use of load() to download_texture()Alexander Larsson2020-01-291-1/+1
|
* Remove GtkWidgetPathBenjamin Otte2020-01-283-467/+0
| | | | ... and all associated demos and tests.
* testsuite: Update mark namesMatthias Clasen2020-01-231-2/+2
| | | | | | We've changed some of the profiler mark names to be clearer and more unique. Update the tests that look for those marks to use the new names.
* Make the performance testcase more generalMatthias Clasen2020-01-221-0/+19
| | | | Reuse the performance test for layout and snapshot timings.
* testsuite: Skip GtkDragIconMatthias Clasen2020-01-141-0/+4
| | | | | GtkDragIcon needs a special surface, so skip it in the notify tests.
* testsuite: Remove menu special-casingMatthias Clasen2019-12-292-16/+0
|
* testsuite: Remove menu testsMatthias Clasen2019-12-293-587/+0
| | | | Menus are going away.
* testsuite: Cosmetic changeMatthias Clasen2019-12-291-1/+0
|
* builder: Improve type name manglingMatthias Clasen2019-12-131-12/+20
| | | | | | | | | When looking for the get_type function for GThemedIcon, try both g_themed_icon_get_type and gthemed_icon_get_type The former is what gio has, the latter is still supported to avoid breaking gweather_location_get_type. Update tests to cover this new case.
* builder: Add GtkBuilderScopeBenjamin Otte2019-12-121-0/+5
| | | | | | | | | | | | | | | | | | | | | GtkBuilderScope is an interface that provides the scope that a builder instance operates in. It creates closures and resolves types. Language bindings are meant to use this interface to customize the behavior of builder files, in particular when instantiating templates. A default implementation for C is provided via GtkBuilderCScope (to keep with the awkward naming that glib uses for closures). It is derivable on purpose so that languages or extensions that extend C can use it. The reftest code in fact does derive GtkBuilderCScope for its own scope implementation that implements looking up symbols in modules. gtk-widget-factory was updated to use the new GtkBuilderCScope to add its custom callback symbols. So it does it different from gtk-demo, which uses the normal way of exporting symbols for dlsym() and thereby makes the 2 demos test the 2 ways GtkBuilder uses for looking up symbols.
* Fix treelistmodel testsMatthias Clasen2019-12-041-1/+1
| | | | | | They were failing to return a reference where they need to. This was uncovered by fixing an unrelated ref leak.
* Fix leaks in testsMatthias Clasen2019-12-046-6/+24
| | | | | | | | All the list model tests were leaking items, because g_list_model_get_item is transfer full. Fixing these unveils a crash in the treelistmodel and maplistmodel tests.
* Use a single compilation symbolEmmanuele Bassi2019-11-271-1/+1
| | | | | | | | | | | | We use a compilation symbol in our build to allow the inclusion of specific headers while building GTK, to avoid the need to include only the global header. Each namespace has its own compilation symbol because we used to have different libraries, and strict symbol visibility between libraries; now that we have a single library, and we can use private symbols across namespaces while building GTK, we should have a single compilation symbol, and simplify the build rules.
* builder: Connect signals automaticallyBenjamin Otte2019-11-221-5/+0
| | | | | | gtk_builder_connect_signals() is no longer necessary, because all the setup that made it necessary to have this extra step is now done automatically via the closure functions.
* builder: Remove user_data argument from gtk_builder_connect_signals()Benjamin Otte2019-11-221-5/+5
| | | | | | | | This is pretty unused and gets in the way of the next steps. A potential side effect is that for templates the widget was passed as the user data argument. If that turns out to be important, we have to special case that situation.
* testsuite: Print useful statement on notify test errorBenjamin Otte2019-11-221-13/+28
| | | | ... and don't instantly abort, test the rest of the properties, too.
* Privatize popover menu piecesMatthias Clasen2019-11-111-4/+0
| | | | | | Don't allow manual creation of popover menus anymore. This lets us also make GtkModelButton private
* text: add undo support to GtkTextChristian Hergert2019-11-051-0/+2
| | | | | | | | | This adds support using the GtkTextHistory helper for undo/redo to the GtkText widget. It is similar in use to GtkTextView, but with a simplified interface. You can disable undo support using the GtkText:enable-undo property. By default, it is enabled.
* gtk: Add GtkNoSelectionBenjamin Otte2019-10-153-0/+4
| | | | Allows not to have anything selected.
* singleselection: Fix model propertyBenjamin Otte2019-10-153-4/+8
| | | | | | | 1. Make the model property construct-only. Allowing to change the model has invalid side effects. 2. Add a getter for the model property.
* eventcontrollerkey: Change behavior of contains-focusBenjamin Otte2019-10-071-4/+4
| | | | | | contains-focus now returns TRUE when is-focus is TRUE instead of FALSE. Fixes #2184
* eventcontrollerkey: Add getters for the propertiesBenjamin Otte2019-10-071-28/+16
| | | | ...and use them.
* icontheme: Return a paintable from gtk_icon_info_load_iconTimm Bäder2019-09-091-4/+4
|
* icontheme: Return paintables from more APITimm Bäder2019-09-091-14/+15
|
* infobar: Inherit from GtkContainerTimm Bäder2019-09-091-18/+8
| | | | | | | infobars being a GtkBox doesn't make sense. Also implement infobars without exposing internal children. Closes #1957 because it adds the bottom border.
* Add builder tests for bind-source without bind-propertyMohammed Sadiq2019-08-101-4/+14
| | | | Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2080
* Remove new attributes from testsMatthias Clasen2019-07-281-2/+0
| | | | | Until we can depend on pango 1.44, these will fail in ci. Partially reverts f1c7803f800588e