summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix double-freeing GValues in arraysMartin Pitt2012-03-161-1/+6
| | | | | | | | | | When marshalling a GValue array to C, the GValue items are copied into a C GValue array, not a C GValue pointer array. _pygi_marshal_from_py_array() already calls the cleanup_func for the original item; _pygi_marshal_cleanup_from_py_array() must not do it again, as this would try to g_slice_free the array item. https://bugzilla.gnome.org/show_bug.cgi?id=672224
* Renamed "property" class to "Property"Simon Feltman2012-03-165-61/+62
| | | | | | | | | | | | 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>
* Fix Python to C marshalling of GValue arraysMartin Pitt2012-03-163-6/+34
| | | | | | | | | | | | | | | | | | For GValues we cannot just copy the GValue memory in _pygi_marshal_from_py_array(), as the from_py_cleanup() function clears and releases the GValue and with it its v_pointer. Use g_value_copy() to copy by value instead. This uncovered another bug in _pygi_marshal_cleanup_from_py_array(): It always assumed that C arrays contained pointers, but this is not the case for GValue arrays: these are actual struct arrays, not struct pointer arrays (cf. their construction in _pygi_marshal_from_py_array()). Check if an array contains pointers or values and compute the correct array item pointer for both cases. Also add a corresponding test case for marshalling GValue arrays from C back to Python, which works fine. https://bugzilla.gnome.org/show_bug.cgi?id=672065
* Correct the Gtk.Window hierarchyJohan Dahlin2012-03-162-30/+61
| | | | | | | | | | | | | | | | | | We need to make sure that all Gtk.Dialog subclasses inherit from the overridden Window class. For that to be done automaticly we need to create the Window class before the Dialog class. Now when it's inherited properly we need to avoid calling the Window constructor twice as it passes in a construct-only parameter. So add **kwargs to the Window constructor to allow us to pass in any kind of GObject property to it and refactor the Dialog subclasses to pass in all properties to the same constructor. Also adds a bunch of tests to make sure that the hiearchy is correct. https://bugzilla.gnome.org/show_bug.cgi?id=672158 Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
* Renamed getter/setter instance attributes to fget/fset respectively.simon2012-03-153-21/+89
| | | | | | | | | | | | | | | | | | | | | | | The python 'property' class allows for decoration of methods using .getter and .setter. These were added as methods to the GObject.property class to match that of the python property class and allow for decoratored setter methods. In addition, __call__ was added to allow an instantiated decorator with args to also decorate a method: class C(GObject.GObject): _value = 0 @GObject.property(type=int, default=0) def propInt(self): return self._value @propInt.setter def propInt(self, value): self._value = value https://bugzilla.gnome.org/show_bug.cgi?id=586181 Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
* Add Gtk.Arrow/Gtk.Window constructor overrideJohan Dahlin2012-03-141-0/+17
| | | | | | Adds argument that makes them compatible with PyGTK. https://bugzilla.gnome.org/show_bug.cgi?id=672045
* Fix marshalling to/from Python to work on big endian machines.Michel Dänzer2012-03-093-16/+60
| | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=668903 Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
* Use gi_cclosure_marshal_generic instead of duplicating it.Michel Dänzer2012-03-085-243/+4
| | | | | | | | | | Bump gobject-introspection dependency to ensure that we have the corresponding changes in g-i. https://bugzilla.gnome.org/show_bug.cgi?id=668903 Signed-off-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
* Override Gtk.TreeView.get_visible_range to fix returnRené Stadler2012-03-051-0/+5
| | | | | | Just like IconView. https://bugzilla.gnome.org/show_bug.cgi?id=671409
* Plug memory leak in _is_union_memberPaolo Borelli2012-03-041-6/+3
| | | | | When we found the member, unref the objects before breaking out of the loop.
* tests: Split TestInterfaces into separate testsSebastian Pölsterl2012-02-211-17/+19
|
* Post release version bump to 3.1.2Sebastian Pölsterl2012-02-201-1/+1
|
* Prepare 3.1.1 release3.1.1Sebastian Pölsterl2012-02-201-0/+18
|
* Don't use C99 styleSebastian Pölsterl2012-02-181-1/+2
|
* Add test for GPtrArray with transfer fullMartin Pitt2012-02-161-1/+9
| | | | | | | This complements the already existing test for a "transfer container" return array. We can't verify the internal refcount as these arrays get marshalled internally, but at least we can verify that it does not crash due to double-free.
* Drop obsolete g_thread_init()Martin Pitt2012-02-151-3/+0
| | | | Not necessary any more since glib 2.24, and we depend on 2.31.
* Fix deprecated g_source_get_current_time()Martin Pitt2012-02-151-3/+1
| | | | | Use g_get_real_time() instead as recommended by the documentation. This also simplifies the code.
* Fix deprecated g_value_[gs]et_char()Martin Pitt2012-02-153-5/+5
| | | | Replace with _schar(). We depend on glib >= 2.31 already.
* Make pygiconvert.sh correctly convert gtk.gdk.x11_*Simon Schampijer2012-02-151-1/+1
| | | | | Looking at the gir file gtk.gdk.x11_* should get converted to GdkX11.x11_*. Fixing pygiconvert.sh to do so.
* Raise required glib version to 2.31 because of g_value_(get|set)_scharSebastian Pölsterl2012-02-101-3/+3
| | | | Commit ee62df4d2fc0cc63c2f29d3ad9b47b875dbd5f89 introduced both calls
* Fix cset_first typoDieter Verfaillie2012-02-101-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=649267
* pygi-convert: Handle Clutter and CoglBastian Winkler2012-02-101-0/+76
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=664496
* Provide access to gpointer struct valuesCédric Krier2012-02-103-1/+36
| | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=668356 Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
* Add some GType testsPaolo Borelli2012-02-091-2/+15
| | | | Use what was recently added in g-i
* Split GStrv and array variant tests in their own classesPaolo Borelli2012-02-091-6/+23
| | | | Also tidy up the spacing a bit
* Add unit test for builder's connect_afterPaolo Borelli2012-02-081-0/+8
|
* fix GtkBuilder signal connection 'after' logicRyan Lortie2012-02-081-1/+1
| | | | | | | | All GtkBuilder signals are presently being connected 'after', ignoring what is specified in the builder XML. This is due to an obvious logic error. https://bugzilla.gnome.org/show_bug.cgi?id=669705
* test(1) uses '=' to test if strings are identicalPatrick Welche2012-02-081-3/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=669598
* pygspawn: improve error checkingRyan Lortie2012-02-071-2/+2
| | | | | | | | | | | | | | gspawn 'argv' and 'envp' parameters expect sequences of strings. This is enforced by checking that the passed argument is a sequence and that each item returned from it is a string. We do now, however, verify that each item can be successfully taken from the sequence. 'os.environ' is an example of an object that passes PySequence_Check() but fails to return objects from PySequence_ITEM(). Add a simple NULL check to avoid the crash. https://bugzilla.gnome.org/show_bug.cgi?id=669594
* Post release version bump to 3.1.1Sebastian Pölsterl2012-02-061-1/+1
|
* Prepare 3.1.0 release3.1.0-realSebastian Pölsterl2012-02-061-0/+34
|
* Updated DOAP file to only include people currently actively working on the ↵Sebastian Pölsterl2012-02-062-48/+15
| | | | | | project Removed obsolete MAINTAINERS file
* Revert "Convert all strings to utf-8 encoding when retrieving from TreeModel"Sebastian Pölsterl2012-02-063-47/+1
| | | | | | This reverts commit 654711d0f940d7480d0f1cdb25a3dc9996f7a706. Due to this commit breaking backwards compatability, we decided to revert this change
* tests: Fixed issues with python3Sebastian Pölsterl2012-02-061-3/+6
|
* Properly distinguish between different integer types for propertiesSebastian Pölsterl2012-02-062-4/+106
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=664150
* Distinguish between GArray and GPtrArray when cleaning upSebastian Pölsterl2012-02-061-9/+23
| | | | | | | This fixes a crash in test_gi.TestGPtrArray and makes sure memory is free'd correctly https://bugzilla.gnome.org/show_bug.cgi?id=669393
* Add null_gerror_callback unit testPaolo Borelli2012-02-061-0/+9
| | | | | | | This models the case where the callback is successful and does not set an error. https://bugzilla.gnome.org/show_bug.cgi?id=669415
* pyglib_error_check: Re-add missing NULL checkMartin Pitt2012-02-061-0/+2
| | | | | | | | | | Commit adcfe96d49b09bc accidentally dropped the check if *error is NULL, i. e. any error is actually set. Due to that, pyglib_error_check() always returned TRUE. Reintroduce the check. Thanks to Alberto Mardegan for spotting this! https://bugzilla.gnome.org/show_bug.cgi?id=669415
* Add tests/runtests-windows.py to source tarballMichael Culbertson2012-02-041-0/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=663288
* Don't issue a depreciation warning for GtkDialog's NO_SEPARATOR flag, even ↵Sebastian Pölsterl2012-02-041-4/+2
| | | | | | when unused https://bugzilla.gnome.org/show_bug.cgi?id=665553
* Fix bool() operations on GLib.Variant objectsNirbheek Chauhan2012-02-042-0/+63
| | | | | | | | Defines __nonzero__ (python2) and __bool__ (python3) for GLib.Variant Also adds some tests for boolean comparisons. https://bugzilla.gnome.org/show_bug.cgi?id=647723
* Fix hash() and __eq__() for GLib.Variant objectsNirbheek Chauhan2012-02-042-0/+79
| | | | | | | | | Define __hash__, __eq__, __ne__ for GLib.Variant so that objects can be used in sets, dicts, and can be compared using == and != easily. Also adds some tests for this. https://bugzilla.gnome.org/show_bug.cgi?id=647725
* Fix method names of callback testsMartin Pitt2012-01-251-15/+15
| | | | | | Change test_everything.TestCallbacks.* test names from camelCase to the standard PEP-8 underscore_style. This is now consistent with all other test case names.
* Cairo: add missing braces around array-of-struct definitionWill Thompson2012-01-241-1/+1
| | | | | | This triggered a -Wmissing-braces warning. https://bugzilla.gnome.org/show_bug.cgi?id=668497
* g_instance_init: cast to PyGObject * as neededWill Thompson2012-01-241-1/+1
| | | | | | This squashes a compiler warning. https://bugzilla.gnome.org/show_bug.cgi?id=668497
* Fix a few set-but-not-used warnings.Will Thompson2012-01-244-6/+3
| | | | | | | | | | | | | In a couple of cases, the variable in question was set to a value spelled out again later in the function. The 'sequence_cache' variable is re-declared five lines below. The return value of 'read' was previously completely ignored. The 'gssize ret' variable was in fact added to squash an unused-result warning. https://bugzilla.gnome.org/show_bug.cgi?id=668497
* pygmainloop: allow for extra arguments in 'quit' methodStefano Facchini2012-01-241-2/+2
| | | | | | | | To allow for the common syntax: object.connect('signal-name', main_loop.quit) https://bugzilla.gnome.org/show_bug.cgi?id=668288
* Fix bytearray test compatibility with python3Alexandre Rostovtsev2012-01-241-2/+2
| | | | | | https://bugs.gentoo.org/show_bug.cgi?id=321879 https://bugzilla.gnome.org/show_bug.cgi?id=666852
* Respect transfer-type when demarshalling GErrorsAlberto Mardegan2012-01-241-1/+11
| | | | | | | | The marshaller previously ignored "transfer full" on GError* arguments, causing crashes due to double-freeing them. This causes the testCallbackUserdata() test case to crash after the previous GError/GHashTable marshalling fix. https://bugzilla.gnome.org/show_bug.cgi?id=666270
* Support GHashTable and GError as callback/closure argumentsAlberto Mardegan2012-01-242-0/+37
| | | | | | | | | | | Marshalling of these types from C is already implemented, let's take it into use for calbacks and closures too. Add corresponding test cases. https://bugzilla.gnome.org/show_bug.cgi?id=666270 Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>