[virt-tools-list] [PATCH virt-viewer 25/25] Show status page by default if display not ready
Marc-André Lureau
marcandre.lureau at gmail.com
Tue Jul 17 19:25:07 UTC 2012
Switch back to status page if display is not ready.
---
src/virt-viewer-window.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
index 4bc427a..7c6e41f 100644
--- a/src/virt-viewer-window.c
+++ b/src/virt-viewer-window.c
@@ -1040,8 +1040,12 @@ virt_viewer_window_set_display(VirtViewerWindow *self, VirtViewerDisplay *displa
virt_viewer_display_set_zoom_level(VIRT_VIEWER_DISPLAY(priv->display), priv->zoomlevel);
virt_viewer_display_set_auto_resize(VIRT_VIEWER_DISPLAY(priv->display), priv->auto_resize);
- gtk_notebook_append_page(GTK_NOTEBOOK(priv->notebook), GTK_WIDGET(display), NULL);
gtk_widget_show_all(GTK_WIDGET(display));
+ gtk_notebook_append_page(GTK_NOTEBOOK(priv->notebook), GTK_WIDGET(display), NULL);
+ /* switch back to non-display if not ready */
+ if (!(virt_viewer_display_get_show_hint(display) &
+ VIRT_VIEWER_DISPLAY_SHOW_HINT_READY))
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(priv->notebook), 0);
virt_viewer_signal_connect_object(display, "display-pointer-grab",
G_CALLBACK(virt_viewer_window_pointer_grab), self, 0);
--
1.7.10.4
More information about the virt-tools-list
mailing list