[Spice-devel] [PATCH spice-gtk v2 1/2] usb-device-widget: Fix parent class type

Pavel Grunt pgrunt at redhat.com
Mon Jun 26 10:26:46 UTC 2017


On Mon, 2017-06-26 at 06:18 -0400, Frediano Ziglio wrote:
> > 
> > The widget is defined as GTK_TYPE_BOX, use GtkBox instead of
> > GtkVBox.
> 
> Shouldn't you set the orientation to vertical too? I think the
> default
> is horizontal.

the object is created with the vertical orientation, see the
definition of spice_usb_device_widget_new

> Not that I think something would change, there are no reference to
> GtkVBox,
> only GtkBox so this seems more of a fix to me.

to me as well, nothing should change.

Thanks,
Pavel

> 
> > ---
> >  src/usb-device-widget.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/src/usb-device-widget.c b/src/usb-device-widget.c
> > index b394499..747887c 100644
> > --- a/src/usb-device-widget.c
> > +++ b/src/usb-device-widget.c
> > @@ -40,14 +40,14 @@
> >  
> >  struct _SpiceUsbDeviceWidget
> >  {
> > -    GtkVBox parent;
> > +    GtkBox parent;
> >  
> >      SpiceUsbDeviceWidgetPrivate *priv;
> >  };
> >  
> >  struct _SpiceUsbDeviceWidgetClass
> >  {
> > -    GtkVBoxClass parent_class;
> > +    GtkBoxClass parent_class;
> >  
> >      /* signals */
> >      void (*connect_failed) (SpiceUsbDeviceWidget *widget,
> 
> Patch looks good to me, just not an expert of either this widget
> and Gtk.
> 
> Frediano


More information about the Spice-devel mailing list