summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Do not override Treeview.enable_model_drag_xx for GTK4Arjan Molenaar2022-03-272-11/+26
| | | | Those methods require a Gdk.ContentFormats object.
* info: Show which type/object callables are bound tobenzea/vfunc-bound-descrBenjamin Berg2022-03-271-0/+28
|
* Gtk.Template: Accept PathLike objects as a filenameAndrej Shadura2022-03-271-1/+2
| | | | | | | | | | | | | An attempt to pass a Path object as a filename results in a TypeError: "Must be bytes, not PosixPath". A simple way to accept Path objects would be unconditionally turning them into strings, but since native paths may be bytes as well, this might break applications relying on being able to bytes-based filename. Instead, convert the path into an appropriate representation (string or bytes) using os.fspath(). It internally tests whether the path is a PathLike object and does the right thing. Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
* Fix some broken links to the PyPy bug trackerChristoph Reiter2022-03-272-2/+2
| | | | They moved away from bitbucket some time ago.
* Call PyEval_InitThreads() with PyPy for Python 3.9Christoph Reiter2022-03-271-1/+2
| | | | | | In theory it should no longer be needed, but PyPy hasn't updated this part of their implementation yet, and not initing threads will lead to crashes due to missing GIL init.
* CI: update interpretersChristoph Reiter2022-03-273-15/+15
|
* tests: disable fatal-warnings fatal-criticals on WindowsChristoph Reiter2022-03-271-2/+4
| | | | | | If it triggers it creates a blocking GUI dialog without any helpful output. I can't reproduce the cause on my local machine, just on the CI server, so jsut disable this for now.
* CI: pass -Wno-error=deprecated-declarations for MSYS2Christoph Reiter2022-03-261-0/+3
| | | | | There are some glib deprecations that need fixing, but let's get CI green again first.
* Rename GObject Introspection development branchEmmanuele Bassi2022-02-171-1/+1
| | | | | GObject Introspection renamed its default development branch to "main".
* gimodule: fix floating state of python objects created with g_object_newMathieu Duponchelle2021-12-061-3/+12
| | | | | | | | | | If C code calls g_object_new() for a GInitiallyUnowned subclass implemented in python, the expectation is to receive a floating reference. The solution is used is the same picked for 5efe2e5c8458d9f4d72329ea1209d96b5ebecfb4, this is simply a special case that was omitted at the time.
* Add .venv to .gitignoreChristoph Reiter2021-09-191-0/+1
|
* Use quark variable for class on gtypeArjan Molenaar2021-09-191-1/+1
|
* replace gpointer by more specific typesArjan Molenaar2021-09-192-6/+4
|
* Do not error out for unknown scopesEmmanuele Bassi2021-09-191-2/+4
| | | | | | If gobject-introspection adds a new scope that we do not handle, we should definitely not error out. Printing out a critical warning and asking to file an issue should be enough.
* Implement DynamicImporter.find_spec()Miro Hrončok2021-09-191-5/+10
| | | | | | | | | | | | | | | | | | | | | | On Python 3.10, the code raised an ImportWarning: ImportWarning: DynamicImporter.find_spec() not found; falling back to find_module() See https://docs.python.org/3.10/whatsnew/3.10.html#deprecated > Starting in this release, there will be a concerted effort to begin cleaning > up old import semantics that were kept for Python 2.7 compatibility. > Specifically, find_loader()/find_module() (superseded by find_spec()), > load_module() (superseded by exec_module()), module_repr() > (which the import system takes care of for you), > the __package__ attribute (superseded by __spec__.parent), > the __loader__ attribute (superseded by __spec__.loader), > and the __cached__ attribute (superseded by __spec__.cached) > will slowly be removed (as well as other classes and methods in importlib). > ImportWarning and/or DeprecationWarning will be raised as appropriate to help > identify code which needs updating during this transition. Fixes https://gitlab.gnome.org/GNOME/pygobject/-/issues/473
* gtk overrides: restore Gtk.ListStore.insert_with_valuesv with newer gtk4Christoph Reiter2021-09-193-3/+25
| | | | | | | | It got renamed in gtk 4.1.0, see https://gitlab.gnome.org/GNOME/gtk/-/commit/a1216599ff6b39bca3e936fbf To avoid an API break and make porting easier provide both versions for all users. Fixes #467
* tests: silence a deprecation warning with newer glibChristoph Reiter2021-09-191-2/+4
|
* poetry: add support for sphinx v4 and sphinx-rtd-theme v1Christoph Reiter2021-09-191-2/+2
| | | | Tested with 4.2 and 1.0 and things loog good
* Drop support for Python 3.6Christoph Reiter2021-09-199-16/+10
| | | | | | It will be EOL before the next release. This means Ubuntu 18.04 (without backports) is no longer supported, we will move to Debian Buster as the new oldest tested target.
* CI: Update all Python versions and add 3.10Christoph Reiter2021-09-193-15/+21
|
* version bumpChristoph Reiter2021-09-193-3/+3
|
* release3.42.0Christoph Reiter2021-09-194-3/+14
|
* `cairo-gobject-devel` is needed for FedoraAnatoli Babenia2021-08-231-1/+1
|
* Fix a couple of memory leaks in the testsDavid King2021-08-231-2/+4
| | | | | | Found by Coverity. https://bugzilla.redhat.com/show_bug.cgi?id=1938851
* Fix some small memory leaksDavid King2021-08-232-1/+5
| | | | | | Found by Coverity. https://bugzilla.redhat.com/show_bug.cgi?id=1938851
* ci: Limit depth of subprojects when cloningPhilip Withnall2021-06-074-0/+4
| | | | | | | | | Use the depth= argument from Meson 0.52 to limit the clone depth of subprojects to 1. This should make the CI images a little smaller, and reduce the bandwidth required to build them (although that’s not so important because it only happens once every few months). Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
* subprojects: Use GLib main branchPhilip Withnall2021-06-071-1/+1
| | | | | | | | GLib upstream has renamed its `master` branch to `main`. See https://gitlab.gnome.org/GNOME/glib/-/issues/2348. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
* Add poetry supportChristoph Reiter2021-04-302-0/+18
|
* docs: add an example of using a subclass in a UI definitionChris Mayo2021-04-301-0/+33
|
* docs: document Gtk.Template. Fixes #396Chris Mayo2021-04-302-0/+91
| | | | Examples derived from tests/test_gtk_template.py.
* Expose GObject.Object.run_dispose()Christoph Reiter2021-04-272-1/+19
| | | | | | | | | | Up until now this raised an exception "This method is currently unsupported.". With Gtk.Widget.destroy() gone in gtk4 and that method often being used to remove references to other objects and breaking cycles this is the next best thing on a lower level and should make porting a bit easier. Fixes #470
* meson: Bump minimum meson_version to 0.47.0wip/felder/meson-minimum-versionJean Felder2021-04-161-1/+1
| | | | | The meson_options.txt file uses the "feature" option which was introduced in 0.47.0.
* docs: Fix the link to the Terminator projectChris Mayo2021-03-301-1/+1
|
* Update NEWSChristoph Reiter2021-03-301-0/+7
|
* Fix regression in marshalling partial() objectsChristoph Reiter2021-03-303-3/+22
| | | | | | | | | | | | In a4880dbc4575fadc0e3 a special case for partial() was added to handle gtk4 template callbacks. This in turn broken normal usage of partial objects. To work around that add a special marker in the gtk template code for now until we find a better fix. Also adds a test so this doesn't happen again. Fixes #464
* tests: fix test with glib 2.68 re GLocalFileChristoph Reiter2021-03-301-1/+1
| | | | | | | Since 2.68 Gio.File.new_for_path("") returns a GDummyFile instead of a GLocalFile. We don't really care since we just want to test that there is a name despite the type not being in the gir, so just pass a potentially valid path instead.
* version bumpChristoph Reiter2021-03-192-2/+2
|
* release3.40.0Christoph Reiter2021-03-194-3/+15
|
* tests: Re-enable template tests for gtk4wip/jfelder/template-gtk4Jean Felder2020-12-061-3/+0
|
* tests: Do not use container api when gtk4 is usedJean Felder2020-12-061-6/+35
| | | | | GTK4 removed the Gtk.Container interface. All GTK4 widgets are now iterable.
* tests: Do not use the margin property for template testsJean Felder2020-12-061-4/+4
| | | | | In GTK4, the margin property does not exist anymore. Replace it by the margin-top property.
* tests: Update builer tests to work with gtk4Jean Felder2020-12-061-21/+38
|
* tests: Do not swap signal when object is setJean Felder2020-12-061-2/+2
| | | | Swapped defaults to TRUE when object is set.
* gtk overrides: Add support for builder scopeJean Felder2020-12-063-49/+69
| | | | | | | | | This is a follow of the previous commit which fixes template support in GTK4 by adding GtkBuilerScope. It is extended to support a scope object (it can be a python object or a dictionnary). This scope object is used to define the scope the builder should operate in. A new GtkBuilder constructor is introduced to be able to define this scope object.
* Gtk.Template: Fix template support for GTK4Jean Felder2020-12-062-4/+74
| | | | | | | | | | | | | | | Gtk.Widget.set_connect_func() does not exist anymore and signals are automatically connected. Instead, a GtkBuilderScope needs to be used to create GtkBuilder's closure functions. pygobject closure support is extended to support functools.partial. This is used to create a GtkBuilder closure function with an object different from the current object. See MR https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1204 and https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1230 Closes: #380
* gtk: Add override for Gtk.CustomSorter.set_sort_funcJean Felder2020-12-064-17/+133
| | | | | | | | | | This function use CompareDataFunc which works with pointers and doesn't know anything about GObjects. The same logic as in Gio.List.sort and Gio.List.insert_sorted is used. An associated unit_test is also added.
* examples/demo: Use require_version to force gtk3Christoph Reiter2020-11-301-0/+7
| | | | The examples don't work with gtk4 so set the proper version
* gtk overrides: Make GTK4 widgets iterableJean Felder2020-11-212-0/+41
| | | | | | | | | | GTK4 removed the Gtk.Container interface, and added API on Gtk.Widget to iterate over children instead. Making Widgets iterable allows to easily loop over the children and check is a widget is a child of an other one. A new test is also added.
* overrides: Remove various overrides for gtk4ebassi/gtk4-overridesChristoph Reiter2020-11-152-258/+188
| | | | | | Basically everything where we hav a transition path that works for both gtk3 and 4. We'll need to add new deprecation warnings for gtk3 once things have settled down.
* Clean up Widget overridesChristoph Reiter2020-11-152-11/+24
|