summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* New functions exposed through _PyGObject_Functions to work around bugs inJohn Ehresman2004-09-273-5/+102
| | | | | | | | | | | | * gobject/gobjectmodule.c: New functions exposed through _PyGObject_Functions to work around bugs in the PyGILState api's * gobject/pygobject.h: idem * gobject/pygobject-private.h: idem * gtk/gtk.override (_wrap_gtk_main): add pyg_enable_threads() call to ensure thread state for thread invoking this function is remembered. Only call pyg_enable_threads() here if threads were previously enabled
* catch ImportError if glade is not found and set glade to NoneJohn Ehresman2004-09-271-1/+4
| | | | | * tests/common.py: catch ImportError if glade is not found and set glade to None
* Small c module to help testingJohan Dahlin2004-09-274-8/+59
| | | | | | | * tests/testhelper.c: Small c module to help testing * tests/test_subtype.py: tests for this, use testhelper here aswell
* Revert parts of Gustavos changes, so the size of interfaces are correct.Johan Dahlin2004-09-272-1/+15
| | | | | | | * codegen/codegen.py (FileOutput.resetline): Revert parts of Gustavos changes, so the size of interfaces are correct. * tests/test_subtype.py: tests for this.
* Make PyGClosure semi-publicGustavo J. A. M. Carneiro2004-09-262-8/+9
|
* Move some tests from gtype and rename from signal.pyJohan Dahlin2004-09-253-7/+30
| | | | | * tests/test_signal.py: Move some tests from gtype and rename from signal.py
* Bug 153718: exception in overriden gsignals causes ref count problemsGustavo J. A. M. Carneiro2004-09-252-5/+7
|
* Tests for GdkColor constructionJohn Ehresman2004-09-221-0/+16
|
* Filter out 0 valuesJohan Dahlin2004-09-171-1/+7
| | | | | | | * gobject/pygflags.c: Filter out 0 values * Makefile.am: * docs/Makefile.am: Revert documentation changes
* allow override of some more slotsGustavo J. A. M. Carneiro2004-08-201-7/+0
|
* gobject/pygenum.c (pyg_enum_repr) Match enum values to avoid segfaultsJohn Finlay2004-08-151-1/+5
| | | | | | * gobject/pygenum.c (pyg_enum_repr) Match enum values to avoid segfaults when enum minimum isn't 0 and values aren't a continuous sequence.
* gobject/pygflags.c (pyg_flags_add) Return NULL when no stub.John Finlay2004-08-081-0/+1
| | | | * gobject/pygflags.c (pyg_flags_add) Return NULL when no stub.
* Don't comment out the fallback, it break the test. (Wow, the testsuitePYGTK_2_3_96Johan Dahlin2004-08-063-15/+23
| | | | | | | | | | | | * gobject/pygflags.c (pyg_flags_from_gtype): Don't comment out the fallback, it break the test. (Wow, the testsuite caught another bug!) * tests/enum.py: Additional tests. * gobject/pygenum.c (pyg_enum_repr): Don't use g_enum_get_value, use enum_class->values[n].value_name instead. Also check if the value is NULL or not. This makes gtk.icon_size_register work a little bit better.
* Use methflags argument for defines instead of discarding itJohan Dahlin2004-08-061-1/+1
| | | | | * codegen/codegen.py (Wrapper.write_methods): Use methflags argument for defines instead of discarding it
* New test.Johan Dahlin2004-08-043-2/+13
| | | | | | | | * tests/enum.py (EnumTest.testOutofBounds): New test. * gobject/pygflags.c (pyg_flags_from_gtype): * gobject/pygenum.c (pyg_enum_from_gtype): Don't segfault on unknown values.
* make threading runtime optionalGustavo J. A. M. Carneiro2004-08-0411-70/+122
|
* GdkModifierType is flags not an enum.Johan Dahlin2004-08-042-2/+8
| | | | | | | | | | | * gtk/gtk.override (_wrap_gtk_accel_map_lookup_entry): GdkModifierType is flags not an enum. * gobject/pygenum.c (pyg_enum_from_gtype): Don't crash if its not an enum * gobject/pygflags.c (pyg_flags_from_gtype): Don't crash if its not flags
* Urgh. more threading 'fixes'Johan Dahlin2004-08-032-20/+17
|
* remove unused variableGustavo J. A. M. Carneiro2004-08-031-1/+0
|
* More minor threading fixesJohan Dahlin2004-08-033-16/+4
|
* Create a new GType on the fly if there isn't one for the GType.Johan Dahlin2004-08-031-18/+22
| | | | | | * gobject/pygenum.c (pyg_enum_from_gtype): Create a new GType on the fly if there isn't one for the GType. (pyg_enum_add): Allow module to be NULL.
* Add better support for boolean type now when we can require 2.3. Fixes bugJohan Dahlin2004-08-036-33/+9
| | | | | | | | | | | | | | | | | * codegen/argtypes.py: * gobject/gobjectmodule.c: (pyg_source_remove): * gobject/pygmaincontext.c: (_wrap_g_main_context_iteration), (_wrap_g_main_context_pending): * gobject/pygmainloop.c: (_wrap_g_main_loop_is_running): * gobject/pygobject.c: (pygobject_handler_is_connected): * gobject/pygparamspec.c: (pyg_param_spec_getattr): * gobject/pygtype.c: (pyg_value_as_pyobject): * gtk/gdk.override: * gtk/gtk.override: * gtk/gtktextview.override: * gtk/gtkwidget.override: * pango.override: Add better support for boolean type now when we can require 2.3. Fixes bug 149121
* Clean up most functions here to have only one return path.Johan Dahlin2004-08-037-57/+73
| | | | | | | | | | | | | | | | | | * gtk/pygtktreemodel.c: Clean up most functions here to have only one return path. * gobject/pygobject.c (pygobject_emit): Protect g_value_unset by UNBLOCK/BLOCK_THREADS since it might call pygobject_free which will result in a deadlock. * gobject/gobjectmodule.c (pyg_thread_init): New function, move thread initalization stuff in here. * All over the place: Kill pyg_block/unblock_threads and use PyGILState and Py_BEGIN/END_ALLOW_THREADS. unblock [code] block calls are replaced by Py_BEGIN/END and block [code] unblock calls are replaced by PyGILState.
* Call PyEval_InitThreads. Perhaps its something that always should bePYGTK_2_3_95Johan Dahlin2004-08-026-16/+51
| | | | | | | | | | | | | | | | * gobject/gobjectmodule.c (initgobject): Call PyEval_InitThreads. Perhaps its something that always should be called. * README (Author): Add a requirements section * configure.in: Require Python 2.3 * setup.py (version): Ditto * gobject/pygtype.c, gobject/pygobject.h: Remove 2.2 compat. * All over the place: Add support for PyGILState.
* Added small PYTHONPATH noteJohan Dahlin2004-07-291-1/+2
|
* Use gobject.type_name,type_from_name for testing instead of GtkListStore.Johan Dahlin2004-07-292-11/+11
| | | | | * tests/gtype.py (GTypeTest.checkType): Use gobject.type_name,type_from_name for testing instead of GtkListStore.
* s/e/enumJohan Dahlin2004-07-281-13/+13
|
* Reverse operatorJohan Dahlin2004-07-283-2/+32
| | | | | | | | * gobject/pygenum.c (pyg_enum_compare): * gobject/pygflags.c (pyg_flags_compare): Reverse operator * tests/enum.py (FlagsTest.testComparision) (FlagsTest.testComparision): New tests
* Test various other types aswellJohan Dahlin2004-07-281-7/+48
|
* If we're on python 2.3, also check for PyBool_Type.Johan Dahlin2004-07-283-0/+20
| | | | | | | * gobject/pygtype.c (pyg_type_from_object): If we're on python 2.3, also check for PyBool_Type. * tests/gtype.py (GTypeTest.testBoolType): New test
* Add, so Lorenzo can introspect flags properly tooPYGTK_2_3_94Johan Dahlin2004-07-212-16/+98
| | | | | | | | | | | * gobject/pygflags.c (pyg_flags_get_first_value_name) (pyg_flags_get_first_value_nick): Add, so Lorenzo can introspect flags properly too (pyg_flags_get_value_names, pyg_flags_get_value_nicks): Make this a little bit more useful. All values can still be fetch through __flags_values__ * tests/enum.py: Improve and extend to test most enum/flags operations
* Simplify, fix name in exceptions and remove warning.Johan Dahlin2004-07-203-4/+7
| | | | | | | | | | | | * gtk/gtk.override (_wrap_gtk_file_chooser_dialog_new): Simplify, fix name in exceptions and remove warning. * gobject/pygenum.c (pyg_enum_from_gtype): Fall back to int for unregistered enums. * gobject/pygflags.c (pyg_flags_from_gtype): Ditto * gobject/gobjectmodule.c (initgobject): Rename back to MainLoop, MainContext
* s/flag/flags in tp_reprPYGTK_2_3_93Johan Dahlin2004-07-191-1/+1
|
* Fix, a window is really WITHDRAWN if it's not SHOWN and not ICONIFIED...Johan Dahlin2004-07-196-29/+42
| | | | | | | | | | | | | | * tests/enum.py (EnumTest.testWindowGetState): Fix, a window is really WITHDRAWN if it's not SHOWN and not ICONIFIED... * tests/common.py: Add .. and ../gobject when distcheck isn't ran * gobject/pygenum.c: Use a dict instead of a tuple for __enum_values__, so we can handle negative enum values (eg: GDK_NOTHING) * gobject/pyflags.c: Ditto for __flag_values__ * gobject/pygparamspec.c (pyg_param_spec_getattr): reference count fixing
* Update, why do I even bother to update 3 different build systems?Johan Dahlin2004-07-1915-749/+808
| | | | | | | | | | | * gobject/Makefile.am: * setup.py: * makefile.msc: Update, why do I even bother to update 3 different build systems? * gobject/: Split out GParamSpec, GMainLoop, GMainContext and GPointer to separate files. Also remove *.h files and go back to the old scheme (everything in pygobject.h)
* Remove, out of date since 0.6.x!Johan Dahlin2004-07-193-12/+10
| | | | | | * description.py: Remove, out of date since 0.6.x! * tests/Makefile.am, tests/common.py: Make distcheck pass
* Remove references to &PyInt_Type from static type struct initializationJohn Ehresman2004-07-194-4/+86
| | | | | | | | | * gobject/pygflags.c, gobject/pygenum.c, gobject/gobjectmodule.c (initgobject): Remove references to &PyInt_Type from static type struct initialization and manually set it before PyType_Ready calls * makefile.msc, gtk/makefile.msc, gobject/makefile.msc: VC++ makefile changes for new directory layout
* New gettersJohan Dahlin2004-07-186-27/+128
| | | | | | | | | | | * gobject/pygflags.c (pyg_flags_get_value_nicks) (pyg_flags_get_value_names): New getters * gobject/pygenum.c (pyg_enum_get_value_nick) (pyg_enum_get_value_name): New getters * gobject/gobjectmodule.c (pyg_param_spec_getattr): add enum_class and flags_class properties.
* add, forgot it in last commitJohan Dahlin2004-07-174-2/+126
| | | | | | * tests/enum.py: add, forgot it in last commit * gobject/: Move gobject source files in here.
* gtk/*.overrideJohan Dahlin2004-07-1713-56/+815
| | | | | | | | | | | | | | | | | | | | * gtk/*.override * codegen/codegen.py: * codegen/argtypes.py: Update for enums * pygtype.c (pyg_value_as_pyobject): Use new enum/flag functions * pygenum.[ch]: Handle GFlag * pygflags.[ch]: Handle GFlag * atk-types.defs: Fix gtype-id for all enums * gobjectmodule.c (initgobject): Clean up and add convinience macros * tests/enum.py: New file * tests/common.py: New file, also stole from gst-python
* New script to run all tests in one takeJohan Dahlin2004-07-107-77/+125
| | | | | | | | | * tests/runtests.py: New script to run all tests in one take * tests/Makefile.am: autotoolify * tests/signal.py: New simple test taken from examples/gobject/signal.py
* Back out changes that should not have been committed (oops)John Ehresman2004-07-061-2/+1
|
* New conversion functions that use GParamSpec's declarations of new paramJohn Ehresman2004-07-056-7/+65
| | | | | | | | | | | | | | | | | * pygtype.c (pyg_param_gvalue_from_pyobject, pyg_param_gvalue_as_pyobject): New conversion functions that use GParamSpec's * pygobject.h, pygobject-private.h: declarations of new param conversion functions * pygobject.c (pygobject_get_property, pygobject_set_property): Use param conversion functions * gobjectmodule.c (pyg_parse_constructor_args): reorder local variable declaration so it will compile with VC++ * tests/testconversion.py: tests for above
* property based constructorsGustavo J. A. M. Carneiro2004-07-042-1/+61
|
* tests directory: unit testsJohn Ehresman2004-07-042-0/+77
|
* John Ehresman's patch to improve gunichar parameter handlingGustavo J. A. M. Carneiro2004-07-044-1/+50
|
* fix bug #144135 (gtk.gdk.GC attributes not working)Gustavo J. A. M. Carneiro2004-06-201-0/+13
|
* Fixed UNICHAR support since we don't have G_TYPE_UNICHAR but G_TYPE_UINTLorenzo Gil Sanchez2004-06-041-1/+1
|
* Add support for paramspec.default_value for GParamSpec types that supportJohan Dahlin2004-06-041-0/+43
| | | | | * gobjectmodule.c (pyg_param_spec_getattr): Add support for paramspec.default_value for GParamSpec types that support it
* added gobject.TYPE_UNICHARLorenzo Gil Sanchez2004-06-041-0/+1
| | | | | | 2004-06-04 Lorenzo Gil Sanchez <lgst@cvs.gnome.org> * gobjectmodule.c (initgobject): added gobject.TYPE_UNICHAR