summaryrefslogtreecommitdiffstats
path: root/gio/gfile.override
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup GIO overrides to use Python function/method namesPaul Pogonyshev2009-06-121-10/+10
| | | | | Also move several gio.Mount overrides over from 'gio.override' to existing 'gmount.override'. Part of bug #584289.
* Fix memory leak in gio.File.query_info_async()Paul Pogonyshev2009-04-301-0/+4
| | | | | After the recent patch it would leak exception data if old argument order was used. Properly decref the objects.
* Swap first two arguments of gio.File.query_info_async()Paul Pogonyshev2009-04-281-9/+30
| | | | | | | Swap the arguments for consistency with other methods. Update documentation accordingly. Take care to keep the old code (i.e. with non-swapped calling arguments) working, but don't mention that anywhere. (Bug #580490.)
* change argument order to keep it consistent with the other methods.Gian Mario Tagliaretti2009-04-141-10/+9
| | | | | | | | | | 2009-04-14 Gian Mario Tagliaretti <gianmt@gnome.org> * gio/gfile.override: (_wrap_g_file_copy_async) change argument order to keep it consistent with the other methods. svn path=/trunk/; revision=1061
* Bug 578870 – memory leak in gio.File.copy_asyncPaul Pogonyshev2009-04-131-7/+6
| | | | | | | | | | | | | | | | | 2009-04-13 Paul Pogonyshev <pogonyshev@gmx.net> Bug 578870 – memory leak in gio.File.copy_async * gio/gio.override (PyGIONotify): Add 'slaves' field. (pygio_notify_new_slave): New function. (pygio_notify_reference_callback): Recurse for slaves, if any. (pygio_notify_free): Likewise. * gio/gfile.override (file_progress_callback_marshal): Use new chaining functionality to avoid leaking the second PyGIONotify structure. Rename 'callback' as 'progress_callback' for clarity. svn path=/trunk/; revision=1060
* Wrap new GFile method.Gian Mario Tagliaretti2009-04-051-1/+49
| | | | | | | | | | | | 2009-04-05 Gian Mario Tagliaretti <gianmt@gnome.org> * gio/gfile.override: (_wrap_g_file_set_display_name_async) Wrap new GFile method. * tests/test_gio.py: Test the above methods. svn path=/trunk/; revision=1056
* Wrap new GFile methods.Gian Mario Tagliaretti2009-04-041-3/+92
| | | | | | | | | | | | | 2009-04-04 Gian Mario Tagliaretti <gianmt@gnome.org> * gio/gfile.override: (_wrap_g_file_set_attributes_async) (_wrap_g_file_set_attributes_finish) Wrap new GFile methods. * tests/test_gio.py: Test the above methods. svn path=/trunk/; revision=1053
* Fix a typo.Gian Mario Tagliaretti2009-03-301-1/+1
| | | | | | | | | | 2009-03-31 Gian Mario Tagliaretti <gianmt@gnome.org> * gio/gfile.override: (_wrap_g_file_query_filesystem_info_async) Fix a typo. svn path=/trunk/; revision=1052
* Wrap new GFile method.Gian Mario Tagliaretti2009-03-301-0/+48
| | | | | | | | | | 2009-03-31 Gian Mario Tagliaretti <gianmt@gnome.org> * gio/gfile.override: (_wrap_g_file_query_filesystem_info_async) Wrap new GFile method. svn path=/trunk/; revision=1051
* Swap kwargs names to reflect the code.Gian Mario Tagliaretti2009-03-301-1/+1
| | | | | | | | | | 2009-03-30 Gian Mario Tagliaretti <gianmt@gnome.org> * gio/gfile.override: (_wrap_g_file_mount_mountable) Swap kwargs names to reflect the code. svn path=/trunk/; revision=1049
* Swap kwargs names to reflect the code.Gian Mario Tagliaretti2009-03-301-1/+1
| | | | | | | | | | 2009-03-30 Gian Mario Tagliaretti <gianmt@gnome.org> * gio/gfile.override: (_wrap_g_file_mount_enclosing_volume) Swap kwargs names to reflect the code. svn path=/trunk/; revision=1048
* Wrap new GFile method.Gian Mario Tagliaretti2009-03-301-1/+46
| | | | | | | | | | 2009-03-30 Gian Mario Tagliaretti <gianmt@gnome.org> * gio/gfile.override: (_wrap_g_file_find_enclosing_mount_async) Wrap new GFile method. svn path=/trunk/; revision=1047
* Wrap new GFile method.Gian Mario Tagliaretti2009-03-301-1/+47
| | | | | | | | | | 2009-03-30 Gian Mario Tagliaretti <gianmt@gnome.org> * gio/gfile.override: (_wrap_g_file_eject_mountable) Wrap new GFile method. svn path=/trunk/; revision=1046
* revert previous commit.Gian Mario Tagliaretti2009-03-291-1/+1
| | | | | | | | | 2009-03-30 Gian Mario Tagliaretti <gianmt@gnome.org> * gio/gfile.override: (_wrap_g_file_copy) revert previous commit. svn path=/trunk/; revision=1045
* callback cannot be optional.Gian Mario Tagliaretti2009-03-291-1/+1
| | | | | | | | | 2009-03-30 Gian Mario Tagliaretti <gianmt@gnome.org> * gio/gfile.override: (_wrap_g_file_copy) callback cannot be optional. svn path=/trunk/; revision=1044
* Update the address of the FSF, by replacing old bits of the address withTobias Mueller2009-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2009-03-29 Tobias Mueller <tobiasmue@gnome.org> Update the address of the FSF, by replacing old bits of the address with new ones. Fixes bug 577134 * ltihooks.py: * pygtk.py: * COPYING: * gobject/pygparamspec.h: * gobject/pygpointer.c: * gobject/ffi-marshaller.h: * gobject/pygtype.c: * gobject/__init__.py: * gobject/pygpointer.h: * gobject/pygtype.h: * gobject/pygflags.c: * gobject/pyginterface.c: * gobject/pygflags.h: * gobject/pygboxed.c: * gobject/gobjectmodule.c: * gobject/pygenum.c: * gobject/pyginterface.h: * gobject/pygboxed.h: * gobject/pygobject.c: * gobject/constants.py.in: * gobject/pygenum.h: * gobject/propertyhelper.py: * gobject/pygparamspec.c: * gobject/ffi-marshaller.c: * glib/pygmainloop.c: * glib/pygoptioncontext.h: * glib/pygmainloop.h: * glib/pyglib-private.h: * glib/__init__.py: * glib/pygoptiongroup.c: * glib/pygspawn.c: * glib/pygmaincontext.c: * glib/pygoptiongroup.h: * glib/pygspawn.h: * glib/pygmaincontext.h: * glib/option.py: * glib/pygsource.c: * glib/glibmodule.c: * glib/pygiochannel.h: * glib/pygsource.h: * glib/pyglib.c: * glib/pyglib.h: * glib/pyglib-python-compat.h: * glib/pygoptioncontext.c: * gio/gfileinfo.override: * gio/gappinfo.override: * gio/__init__.py: * gio/gfileattribute.override: * gio/gvolume.override: * gio/gio.override: * gio/ginputstream.override: * gio/goutputstream.override: * gio/unix.override: * gio/gfile.override: * gio/gvolumemonitor.override: * gio/gapplaunchcontext.override: * gio/giomodule.c: * gio/gfileenumerator.override: * gio/pygio-utils.c: * gio/unixmodule.c: * gio/pygio-utils.h: * gio/gicon.override: svn path=/trunk/; revision=1038
* Bug 556250 again. I screwed up and gave misinformation about how to fixGustavo J. A. M. Carneiro2009-02-171-8/+8
| | | | | | | | | | * gio/gfile.override, gio/gio.defs, gio/gio.override: Bug 556250 again. I screwed up and gave misinformation about how to fix it. It must be pyg_begin/end_allow_threads, pyg_block/unblock_threads is only to be used for async callbacks. svn path=/trunk/; revision=1005
* release the thread lock on non-async functions.Gian Mario Tagliaretti2009-02-161-0/+16
| | | | svn path=/trunk/; revision=1004
* huge patch to fix memory leaks all over the place, fixes #568427Gian Mario Tagliaretti2009-02-081-7/+22
| | | | svn path=/trunk/; revision=1002
* Bug 566706 – cleanup GIO overridesPaul Pogonyshev2009-01-141-211/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2009-01-14 Paul Pogonyshev <pogonyshev@gmx.net> Bug 566706 – cleanup GIO overrides * gio/gio.override (pygio_notify_new) (pygio_notify_using_optional_callback) (pygio_notify_callback_is_valid_full) (pygio_notify_callback_is_valid) (pygio_notify_reference_callback): New functions. (pygio_notify_free): Rename from pygio_free_notify() and extend. (async_result_callback_marshal): Warn if new `referenced' field is not set (programming error). (_wrap_g_drive_eject, _wrap_g_drive_poll_for_media) (_wrap_g_mount_unmount, _wrap_g_mount_eject) (_wrap_g_mount_remount): Lots of cleanup: use new functions instead of repeating code, unify and fix error handling. * gio/gfile.override (_wrap_g_file_read_async) (_wrap_g_file_load_contents_async) (_wrap_g_file_enumerate_children_async) (_wrap_g_file_mount_mountable, _wrap_g_file_unmount_mountable) (_wrap_g_file_mount_enclosing_volume, _wrap_g_file_copy) (_wrap_g_file_copy_async, _wrap_g_file_move) (_wrap_g_file_append_to_async, _wrap_g_file_create_async) (_wrap_g_file_replace_async, _wrap_g_file_query_info_async) (_wrap_g_file_replace_contents_async): Similar cleanup. * gio/gfileenumerator.override (_wrap_g_file_enumerator_next_files_async): Similar cleanup. * gio/gicon.override (_wrap_g_loadable_icon_load_async): Similar cleanup. * gio/ginputstream.override (_wrap_g_input_stream_close_async): Similar cleanup. * gio/goutputstream.override (_wrap_g_output_stream_write_async) (_wrap_g_output_stream_close_async): Similar cleanup. * gio/gvolume.override (_wrap_g_volume_mount) (_wrap_g_volume_eject): Similar cleanup. * tests/test_gio.py (TestFile.test_copy_async): Fix the test. svn path=/trunk/; revision=996
* Define methods.Mads Chr. Olesen2009-01-041-0/+86
| | | | | | | | | | | | | 2009-01-04 Mads Chr. Olesen <gnome-bugzilla@shiyee.dk> * gio/gio.defs (gio.File.copy_async, gio.File.copy_finish): Define methods. * gio/gfile.override (_wrap_g_file_copy_async): New function. * tests/test_gio.py (TestFile.test_copy_async): Test the methods. svn path=/trunk/; revision=990
* Merge from 2.16 branch:Paul Pogonyshev2008-12-211-2/+3
| | | | | | | | | | | | | | | | | | | 2008-12-21 Paul Pogonyshev <pogonyshev@gmx.net> Bug 564102 – _wrap_g_output_stream_write_async not adding a reference to the buffer passed * gio/gio.override (pygio_notify_copy_buffer): New function. (pygio_free_notify): Free new `buffer' field if it is set. * gio/goutputstream.override (_wrap_g_output_stream_write_async): Copy the buffer with new pygio_notify_copy_buffer() and use the copy for g_output_stream_write_async() call. * gio/gfile.override (_wrap_g_file_replace_contents_async): Same as for _wrap_g_output_stream_write_async(). svn path=/trunk/; revision=981
* Fix typos breaking compilation (bug #551212).Frederic Peters2008-09-071-4/+4
| | | | | | | | | | 2008-09-07 Frederic Peters <fpeters@0d.be> * gio/gfile.override (_wrap_g_file_load_contents) (_wrap_g_file_load_contents_finish): Fix typos breaking compilation (bug #551212). svn path=/trunk/; revision=966
* Bug 551059 – GFile load_contents methods chop data at first \0Jonathan Matthew2008-09-071-2/+2
| | | | | | | | | | | | 2008-09-07 Jonathan Matthew <jonathan@d14n.org> Bug 551059 – GFile load_contents methods chop data at first \0 * gio/gfile.override: Use 's#' (length specified) rather than 's' when constructing result values in load_contents and load_contents_finish. svn path=/trunk/; revision=965
* Fix keywords getting out of sync with actual argument order.Paul Pogonyshev2008-08-161-1/+1
| | | | | | | | | 2008-08-16 Paul Pogonyshev <pogonyshev@gmx.net> * gio/gfile.override (_wrap_g_file_enumerate_children_async): Fix keywords getting out of sync with actual argument order. svn path=/trunk/; revision=949
* Bug 546120 – make gio.File more PythonicPaul Pogonyshev2008-08-101-0/+58
| | | | | | | | | | | | | | 2008-08-10 Paul Pogonyshev <pogonyshev@gmx.net> Bug 546120 – make gio.File more Pythonic * gio/gfile.override (_wrap_g_file_tp_richcompare) (_wrap_g_file_tp_hash, _wrap_g_file_tp_repr): New functions. * tests/test_gio.py (TestFile.test_eq, TestFile.test_hash): New tests. svn path=/trunk/; revision=939
* Bug 547067 – add File.replace_contents, replace_contents_async,Jonathan Matthew2008-08-101-3/+152
| | | | | | | | | | | | | | | 2008-08-10 Jonathan Matthew <jonathan@d14n.org> Bug 547067 – add File.replace_contents, replace_contents_async, replace_contents_finish. * gio/gfile.override: * gio/gio.defs: * tests/test_gio.py: Add overrides, docs, and tests for File.replace_contents, replace_contents_async, and replace_contents_finish. svn path=/trunk/; revision=935
* Bug 546591 – File.copy progress_callback does not workPaul Pogonyshev2008-08-091-10/+7
| | | | | | | | | | | | | | | | | | | | | 2008-08-09 Paul Pogonyshev <pogonyshev@gmx.net> Bug 546591 – File.copy progress_callback does not work * gio/gfile.override (file_progress_callback_marshal): Use PyObject_CallFunction() instead of PyEval_CallFunction(). Use "K" instead of "k" (the latter is not correct for 32-bit platforms). Don't free 'notify' here. (_wrap_g_file_copy): Free 'notify'. (_wrap_g_file_move): Likewise. * gio/gio.override (pygio_free_notify): New function. (async_result_callback_marshal): Use it. * tests/test_gio.py (TestFile.test_copy_progress.progress): New test. svn path=/trunk/; revision=932
* Bug 546734 – Missing Py_INCREFs for some file async methodsJonathan Matthew2008-08-071-0/+10
| | | | | | | | | | | | | 2008-08-07 Jonathan Matthew <jonathan@d14n.org> Bug 546734 – Missing Py_INCREFs for some file async methods * gio/gfile.override: Increment refcounts on callbacks and callback data for append_to_async, create_async, replace_async, query_info_async and load_contents_async as for all other async methods. svn path=/trunk/; revision=929
* Move the progress callback for move/copy so it's consistent with theJohan Dahlin2008-08-061-6/+6
| | | | | | | | | | | | 2008-08-06 Johan Dahlin <johan@gnome.org> * gio/gfile.override: * gio/gio.defs: Move the progress callback for move/copy so it's consistent with the documentation and positional arguments. Update documentation as well svn path=/trunk/; revision=928
* Wrap GFile.replace_async and query_info_async with docs and test.Gian Mario Tagliaretti2008-08-031-2/+95
| | | | svn path=/trunk/; revision=923
* Fix a copy/paste pattern...Gian Mario Tagliaretti2008-08-021-42/+0
| | | | svn path=/trunk/; revision=921
* Wrap GFile.create_async with docs and testGian Mario Tagliaretti2008-08-021-1/+85
| | | | svn path=/trunk/; revision=920
* Wrap GFile.append_to_async with docs and testGian Mario Tagliaretti2008-08-021-1/+44
| | | | svn path=/trunk/; revision=912
* Wrap GFile.query_writable_namespaces with docs and testGian Mario Tagliaretti2008-08-011-1/+45
| | | | svn path=/trunk/; revision=909
* Wrap gio.Volume.mount and gio.Volume.ejectJohan Dahlin2008-08-011-3/+73
| | | | | | | | | | | | | | 2008-08-02 Johan Dahlin <johan@gnome.org> * gio/Makefile.am: * gio/gfile.override: * gio/gio.defs: * gio/gio.override: * gio/gvolume.override: Wrap gio.Volume.mount and gio.Volume.eject svn path=/trunk/; revision=907
* Wrap new object gio.FileAttributeInfo, g_file_set_attribute and ↵Gian Mario Tagliaretti2008-07-291-36/+122
| | | | | | g_file_query_settable_attributes methods. svn path=/trunk/; revision=901
* remove unused structureJohan Dahlin2008-07-251-5/+0
| | | | svn path=/trunk/; revision=852
* Wrap gio.File.copy, add tests and documentation. RenameJohan Dahlin2008-07-241-25/+135
| | | | | | | | | | | | | | | | | 2008-07-24 Johan Dahlin <johan@gnome.org> * gio/gfile.override: * gio/gfileenumerator.override: * gio/ginputstream.override: * gio/gio.defs: * gio/gio.override: * gio/goutputstream.override: * tests/test_gio.py: Wrap gio.File.copy, add tests and documentation. Rename PyGAsyncRequestNotify to PyGIONotify and reuse it. svn path=/trunk/; revision=850
* Bind gio.Mount.unmount, gio.File.mount_mountable,Johan Dahlin2008-07-191-3/+173
| | | | | | | | | | | | | | | 2008-07-19 Johan Dahlin <johan@gnome.org> * gio/gfile.override: * gio/gio.defs: * gio/gio.override: * tests/test_gio.py: Bind gio.Mount.unmount, gio.File.mount_mountable, gio.File.unmount_mountable and gio.File.mount_enclosing_volume. Add documents and tests. svn path=/trunk/; revision=837
* Wrap gio.File.enumerate_children_async, add tests, docstring and anJohan Dahlin2008-07-181-4/+62
| | | | | | | | | | | | | | * 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
* Use %zd instead of %d since it's a Py_ssize_t and not an int.Johan Dahlin2008-07-181-1/+1
| | | | | | | | | | 2008-07-18 Johan Dahlin <johan@gnome.org> * gio/gfile.override: Use %zd instead of %d since it's a Py_ssize_t and not an int. svn path=/trunk/; revision=827
* wrap File.load_contents_async and File.load_contents_finish with docsstrings ↵Gian Mario Tagliaretti2008-07-141-2/+72
| | | | | | and a test svn path=/trunk/; revision=802
* Refactor cancellable check to a utility function, avoidsJohan Dahlin2008-07-141-21/+5
| | | | | | | | | | | | | | | | 2008-07-14 Johan Dahlin <johan@gnome.org> * gio/Makefile.am: * gio/gfile.override: * gio/ginputstream.override: * gio/gio.override: * gio/goutputstream.override: * gio/pygio-utils.c (pygio_check_cancellable): * gio/pygio-utils.h: Refactor cancellable check to a utility function, avoids svn path=/trunk/; revision=797
* wrap File.load_contents with docstringsGian Mario Tagliaretti2008-07-111-2/+45
| | | | svn path=/trunk/; revision=793
* Move around the order of the callback argument to async methods, so itJohan Dahlin2008-04-111-16/+20
| | | | | | | | | | | | | | | 2008-04-11 Johan Dahlin <jdahlin@async.com.br> * gio/gfile.override: * gio/ginputstream.override: * gio/goutputstream.override: * tests/test_gio.py: Move around the order of the callback argument to async methods, so it comes before priority and cancellable, which can have default values. svn path=/trunk/; revision=773
* Fix a couple of silly typos and use gio.File instead of GFile inJohan Dahlin2008-04-081-7/+8
| | | | | | | | | | 2008-04-08 Johan Dahlin <johan@gnome.org> * gio/gfile.override (_wrap__install_file_meta): Fix a couple of silly typos and use gio.File instead of GFile in exceptions. svn path=/trunk/; revision=765
* Make gio.File() (calling on an interface) a factory for creating files.Johan Dahlin2008-04-071-0/+90
| | | | | | | | | | | | | | | 2008-04-07 Johan Dahlin <johan@gnome.org> * gio/__init__.py: * gio/gfile.override: * gio/gio-types.defs: * gio/gio.override: * tests/test_gio.py: Make gio.File() (calling on an interface) a factory for creating files. Add tests and a docstring. svn path=/trunk/; revision=764
* Don't assume the buffer is set, use Py_XINCREF instead of Py_INCREF.Johan Dahlin2008-01-211-0/+75
2008-01-21 Johan Dahlin <johan@gnome.org> * gio/gio.override (async_result_callback_marshal): Don't assume the buffer is set, use Py_XINCREF instead of Py_INCREF. * gio/Makefile.am: * gio/ginputstream.override: * gio/goutputstream.override: * gio/gvolumemonitor.override: * gio/gfile.override: * tests/test_gio.py: Implement and test GFile.read_async. Use try/finally to always quit the mainloop, even if the test fail. Update source comment headers. svn path=/trunk/; revision=744