[virt-tools-list] [PATCHv2 virt-viewer 05/10] kiosk: keep a reference on the toolbar
Christophe Fergeau
cfergeau at redhat.com
Mon Aug 19 18:31:59 UTC 2013
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 at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20130819/821e338b/attachment.sig>
More information about the virt-tools-list
mailing list