summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2004-03-27 21:54:36 +0000
committerJohan Dahlin <zilch@src.gnome.org>2004-03-27 21:54:36 +0000
commit216ec32db135475c87c139e10be5d4ae26c8e365 (patch)
tree9f14192f47e6bb702685f1eff35898ff5b3d2c00
parent59ebacbe8eba4d29fa963128a045625e15e84b3a (diff)
downloadpygobject-pygtk-2-2.tar.gz
Merge in changes from HEAD:pygtk-2-2
2004-03-27 Johan Dahlin <johan@gnome.org> * 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 * setup.py: Removed installation of libglade and libxml2 DLLs on win32 (these are now part of the dropline installer). patch by Cedric Gustin, fixed bug 136731 * gtk/gtk.override (_wrap_gtk_main_quit): Override, this does two things differently from the old (auto generated) version, first it checks if gtk_main_level() is non zero and raises a RuntimeError if it's not. It also allows arguments and completely ignores them, this is closer to the old 0.6.x behavior and suitable for usage like this: obj.connect(signal, gtk.main_quit), fixes bug 136705 * gtk/gtkmodule.c (python_do_pending_calls): Check gtk_main_level before calling gtk_main_quit, since it might be called outside of a mainloop (eg, gtk.main_iteration). Avoids warnings on the console as found in example in bug 138163 2004-03-25 Johan Dahlin <johan@gnome.org> * examples/glade/autoconnect.py: New small example 2004-03-22 Xavier Ordoquy <xordoquy@wanadoo.fr> * gtk/gtk.defs: Removed the _gtk_* functions as the are private and not exported in the module. 2004-03-22 Xavier Ordoquy <xordoquy@wanadoo.fr> * codegen/h2def.py: Added the interface detection (interface -*Iface- inheriting from GTypeInterface) 2004-03-18 Xavier Ordoquy <xordoquy@wanadoo.fr> * codegen/h2def.py: Added the interface detection (class inheriting from GTypeInterface) 2004-03-18 Xavier Ordoquy <xordoquy@wanadoo.fr> * gtk/gtk.defs: Cosmetic changes to match h2def output exactly in order to ease further merges. 2004-03-12 Johan Dahlin <johan@gnome.org> * gtk/gtk.override (_wrap_gtk_accel_group_connect_group): 2004-03-12 Xavier Ordoquy <xordoquy@wanadoo.fr> Fixes #136811 (h2def ignores some functions) * codegen/h2def.py: skips the extern "C"
-rw-r--r--gobject/gobjectmodule.c3
-rw-r--r--gobject/pygobject-private.h13
-rw-r--r--gobject/pygobject.h12
3 files changed, 18 insertions, 10 deletions
diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c
index d780923d..068e823f 100644
--- a/gobject/gobjectmodule.c
+++ b/gobject/gobjectmodule.c
@@ -1941,6 +1941,9 @@ struct _PyGObject_Functions pygobject_api_functions = {
pyg_set_thread_block_funcs,
(PyGThreadBlockFunc)0, /* block_threads */
(PyGThreadBlockFunc)0, /* unblock_threads */
+
+ &PyGParamSpec_Type,
+ pyg_param_spec_new,
};
DL_EXPORT(void)
diff --git a/gobject/pygobject-private.h b/gobject/pygobject-private.h
index 130305aa..42509e10 100644
--- a/gobject/pygobject-private.h
+++ b/gobject/pygobject-private.h
@@ -26,16 +26,6 @@ void pyg_destroy_notify (gpointer user_data);
typedef struct {
PyObject_HEAD
- GParamSpec *pspec;
-} PyGParamSpec;
-extern PyTypeObject PyGParamSpec_Type;
-PyObject *pyg_param_spec_new(GParamSpec *pspec);
-
-#define PyGParamSpec_Check(v) (PyObject_TypeCheck(v, &PyGParamSpec_Type))
-#define PyGParamSpec_Get(v) (((PyGParamSpec *)v)->pspec)
-
-typedef struct {
- PyObject_HEAD
GMainLoop *loop;
} PyGMainLoop;
extern PyTypeObject PyGMainLoop_Type;
@@ -106,4 +96,7 @@ void pyg_register_pointer (PyObject *dict, const gchar *class_name,
GType pointer_type, PyTypeObject *type);
PyObject * pyg_pointer_new (GType pointer_type, gpointer pointer);
+extern PyTypeObject PyGParamSpec_Type;
+PyObject *pyg_param_spec_new (GParamSpec *pspec);
+
#endif
diff --git a/gobject/pygobject.h b/gobject/pygobject.h
index 62c4cd2f..d6c681c8 100644
--- a/gobject/pygobject.h
+++ b/gobject/pygobject.h
@@ -40,6 +40,14 @@ typedef struct {
typedef void (*PyGFatalExceptionFunc) (void);
typedef void (*PyGThreadBlockFunc) (void);
+typedef struct {
+ PyObject_HEAD
+ GParamSpec *pspec;
+} PyGParamSpec;
+
+#define PyGParamSpec_Get(v) (((PyGParamSpec *)v)->pspec)
+#define PyGParamSpec_Check(v) (PyObject_TypeCheck(v, &PyGParamSpec_Type))
+
struct _PyGObject_Functions {
void (* register_class)(PyObject *dict, const gchar *class_name,
GType gtype, PyTypeObject *type, PyObject *bases);
@@ -95,6 +103,8 @@ struct _PyGObject_Functions {
PyGThreadBlockFunc unblock_threads_func);
PyGThreadBlockFunc block_threads;
PyGThreadBlockFunc unblock_threads;
+ PyTypeObject *paramspec_type;
+ PyObject *(* paramspec_new)(GParamSpec *spec);
};
#ifndef _INSIDE_PYGOBJECT_
@@ -132,6 +142,8 @@ struct _PyGObject_Functions *_PyGObject_API;
#define pyg_constant_strip_prefix (_PyGObject_API->constant_strip_prefix)
#define pyg_error_check (_PyGObject_API->error_check)
#define pyg_set_thread_block_funcs (_PyGObject_API->set_thread_block_funcs)
+#define PyGParamSpec_Type (*_PyGObject_API->paramspec_type)
+#define pyg_param_spec_new (_PyGObject_API->paramspec_new)
#define pyg_block_threads() G_STMT_START { \
if (_PyGObject_API->block_threads != NULL) \