[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] [PATCHv2 virt-viewer 05/10] kiosk: keep a reference on the toolbar



ACK

On Fri, Aug 16, 2013 at 09:47:41PM +0200, Marc-André Lureau wrote:
> We are going to change the container content dynamically, so we need a
> strong reference.
> ---
>  src/virt-viewer-window.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
> index f0fb9c2..74c020a 100644
> --- a/src/virt-viewer-window.c
> +++ b/src/virt-viewer-window.c
> @@ -192,6 +192,7 @@ virt_viewer_window_dispose (GObject *object)
>      priv->subtitle = NULL;
>  
>      g_value_unset(&priv->accel_setting);
> +    g_clear_object(&priv->toolbar);
>  }
>  
>  static void
> @@ -1031,7 +1032,7 @@ virt_viewer_window_toolbar_setup(VirtViewerWindow *self)
>      GtkWidget *button;
>      VirtViewerWindowPrivate *priv = self->priv;
>  
> -    priv->toolbar = gtk_toolbar_new();
> +    priv->toolbar = g_object_ref(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);
> -- 
> 1.8.3.rc1.49.g8d97506
> 
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list redhat com
> https://www.redhat.com/mailman/listinfo/virt-tools-list

Attachment: pgpPWAeV9r1Mp.pgp
Description: PGP signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]