[virt-tools-list] [PATCH virt-viewer 06/12] kiosk: ref_sink the toolbar

Daniel P. Berrange berrange at redhat.com
Thu Aug 15 14:40:41 UTC 2013


On Mon, Jul 15, 2013 at 09:36:13PM +0200, Marc-André Lureau wrote:
> Removes a warning when adding/removing the gtk widget dynamically.

Can you explain why we need this ? What gtk rule were we violating
by not having it ?

> ---
>  src/virt-viewer-window.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
> index d0e6357..69e50b8 100644
> --- a/src/virt-viewer-window.c
> +++ b/src/virt-viewer-window.c
> @@ -928,7 +928,7 @@ virt_viewer_window_toolbar_setup(VirtViewerWindow *self)
>      GtkWidget *button;
>      VirtViewerWindowPrivate *priv = self->priv;
>  
> -    priv->toolbar = gtk_toolbar_new();
> +    priv->toolbar = g_object_ref_sink (gtk_toolbar_new());
>      gtk_toolbar_set_show_arrow(GTK_TOOLBAR(priv->toolbar), FALSE);
>      gtk_widget_set_no_show_all(priv->toolbar, TRUE);
>      gtk_toolbar_set_style(GTK_TOOLBAR(priv->toolbar), GTK_TOOLBAR_BOTH_HORIZ);


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the virt-tools-list mailing list