summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* 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).
* Bug #110619:Naofumi Yasufuku2003-07-021-2/+41
| | | | | | | | | | | | | | | | | | | | | | | | | 2003-05-03 Naofumi Yasufuku <naofumi@yasufuku.net> Bug #110619: * dsextras.py (InstallLib.prepare): Fixed self.prefix initialization for win32. (BuildExt.init_extra_compile_args, BuildExt.build_extensions) (BuildExt.build_extension): On win32, add MinGW GCC option for MSVC compatible struct packing (gcc2: -fnative-struct, gcc3: -mms-bitfields). (BuildExt.modify_compiler, BuildExt.build_extensions): On win32, remove '-static' linker option to prevent MinGW ld from trying to link with MSVC import libraries. * setup.py: Changed list_files('codegen/*.py') to list_files(os.path.join('codegen', '*.py')) for win32. Fixed pygtk.h installation directory. 2003-07-02 James Henstridge <james@daa.com.au> * dsextras.py (pkgc_version_check): remove "self.", fixing bug 111002 (pointed out by Seth Nickell).
* 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.
* Install dsextras.Johan Dahlin2003-04-291-2/+2
| | | | | | 2003-04-29 Johan Dahlin <jdahlin@async.com.br> * gtk/Makefile.am (pygtk_PYTHON): Install dsextras.
* 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).
* add doc comments.PYGTK_1_99_16James Henstridge2003-03-133-0/+197
| | | | | | | | | | 2003-03-13 James Henstridge <james@daa.com.au> * gobjectmodule.c: add doc comments. * pygobject.c: add doc comments. * pygboxed.c: add doc comments.
* add some documentation.James Henstridge2003-03-121-0/+100
| | | | | | 2003-03-12 James Henstridge <james@daa.com.au> * pygtype.c: add some documentation.
* the GObject should own a ref to the wrapper. (pygobject_new): get rid ofJames Henstridge2003-03-072-69/+49
| | | | | | | | | | | | | | | | | | | | 2003-03-06 James Henstridge <james@daa.com.au> * pygobject.c (pygobject_register_wrapper): the GObject should own a ref to the wrapper. (pygobject_new): get rid of the hasref code, and make sure that the GObject owns a ref to the wrapper if we create it. (pygobject_dealloc): get rid of the hasref code. If we get this far, the wrapper is dead. (pygobject_traverse): if the GObject's refcount == 1, then traverse to self. (pygobject_clear): clear self->obj and self->inst_dict. (pygobject_register_class): set tp_clear() so that things actually work. Without this, there was no tp_clear method for subclasses of GObject. * pygobject.h: remove hasref member, hopefully not needed if relying on cycle GC.
* Unblock threads before invalidating our closures, since this might triggerJon Trowbridge2003-03-043-7/+34
| | | | | | | | | | | | | | | | | | | 2003-03-04 Jon Trowbridge <trow@ximian.com> * pygobject.c (pygobject_dealloc): Unblock threads before invalidating our closures, since this might trigger a destructor that needs to execute python code. (pygobject_clear): Ditto. * pygboxed.c (pyg_boxed_dealloc): Unblock threads before freeing the boxed type, since the destructor may need to execute python code. (pyg_boxed_new): Block threads while we make our Py* calls. (pyg_pointer_new): Block threads while we make our Py* calls. * gobjectmodule.c (pyg_object_set_property): We need to block threads before our call to pygobject_new. (pyg_object_get_property): Ditto.
* Fix function name in exception.Johan Dahlin2003-03-021-1/+1
| | | | * gobjectmodule.c (pyg_io_add_watch): Fix function name in exception.
* Small typo.Johan Dahlin2003-02-271-1/+1
| | | | | | * dsextras.py (getstatusoutput): Small typo. * setup.py: Cut the doclines, to make the windows installer happy
* Added win32 support and some rearrangements. Largely based upon patch byJohan Dahlin2003-02-271-49/+72
| | | | | * setup.py, dsextras.py: Added win32 support and some rearrangements. Largely based upon patch by Cedric Gustin.
* Added.Johan Dahlin2003-02-081-6/+36
| | | | | | | | * pygtk-2.0.pc.in (codegendir): Added. * setup.py: Added Numeric and gtkgl support (gtkgl untested). * dsextras.py: Updated.
* Fix template bustage.Johan Dahlin2003-01-241-1/+1
| | | | * dsextras.py (InstallLib.add_template_option): Fix template bustage.
* Import codegen here instead, needs to be fixed in the future though.Johan Dahlin2003-01-211-4/+14
| | | | | | | * dsextras.py (Template.generate): Import codegen here instead, needs to be fixed in the future though. * Makefile.am (EXTRA_DIST): Added dsextras.py
* Add GMainContext bindings and complete the GMainLoop bindings. FixesJohan Dahlin2003-01-212-12/+173
| | | | | * gobjectmodule.c: Add GMainContext bindings and complete the GMainLoop bindings. Fixes #102362.
* Splitted out from setup.py. It should be reusable for gnome-python andJohan Dahlin2003-01-211-0/+213
| | | | | | * dsextras.py: Splitted out from setup.py. It should be reusable for gnome-python and other extensions that uses pygtk. Fixes #103615
* Check if a directory is empty before adding it to the path. Also added aJohan Dahlin2003-01-191-2/+10
| | | | | | * pygtk.py (_get_available_versions): Check if a directory is empty before adding it to the path. Also added a few comments. Fixes #103876 (Ross Burton).
* use os.path.join in a few more placesJohan Dahlin2003-01-182-6/+113
| | | | | | | | | | | * setup.py: use os.path.join in a few more places * pygobject-private.h: Add PyGMainLoop struct and type * gobjectmodule.c (_wrap_g_main_loop_new, _wrap_g_main_loop_quit) (_wrap_g_main_loop_is_running, _wrap_g_main_loop_run): Added GMainLoop wrapper. (initgobject): Register wrapper in gobject.MainLoop
* In my fix for bug #102756 on 2003-01-08, I should have used calls toJon Trowbridge2003-01-171-5/+5
| | | | | | | | | | | | | | | | | 2003-01-17 Jon Trowbridge <trow@ximian.com> * pygobject.c (pygobject_dealloc): In my fix for bug #102756 on 2003-01-08, I should have used calls to pyg_unblock_threads()/ pyg_block_threads() instead of directly calling the Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS macros. The macros don't update our local thread lock counts, causing problems in cases where the finalization of one object triggers the finalization of another. (When I say "problems", I of course mean "horrible crashes and mysterious race conditions".) * gtk/gtk-types.c (pygtk_style_helper_dealloc, pygtk_style_helper_setitem, pygtk_tree_model_row_dealloc, pygtk_tree_model_row_iter_dealloc): See above.
* Wrap Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS around the call toJon Trowbridge2003-01-081-1/+7
| | | | | | | | | | | | | | | | | | | | | 2003-01-08 Jon Trowbridge <trow@ximian.com> * pygobject.c (pygobject_dealloc): Wrap Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS around the call to g_object_unref. We need to do this because the object finalizers might trigger other code that has to acquire the interpreter lock, causing a deadlock. Fixes #102756. * gtk/gtk-types.c (pygtk_style_helper_dealloc): Wrap the call to g_object_unref in Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS. This should let us avoid other instances of bug #102756. (pygtk_style_helper_setitem): Ditto. (pygtk_tree_model_row_dealloc): Ditto. (pygtk_tree_model_row_iter_dealloc): Ditto. * gtk/gdk.override (pygdk_unblock_threads, pygdk_unblock_threads): Restored David I Lehn's patch (#98380). His patch was fine --- it just caused bug #102756 to emerge.
* Doh! Paper bagJohan Dahlin2003-01-081-3/+5
|
* Rewrite using glob.glob, with python2.2 glob uses fnmatch.filter with isJohan Dahlin2003-01-071-10/+15
| | | | | | | * pygtk.py (_get_available_versions): Rewrite using glob.glob, with python2.2 glob uses fnmatch.filter with is an optimized version of what we did before. _get_available_versions is now roughly 5 times faster.
* FixelifixJohan Dahlin2003-01-011-3/+3
|
* Add default values.Johan Dahlin2003-01-011-0/+11
| | | | | | | | | | | | | | 2003-01-01 Johan Dahlin <jdahlin@async.com.br> * gtk/gtk.defs (GtkTreeView.scroll_to_cell): Add default values. * gtk/gtk.override (_wrap_gtk_tree_selection_get_selected): Check the mode before calling gtk_tree_selection_get_selected, this avoids an abort() in gtk+. * pygtk.py: Updated to fix #102180, so .require() can be called twice and won't do anything the second time (eg, not raise an error) based upon patch by warner-gnome.bugzilla@lothar.com