mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2025-12-27 14:54:14 +00:00
Make status widget visible immediately
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."
This commit is contained in:
parent
527a7182d6
commit
98ac529c0a
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user