[virt-tools-list] [PATCH virt-viewer 24/25] Make status widget visible immediately

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


On Tue, Jul 17, 2012 at 09:25:06PM +0200, Marc-André Lureau wrote:
> GtkNotebook will use the currently visible widget as default page.
> If we don't show status widget before we append the display, the
> current page will be on display. Quoting Gtk+ documentation:
> 
> "Note that due to historical reasons, GtkNotebook refuses to switch to
> a page unless the child widget is visible. Therefore, it is
> recommended to show child widgets before adding them to a notebook."
> ---
>  src/virt-viewer-notebook.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/virt-viewer-notebook.c b/src/virt-viewer-notebook.c
> index 09e8ec4..cc7136b 100644
> --- a/src/virt-viewer-notebook.c
> +++ b/src/virt-viewer-notebook.c
> @@ -86,6 +86,7 @@ virt_viewer_notebook_init (VirtViewerNotebook *self)
>      priv->status = gtk_label_new("");
>      gtk_notebook_set_show_tabs(GTK_NOTEBOOK(self), FALSE);
>      gtk_notebook_set_show_border(GTK_NOTEBOOK(self), FALSE);
> +    gtk_widget_show_all(priv->status);
>      gtk_notebook_append_page(GTK_NOTEBOOK(self), priv->status, NULL);
>      gdk_color_parse("white", &color);
>      gtk_widget_modify_fg(priv->status, GTK_STATE_NORMAL, &color);

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