summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* examples: Fix flake8 whitespace errorNirbheek Chauhan2022-07-311-1/+1
| | | | | + python -m flake8 ./examples/demo/demos/combobox.py:212:24: E275 missing whitespace after keyword
* 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
* flake8: fix errors with new flake8 3.8.0Christoph Reiter2020-05-171-2/+2
|
* Remove all Python 2 Python codeChristoph Reiter2020-04-151-1/+0
|
* GTK+ -> GTKChristoph Reiter2019-02-133-5/+5
|
* examples: fix new flake8 warningsChristoph Reiter2019-01-272-8/+8
|
* Always use utf-8 and not the default encodingChristoph Reiter2018-04-081-2/+2
| | | | | In the recent cleanup I missed that Python 2 doesn't default to utf-8 there.
* flake8: remove python2 builtin listChristoph Reiter2018-04-071-12/+5
| | | | | Only use the _compat aliases and hide them in _compat through eval(). This will make flake8 complain in case any py2 only builtins are used.
* Remove autotools build systemChristoph Reiter2018-03-261-6/+0
|
* demo: pep8 fixesChristoph Reiter2017-12-0828-670/+700
| | | | The demo app now gets analyzed by pep8 since it was moved to the examples.
* demo: Move demo into examples and dist itChristoph Reiter2017-12-0663-1/+6785
| | | | | | | We might want to install it in the future, but until then at least put it into the tarball. https://bugzilla.gnome.org/show_bug.cgi?id=735918
* Fix new PEP8 errorsChristoph Reiter2017-01-092-0/+2
| | | | | | | | | Two new errors popped up: * E305 expected 2 blank lines after class or function definition * E741 ambiguous variable name https://bugzilla.gnome.org/show_bug.cgi?id=776009
* pyflakes: Fix legacy print and exception usage under Python 3Simon Feltman2014-07-251-6/+6
| | | | | | Fix print statements and legacy exception usage in examples. https://bugzilla.gnome.org/show_bug.cgi?id=731042
* examples/option.py: Port to GI and Python 3Martin Pitt2013-05-241-19/+19
|
* [API add] Add Signal class for adding and connecting custom signals.Simon Feltman2012-09-031-10/+24
| | | | | | | | | | | | | | | | | The Signal class provides easy creation of signals and removes the need for __gsignals__ in client code. The Signal class can also be used as a decorator for wrapping up the custom closure. As well as providing a "BoundSignal" when accessed on an instance for making connections without specifying a signal name string. Python3 annotations can also be used to supply closure argument and return types when Signal is used as a decorator. For example: class Eggs(GObject.GObject): @GObject.Signal def spam(self, count:int): pass https://bugzilla.gnome.org/show_bug.cgi?id=434924
* Drop git.mkDaniel Narvaez2012-07-241-3/+0
| | | | | | | | | The autogenerated gitignores was missing several files. So we was using a manual .gitignore at the root. But since it's enough to add a couple of entries to it to cover the whole tree, there is no much point in using git.mk at all. https://bugzilla.gnome.org/show_bug.cgi?id=678192
* PEP8: Fix indentationMartin Pitt2012-06-222-17/+15
| | | | Spotted by current pep8 checker.
* PEP8: Remaining whitespace fixesJohan Dahlin2012-03-221-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=672627
* PEP8: Fix whitespace around operatorsJohan Dahlin2012-03-221-4/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=672627
* PEP8: run via --fix from craigds forkJohan Dahlin2012-03-224-25/+38
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=672627
* PEP8: Remove spaces around = for keyword argumentsJohan Dahlin2012-03-221-2/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=672627
* Correct pyflakes warnings/errorsJohan Dahlin2012-03-211-1/+1
| | | | | | And add a target to make check that runs pyflakes. https://bugzilla.gnome.org/show_bug.cgi?id=672578
* Renamed "property" class to "Property"Simon Feltman2012-03-161-3/+3
| | | | | | | | | | | | Renamed to match the rest of the class names in GObject and also not clobber the builtin python property. Keep the old "property" identifier for backwards compatibility for now. https://bugzilla.gnome.org/show_bug.cgi?id=672168 Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
* Drop legacy __gobject_init__ method of GObject.Object.Steve Frécinaux2011-09-131-2/+0
| | | | | | | | This method was used in gobject initialization at some point, but now using GObject.__init__() is sufficient, so let's not keep this old method around and let people misuse it. https://bugzilla.gnome.org/show_bug.cgi?id=658032
* Examples: fix cairo-demo.py importsDieter Verfaillie2011-09-091-3/+3
|
* Updated signal example to use GObject introspectionTimo Vanwynsberghe2011-08-181-5/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=654162
* Updated properties example to use GObject introspectionTimo Vanwynsberghe2011-08-181-7/+7
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=654162
* Fixed the cairo exampleTimo Vanwynsberghe2011-07-071-4/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=653844
* Remove last GIO-related bitsSimon van der Linden2011-02-112-110/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=638899
* Remove .gitignore files and use git.mkIgnacio Casal Quinteiro2011-01-271-0/+2
| | | | | git.mk is a script maintained in pango. From time to time we must check if it was updated and update it here.
* Make an example and a demo work out of the boxPaul Bolle2010-07-301-0/+2
| | | | | | | | | cairo-demo.py and gtk-demo.py need the two (kind of) magic lines regarding pygtk to work out of the box. So add those. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> https://bugzilla.gnome.org/show_bug.cgi?id=625638
* PyGI: properly quit cairo-demoPaul Bolle2010-07-301-1/+1
| | | | | | Signed-off-by: Paul Bolle <pebolle@tiscali.nl> https://bugzilla.gnome.org/show_bug.cgi?id=625619
* Merge back pygiJohan Dahlin2010-06-202-1/+122
| | | | | For reasons outlined at: http://mail.gnome.org/archives/python-hackers-list/2010-June/msg00009.html
* WhitespaceJohan Dahlin2008-07-291-0/+1
| | | | svn path=/trunk/; revision=900
* Take some creditJohan Dahlin2008-07-292-0/+3
| | | | svn path=/trunk/; revision=899
* Add gio.FILE_ATTRIBUTE_* constants and update the examples to use them.Johan Dahlin2008-07-291-2/+2
| | | | | | | | | | | 2008-07-29 Johan Dahlin <johan@gnome.org> * examples/gio/downloader.py: * gio/giomodule.c (init_gio): Add gio.FILE_ATTRIBUTE_* constants and update the examples to use them. svn path=/trunk/; revision=897
* Fetch the total and print percentageJohan Dahlin2008-07-291-3/+8
| | | | svn path=/trunk/; revision=896
* Remove unused importJohan Dahlin2008-07-291-1/+1
| | | | svn path=/trunk/; revision=895
* Refactor the example a bit, use start/stop to access loop so it's easier to ↵Johan Dahlin2008-07-291-12/+19
| | | | | | reuse it in a real application svn path=/trunk/; revision=894
* Handle errors from gfile.read() gracefullyJohan Dahlin2008-07-291-3/+6
| | | | svn path=/trunk/; revision=893
* Add a new exampleJohan Dahlin2008-07-281-0/+61
| | | | | | | | | | | | | | | 2008-07-29 Johan Dahlin <johan@gnome.org> * examples/gio/downloader.py: Add a new example * gio/ginputstream.override: Use a string internally instead of a PyStringObject when in read_async. Create a new python string in finish and honor the number of bytes read. svn path=/trunk/; revision=892
* Add a new API for registering exceptions for a GError domain. Register aJohan Dahlin2008-07-261-3/+3
| | | | | | | | | | | | | | | | | | 2008-07-26 Johan Dahlin <johan@gnome.org> * examples/gio/directory-async.py: * gio/Makefile.am: * gio/giomodule.c (init_gio): * glib/pyglib.c (pyglib_error_check), (pyglib_register_exception_for_domain): * glib/pyglib.h: * tests/test_gio.py: Add a new API for registering exceptions for a GError domain. Register a new exception for G_IO_ERROR, update tests and examples to use the new exception. svn path=/trunk/; revision=863
* Increase to 100 per goJohan Dahlin2008-07-181-1/+2
| | | | svn path=/trunk/; revision=834
* improve example: show error message and allow sys.argv[1] to be specifiedJohan Dahlin2008-07-181-3/+13
| | | | svn path=/trunk/; revision=833
* Wrap gio.FileEnumerator.next_files_async/next_files_done. Update theJohan Dahlin2008-07-181-3/+9
| | | | | | | | | | | | | | | 2008-07-19 Johan Dahlin <johan@gnome.org> * examples/gio/directory-async.py: * gio/gfileenumerator.override: * gio/gio.defs: * tests/test_gio.py: Wrap gio.FileEnumerator.next_files_async/next_files_done. Update the example to use them instead of the synchronous versions, add documentation and tests. svn path=/trunk/; revision=832
* Only fetch name, saves a couple of syscalls. Set name to gio._gio soJohan Dahlin2008-07-181-1/+1
| | | | | | | | | | | | 2008-07-19 Johan Dahlin <johan@gnome.org> * examples/gio/directory-async.py: Only fetch name, saves a couple of syscalls. * gio/gio.override: Set name to gio._gio so pychecker/pydoc works. svn path=/trunk/; revision=831
* Remove unused importJohan Dahlin2008-07-181-1/+0
| | | | svn path=/trunk/; revision=829
* Wrap gio.File.enumerate_children_async, add tests, docstring and anJohan Dahlin2008-07-181-0/+14
| | | | | | | | | | | | | | * examples/gio/directory-async.py: * gio/gfile.override: * gio/gfileenumerator.override: * gio/gio.defs: * tests/test_gio.py: Wrap gio.File.enumerate_children_async, add tests, docstring and an example. Also document gio.File.enumerate while we're at it. svn path=/trunk/; revision=828
* remove trailing whitespaceJohan Dahlin2007-11-061-7/+7
| | | | svn path=/trunk/; revision=716
* Add a property helper, fixes #338098Johan Dahlin2007-05-011-31/+19
| | | | | | | | | | | | | | | | | * examples/properties.py: * gobject/Makefile.am: * gobject/__init__.py: * gobject/constants.py.in: * gobject/generate-constants.c: (main): * gobject/propertyhelper.py: * tests/Makefile.am: * tests/test_enum.py: * tests/test_interface.py: * tests/test_properties.py: Add a property helper, fixes #338098 svn path=/trunk/; revision=662