summaryrefslogtreecommitdiffstats
path: root/gobject
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|
* Reverse operatorJohan Dahlin2004-07-282-2/+2
| | | | | | | | * gobject/pygenum.c (pyg_enum_compare): * gobject/pygflags.c (pyg_flags_compare): Reverse operator * tests/enum.py (FlagsTest.testComparision) (FlagsTest.testComparision): New tests
* If we're on python 2.3, also check for PyBool_Type.Johan Dahlin2004-07-281-0/+4
| | | | | | | * 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-211-4/+42
| | | | | | | | | | | * 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-193-25/+27
| | | | | | | | | | | | | | * 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-1913-749/+798
| | | | | | | | | | | * 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 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-172-0/+33
| | | | | | * tests/enum.py: add, forgot it in last commit * gobject/: Move gobject source files in here.
* gtk/*.overrideJohan Dahlin2004-07-178-53/+795
| | | | | | | | | | | | | | | | | | | | * 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
* 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-055-5/+63
| | | | | | | | | | | | | | | | | * 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
|
* 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
* ImplJohan Dahlin2004-06-042-30/+92
| | | | | | | | | | | | | | | | | | | | | * gtk/gtkwidget.override (_wrap_gtk_widget_class_install_style_property): Impl * gtk/gtkcontainer.override (_wrap_gtk_container_class_list_child_properties): Rename first kwlist argument to klass (from widget), class should be a GObjectClass and not a GtkWidgetClass (_wrap_gtk_container_class_install_child_property): Impl. * gtk/gtk.defs: Change a couple of methods to functions and set correct class * pygobject.h: Add pyg_param_spec_from_object * gobjectmodule.c (create_property): Don't install the property here, return it instead. And don't require a GObjectClass as argument (pyg_param_spec_from_object): New function (add_properties): Update to new create_property (pygobject_api_functions): Export pyg_param_spec_from_object
* Add a new example of subclassing a GtkWidget.Johan Dahlin2004-06-041-2/+9
| | | | | | | | * examples/gtk/widget.py: Add a new example of subclassing a GtkWidget. * Makefile.am (EXTRA_DIST): Add widget.py * pygobject.c (pygobject_new): guard object_ref call
* Add gobject.pygtk_version (_wrap_g_main_context_iteration): block/unblockPYGTK_2_3_92Johan Dahlin2004-05-211-0/+11
| | | | | | * gobjectmodule.c (initgobject): Add gobject.pygtk_version (_wrap_g_main_context_iteration): block/unblock (_wrap_g_main_loop_run): ditto
* pygobject.c (pygobject_new_with_interfaces) Add new type to the moduleJohn Finlay2004-05-181-2/+36
| | | | | * pygobject.c (pygobject_new_with_interfaces) Add new type to the module dict as is done for built-in types.
* pygobject.c (pygobject_new) Bump refcount of types created byJohn Finlay2004-05-181-0/+5
| | | | | * pygobject.c (pygobject_new) Bump refcount of types created by pygobject_new_with_interfaces. Fixes #141042
* allow registering multiple GObject classes with same nameGustavo J. A. M. Carneiro2004-04-181-16/+28
|
* Prevent warnings in Python 2.3PYGTK_2_3_91Gustavo J. A. M. Carneiro2004-04-154-4/+8
|
* Move quark_to_string to initgobjectJohan Dahlin2004-04-131-3/+1
| | | | | * gobjectmodule.c (pyg_register_interface): Move quark_to_string to initgobject
* New function. (pygobject_lookup_class): Modify so we're not traversingJohan Dahlin2004-04-103-15/+107
| | | | | | | | | | | | | | * pygobject.c (pygobject_new_with_interfaces): New function. (pygobject_lookup_class): Modify so we're not traversing parents for unknown types but instead creating new types when they're not registered. We're also using pygobject_new_with_interfaces so interfaces gets attached correctly. Partial fix for bug 129032 * gobjectmodule.c: Add quark and attach the PyTypeObject for GInterfaces. * pygobject-private.h: Make PyGInterface_Type and pyginterface_type_key public
* G_TYPE_STRV handling; GValueArray conversion fixGustavo J. A. M. Carneiro2004-04-092-2/+43
|
* This is a function, not a method.PYGTK_2_3_90Johan Dahlin2004-03-273-10/+18
| | | | | | | | | | | | * gtk/gtk.defs (widget_list_style_properties): This is a function, not a method. * pygobject-private.h, pygobject.h, gobjectmodule.c: Make PyGParamSpec_Type and pyg_param_spec_new part of the public API. * gtk/gtkwidget.override (_wrap_gtk_widget_style_get_property) (_wrap_gtk_widget_class_list_style_properties): Impl. Fixes bug 138104
* Fix again #136204 (GtkTextSearchFlags warning)PYGTK_2_2_0Gustavo J. A. M. Carneiro2004-03-081-4/+11
|
* Fixes for bug 132704, Patch by John Ehresman.Johan Dahlin2004-03-042-5/+25
| | | | | | * pygobject.c (pygobject_chain_from_overridden): * pygtype.c (pyg_signal_class_closure_marshal): Fixes for bug 132704, Patch by John Ehresman.
* block/unblock threads around Py_DECREF in pyobject_freeGustavo J. A. M. Carneiro2004-03-031-0/+2
|
* signa->signalJohan Dahlin2004-02-241-1/+1
| | | | * pygobject.c (pygobject_chain_from_overridden): signa->signal
* Handle conversion of GValueArray to PyObjectGustavo J. A. M. Carneiro2003-12-261-2/+8
|
* explicitly check if the property is readable first, and raise an exceptionJames Henstridge2003-12-231-0/+10
| | | | | | | | | 2003-12-23 James Henstridge <james@daa.com.au> * pygobject.c (pygobject_get_property): explicitly check if the property is readable first, and raise an exception otherwise (pygobject_set_property): check if property is readable (fixes bug #121544).
* add wrapper (from bug #118676).pygtk-2-0-anchorPYGTK_2_0_0PYGTK_1_99_18PYGTK_1_99_17James Henstridge2003-07-311-0/+16
| | | | | | | 2003-07-31 James Henstridge <james@daa.com.au> * pygobject.c (pygobject_handler_is_connected): add wrapper (from bug #118676).
* add a call to PyType_Ready() to make sure the type is initialised (bugJames Henstridge2003-07-311-0/+4
| | | | | | | 2003-07-31 James Henstridge <james@daa.com.au> * pygtype.c (pyg_object_descr_doc_get): add a call to PyType_Ready() to make sure the type is initialised (bug #118699).
* same here.James Henstridge2003-07-242-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-07-24 James Henstridge <james@daa.com.au> * gtk/pygtk.h (init_pygtk): same here. * pygobject.h (init_pygobject): convert fatal errors to normal exceptions. * gtk/gtkglmodule.c (initgl): same here. * gtk/libglademodule.c (initglade): same here. * gtk/gtkmodule.c (init_gtk): same here. * atkmodule.c (initatk): same here. * pangomodule.c (initpango): same here. * gobjectmodule.c (initgobject): don't cause fatal errors if an exception on init. * codegen/codegen.py (write_source): print an error message if it isn't possible to import a particular name from the module. * autogen.sh (DIE): require Automake 1.7. * configure.in (AC_ARG_ENABLE): enable thread support by default.
* change first block threads instead of unblocking them here. (Looks likeJames Henstridge2003-07-031-1/+1
| | | | | | | | 2003-07-03 James Henstridge <james@daa.com.au> * gobjectmodule.c (pyg_error_check): change first block threads instead of unblocking them here. (Looks like John forgot to check this part in).
* add copyright notices, and update to LGPL 2.1.James Henstridge2003-06-264-4/+85
| | | | | | 2003-06-26 James Henstridge <james@daa.com.au> * (lots of stuff): add copyright notices, and update to LGPL 2.1.
* Fix bogus strcmp. Thanks to John Ehresman for spotting this. Fixes #110489Johan Dahlin2003-06-061-1/+2
| | | | | * gobjectmodule.c (get_handler_priority): Fix bogus strcmp. Thanks to John Ehresman for spotting this. Fixes #110489
* Make the third argument optional. This broke distutils.Johan Dahlin2003-05-282-4/+0
| | | | | | | | | * codegen/defsparser.py (DefsParser.__init__): Make the third argument optional. This broke distutils. * gobjectmodule.c, pygtype.c, gtk/gtk.override, gtk/pygtkcellrenderer.c, pygtktreemodel.c: Remove unnecessary calls to PyErr_Clear. It's not needed right after a PyErr_Print.
* add missing "extern" keyword (from Glyph's patch).James Henstridge2003-03-241-1/+1
| | | | | | | 2003-03-24 James Henstridge <james@daa.com.au> * pygobject-private.h: add missing "extern" keyword (from Glyph's patch).