summaryrefslogtreecommitdiff
path: root/recipes/python/python-pygtk
diff options
context:
space:
mode:
authorDenis 'Gnutoo' Carikli <GNUtoo@no-log.org>2010-01-22 22:36:19 +0100
committerDenis 'Gnutoo' Carikli <GNUtoo@no-log.org>2010-01-23 19:43:22 +0100
commit226acbc4e96be3543596d4a712d2acfb3148b8f5 (patch)
tree77cb99f6cf918459ecb8eebd236d84656736052d /recipes/python/python-pygtk
parentd65d911625b8e6f430406a29663c857df690545f (diff)
pygtk 2.10.4 : fix bug #44974 (gnome bugzilla)
See https://bugzilla.gnome.org/show_bug.cgi?id=444974 for more details I encountred this bug when trying to run an application, that made use of the 2 screens of the bug device(see bug.conf in machines dir) The patch is already in the trunk of pygtk,and so is already upstream
Diffstat (limited to 'recipes/python/python-pygtk')
-rw-r--r--recipes/python/python-pygtk/gdk_display.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/recipes/python/python-pygtk/gdk_display.patch b/recipes/python/python-pygtk/gdk_display.patch
new file mode 100644
index 0000000000..f0ddb8e556
--- /dev/null
+++ b/recipes/python/python-pygtk/gdk_display.patch
@@ -0,0 +1,46 @@
+Index: gtk/gdk.override
+===================================================================
+--- gtk/gdk.override (revision 2816)
++++ gtk/gdk.override (working copy)
+@@ -922,6 +922,23 @@ _wrap_gdk_display_manager_list_displays(
+ return py_list;
+ }
+ %%
++override gdk_screen_new noargs
++static int
++_wrap_gdk_screen_new (PyGObject *self)
++{
++ self->obj = (GObject *)gdk_screen_get_default();
++ if (!self->obj) {
++ PyErr_SetString(PyExc_RuntimeError,
++ "could not get default display");
++ return -1;
++ }
++
++ g_object_ref(self->obj);
++
++ pygobject_register_wrapper((PyObject *)self);
++ return 0;
++}
++%%
+ override gdk_screen_list_visuals noargs
+ static PyObject *
+ _wrap_gdk_screen_list_visuals(PyGObject *self)
+Index: gtk/gdk-base.defs
+===================================================================
+--- gtk/gdk-base.defs (revision 2816)
++++ gtk/gdk-base.defs (working copy)
+@@ -3866,6 +3866,13 @@
+ (return-type "GdkScreen*")
+ )
+
++;; dummy, overridden to return gdk_screen_get_default()
++(define-function gdk_screen_new
++ (c-name "gdk_screen_new")
++ (return-type "GdkScreen*")
++ (is-constructor-of "GdkScreen")
++)
++
+ (define-method get_setting
+ (of-object "GdkScreen")
+ (c-name "gdk_screen_get_setting")