[Spice-devel] [PATCH spice-gtk] usb-widget: fix gtk2 Python bindings

Marc-André Lureau marcandre.lureau at gmail.com
Tue Aug 6 03:13:54 PDT 2013


The Python bindings generator failed to bind the USB widget, because of
the object/class declaration. The declaration was circumventing the
deprecated errors when compiling with GTK_DISABLE_DEPRECATED. We used
to need that because of broken gtk+ headers, but it is no longer
necessary since 15bd7ceba1434b5d710bfd16078044f30693467b.
---
 gtk/usb-device-widget.h | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/gtk/usb-device-widget.h b/gtk/usb-device-widget.h
index 3920990..b68cc6b 100644
--- a/gtk/usb-device-widget.h
+++ b/gtk/usb-device-widget.h
@@ -37,14 +37,6 @@ typedef struct _SpiceUsbDeviceWidget SpiceUsbDeviceWidget;
 typedef struct _SpiceUsbDeviceWidgetClass SpiceUsbDeviceWidgetClass;
 typedef struct _SpiceUsbDeviceWidgetPrivate SpiceUsbDeviceWidgetPrivate;
 
-#if GTK_CHECK_VERSION(3,0,0)
-typedef struct _GtkBox _SpiceGtkBox;
-typedef struct _GtkBoxClass _SpiceGtkBoxClass;
-#else
-typedef struct _GtkVBox _SpiceGtkBox;
-typedef struct _GtkVBoxClass _SpiceGtkBoxClass;
-#endif
-
 /**
  * SpiceUsbDeviceWidget:
  *
@@ -52,7 +44,7 @@ typedef struct _GtkVBoxClass _SpiceGtkBoxClass;
  */
 struct _SpiceUsbDeviceWidget
 {
-    _SpiceGtkBox parent;
+    GtkVBox parent;
 
     /*< private >*/
     SpiceUsbDeviceWidgetPrivate *priv;
@@ -67,7 +59,7 @@ struct _SpiceUsbDeviceWidget
  */
 struct _SpiceUsbDeviceWidgetClass
 {
-    _SpiceGtkBoxClass parent_class;
+    GtkVBoxClass parent_class;
 
     /* signals */
     void (*connect_failed) (SpiceUsbDeviceWidget *widget,
-- 
1.8.3.rc1.49.g8d97506



More information about the Spice-devel mailing list