[virt-tools-list] [PATCH virt-viewer 25/25] Show status page by default if display not ready

Daniel P. Berrange berrange at redhat.com
Mon Jul 23 14:12:26 UTC 2012


On Tue, Jul 17, 2012 at 09:25:07PM +0200, Marc-André Lureau wrote:
> 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);

ACK


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