diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2011-07-17 19:39:27 +0200 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2011-07-26 12:00:29 +0100 |
commit | 8d0f1d42351363f59b3d176cb8a8371a9b42ae96 (patch) | |
tree | 3efc88c43e5122d771a706526d0f60d48802f74e /src/virt-viewer-notebook.c | |
parent | 0584170300d9a90383de40f06b913ca3e71e36d9 (diff) | |
download | virt-viewer-8d0f1d42351363f59b3d176cb8a8371a9b42ae96.tar.gz virt-viewer-8d0f1d42351363f59b3d176cb8a8371a9b42ae96.tar.xz virt-viewer-8d0f1d42351363f59b3d176cb8a8371a9b42ae96.zip |
Show status on all open windows
The split virt_viewer_notebook_show_status() to
virt_viewer_notebook_show_status_va() is unnecessary
in the end, but it's more future-proof.
Diffstat (limited to 'src/virt-viewer-notebook.c')
-rw-r--r-- | src/virt-viewer-notebook.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/virt-viewer-notebook.c b/src/virt-viewer-notebook.c index 0e4ecb2..1b9383f 100644 --- a/src/virt-viewer-notebook.c +++ b/src/virt-viewer-notebook.c @@ -91,19 +91,15 @@ virt_viewer_notebook_init (VirtViewerNotebook *self) } void -virt_viewer_notebook_show_status(VirtViewerNotebook *self, const gchar *fmt, ...) +virt_viewer_notebook_show_status_va(VirtViewerNotebook *self, const gchar *fmt, va_list args) { VirtViewerNotebookPrivate *priv; gchar *text; - va_list args; DEBUG_LOG("notebook show status %p", self); g_return_if_fail(VIRT_VIEWER_IS_NOTEBOOK(self)); - va_start(args, fmt); text = g_strdup_vprintf(fmt, args); - va_end(args); - priv = self->priv; gtk_label_set_text(GTK_LABEL(priv->status), text); gtk_notebook_set_current_page(GTK_NOTEBOOK(self), 0); @@ -112,6 +108,18 @@ virt_viewer_notebook_show_status(VirtViewerNotebook *self, const gchar *fmt, ... } void +virt_viewer_notebook_show_status(VirtViewerNotebook *self, const gchar *fmt, ...) +{ + va_list args; + + g_return_if_fail(VIRT_VIEWER_IS_NOTEBOOK(self)); + + va_start(args, fmt); + virt_viewer_notebook_show_status_va(self, fmt, args); + va_end(args); +} + +void virt_viewer_notebook_show_display(VirtViewerNotebook *self) { GtkWidget *display; |