[virt-tools-list] [virt-viewer v1 1/2] Fix build when building without oVirt

Victor Toso victortoso at redhat.com
Fri Mar 3 14:37:01 UTC 2017


From: Victor Toso <me at victortoso.com>

As remote_viewer_iso_list_dialog_new() is defined on
remote-viewer-iso-list-dialog.h which is only build with oVirt
integration.

 > undefined reference to `remote_viewer_iso_list_dialog_new'

Note that the callback virt_viewer_window_menu_change_cd_activate() is
only visible if oVirt is built in.

Signed-off-by: Victor Toso <victortoso at redhat.com>
---
 src/virt-viewer-window.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
index 8eda12e..9a0932a 100644
--- a/src/virt-viewer-window.c
+++ b/src/virt-viewer-window.c
@@ -1074,6 +1074,7 @@ void
 virt_viewer_window_menu_change_cd_activate(GtkWidget *menu G_GNUC_UNUSED,
                                            VirtViewerWindow *self)
 {
+#if HAVE_OVIRT
     VirtViewerWindowPrivate *priv = self->priv;
     GtkWidget *dialog;
     GObject *foreign_menu;
@@ -1092,6 +1093,7 @@ virt_viewer_window_menu_change_cd_activate(GtkWidget *menu G_GNUC_UNUSED,
     g_signal_connect(dialog, "response", G_CALLBACK(iso_dialog_response), NULL);
     gtk_widget_show_all(dialog);
     gtk_dialog_run(GTK_DIALOG(dialog));
+#endif
 }
 
 static void
-- 
2.9.3




More information about the virt-tools-list mailing list