[virt-tools-list] [virt-viewer 7/7] Create foreign menu from .vv file information
Christophe Fergeau
cfergeau at redhat.com
Wed Apr 16 16:59:54 UTC 2014
When the .vv file has an [ovirt] section, we should try to create a foreign
menu out of it. This will allow remote-viewer to offer a menu to change the
currenty inserted cdrom.
---
src/virt-viewer-file.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/virt-viewer-file.c b/src/virt-viewer-file.c
index 640b664..396df93 100644
--- a/src/virt-viewer-file.c
+++ b/src/virt-viewer-file.c
@@ -24,6 +24,10 @@
#include <glib/gi18n.h>
#include <glib/gstdio.h>
+#ifdef HAVE_OVIRT
+#include "ovirt-foreign-menu.h"
+#endif
+
#include "virt-viewer-util.h"
#include "virt-viewer-file.h"
@@ -749,6 +753,17 @@ virt_viewer_file_fill_app(VirtViewerFile* self, VirtViewerApp *app, GError **err
g_object_set(G_OBJECT(app), "fullscreen",
virt_viewer_file_get_fullscreen(self), NULL);
+#ifdef HAVE_OVIRT
+ {
+ OvirtForeignMenu *menu;
+
+ if (g_key_file_has_group(self->priv->keyfile, OVIRT_GROUP)) {
+ menu = ovirt_foreign_menu_new_from_file(self);
+ ovirt_foreign_menu_start(menu);
+ }
+ }
+#endif
+
return TRUE;
}
--
1.9.0
More information about the virt-tools-list
mailing list