summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Remove .cvsignore archivesJohan Dahlin2007-01-161-2/+0
| | | | svn path=/trunk/; revision=636
* reviewed by: Johan Dahlin <jdahlin@async.com.br>Johannes Hölzl2006-04-292-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-04-29 Johannes Hölzl <johannes.hoelzl@gmx.de> reviewed by: Johan Dahlin <jdahlin@async.com.br> * examples/Makefile.am: * examples/option.py: * gobject/Makefile.am: * gobject/gobjectmodule.c: (init_gobject): * gobject/option.py: * gobject/pygobject-private.h: * gobject/pygoptioncontext.c: (pyg_option_context_init), (pyg_option_context_dealloc), (pyg_option_context_parse), (pyg_option_context_set_help_enabled), (pyg_option_context_get_help_enabled), (pyg_option_context_set_ignore_unknown_options), (pyg_option_context_get_ignore_unknown_options), (pyg_option_context_set_main_group), (pyg_option_context_get_main_group), (pyg_option_context_add_group), (pyg_option_context_compare), (pyg_option_context_new): * gobject/pygoptiongroup.c: (check_if_owned), (destroy_g_group), (pyg_option_group_init), (pyg_option_group_dealloc), (arg_func), (pyg_option_group_add_entries), (pyg_option_group_set_translation_domain), (pyg_option_group_compare), (pyg_option_group_transfer_group), (pyg_option_group_new): * tests/test_option.py: Add support for GOption, fixes #163645
* reindentJohan Dahlin2006-04-111-4/+4
|
* Split out PyGObject from PyGTK.Johan Dahlin2006-01-092-0/+3
|
* Bug 128765: GObject metaclassGustavo J. A. M. Carneiro2005-05-221-3/+1
|
* add new example to dist.James Henstridge2001-12-181-0/+43
| | | | | | | | | | | | | | | | | | | 2001-12-18 James Henstridge <james@daa.com.au> * Makefile.am (EXTRA_DIST): add new example to dist. * examples/gobject/properties.py: test program that implements a few properties. * gobjectmodule.c (add_properties): new function for parsing the __gproperties__ class attribute. (create_property): helper routine for creating and installing the new pspecs. (pyg_type_register): add code to call add_properties if a __gproperties__ attribute is found. (pyg_object_class_init): set set_property/get_property methods in vtable, and get rid of debug message. (initgobject): add G_PARAM_* constants.
* use __gsignals__ notation here.James Henstridge2001-12-141-3/+4
| | | | | | | | | | | 2001-12-14 James Henstridge <james@daa.com.au> * examples/gobject/signal.py: use __gsignals__ notation here. * gobjectmodule.c (create_signal, add_signals): helper routines for handling __gsignals__ attribute of classes. (pyg_type_register): add support for creating signals as part of type registration.
* 2001-05-06 James Henstridge <james@daa.com.au>James Henstridge2001-05-061-3/+5
| | | | | | | | | | | | | | | | | | | | 2001-05-07 James Henstridge <james@daa.com.au> * examples/gobject/signal.py: 2001-05-06 James Henstridge <james@daa.com.au> * gobjectmodule.c (pygobject__init__): make the __init__ function choose what GType to pass to g_object_new based on the __gtype__ attribute. (pygobject_methods): make __gobject_init__ an alias for GObject.__init__. (pyg_type_register): new function for registering new GTypes. (pyg_type_register): register the type as "module+class" rather than "module.class", as the second form is considered bad (would like to use the second form though. * configure.in: require 1.3.5 versions of glib and gtk+.
* moved rewritten testgtk demo hereJames Henstridge2001-03-301-1/+8
| | | | | | | | | | | | | | | | | | | | 2001-03-30 James Henstridge <james@daa.com.au> * examples/pygtk-demo: moved rewritten testgtk demo here * gobjectmodule.c (pygobject_set_property): initialise the GValue to { 0, }, so set_property actually works. (pygobject_get_property): same here. * gtk/gtk.defs: updated enum/flag defs. * gtk/gdk.defs: updated enum/flag defs. * examples/gobject/signal.py (D.do_my_signal): add small example of overriding class closure for a signal introduced from python code. * codegen/h2def.py: add --onlyenums flag to only output enum defs.
* simple example program that adds a signal to a class, connects a handlerJames Henstridge2001-03-271-0/+20
2001-03-27 James Henstridge <james@daa.com.au> * examples/gobject/signal.py: simple example program that adds a signal to a class, connects a handler to an instance of that class, and finally emits that signal. Messages are printed by both the signal handler and class method closure. * gobjectmodule.c (pyg_signal_class_closure_marshal): convert dashes in signal name to underscores. Why does g_siganl_name use dashes? (pyg_signal_class_closure_marshal): fix off by one error when setting up the python argument tuple. The first element was getting left uninitialised. Signals introduced in python now work. * gtk/gtk.defs (GtkFileSelection.get_filename): return value is const. * gtk/gtk.override (_wrap_gtk_list_store_set_value): change name. (_wrap_gtk_tree_store_insert): change name. * gtk/gtk.defs (GtkListStore.set_value): change from set_cell to set_value. (GtkListStore.set_value): same here.