[virt-tools-list] [PATCHv3 virt-viewer 07/12] kiosk: keep a reference on the toolbar
Marc-André Lureau
marcandre.lureau at gmail.com
Tue Aug 20 12:19:57 UTC 2013
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 247505a..26055e7 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
More information about the virt-tools-list
mailing list