1213 Commits

Author SHA1 Message Date
Fabiano Fidêncio
25a236473a spec: Update mingw in order to use gtk3 2014-12-23 00:55:58 +01:00
Fabiano Fidêncio
2cbfd08b09 nsis: use gtk-vnc conditionally
Only include gtk-vnc as dep when it's explicitly done in the configure.
2014-12-23 00:42:05 +01:00
Fabiano Fidêncio
c7cbf57efc nsis: use spice-gtk conditionally
Only include spice-gtk as dep when it's explicitly done in the configure.
2014-12-23 00:42:05 +01:00
Fabiano Fidêncio
979eab69f2 nsis: use libgovirt conditionally
Only include libgovirt as dep when it's explicitly done in the configure.
2014-12-23 00:42:02 +01:00
Fabiano Fidêncio
6baccb2b78 nsis: add missing file needed to use virsh.exe 2014-12-23 00:40:37 +01:00
Fabiano Fidêncio
5159956305 nsis: use libvirt conditionally
Only include libvirt as dep when it's explicitly done in the configure.
2014-12-23 00:40:05 +01:00
Fabiano Fidêncio
de700d09ef msi: use gtk-vnc conditionally
Only include gtk-vnc as dep when it's explicitly done in the configure.
2014-12-21 22:52:49 +01:00
Fabiano Fidêncio
57c4ebcaad msi: use spice-gtk conditionally
Only include spice-gtk as dep when it's explicitly done in the configure.
2014-12-21 22:50:06 +01:00
Fabiano Fidêncio
b8b64e67dc msi: use libgovirt conditionally
Only include libgovirt as dep when it's explicitly done in the configure.
2014-12-21 22:47:56 +01:00
Fabiano Fidêncio
befd4608e4 msi: use libvirt conditionally
Only include libvirt as dep when it's explicitly done in the configure.
2014-12-21 22:42:06 +01:00
Fabiano Fidêncio
dba01112e8 cosmetic: use $(VAR) instead of ${VAR} 2014-12-21 22:36:07 +01:00
Pavel Grunt
c3d24f8bb6 Set a transient parent for GtkDialogs
Silence the Gtk 3.14 message:
"GtkDialog mapped without a transient parent. This is discouraged."
2014-12-19 17:39:53 +01:00
Marc-André Lureau
7e4921f161 msi/nsis: fix keyboard-shortcuts icon location
The /usr/share/icons/gnome icon theme location has been replaced with
Adwaita in f21, fix the path.
2014-12-15 18:11:33 +01:00
Fabiano Fidêncio
c3179a4c69 msi: add gtk3 support
Add support to build the virt-viewer's msi using GTK3.
For the GTK3 build, in order to provide all used icons for Windows
systems we have to include manually all the icons we want to or add
adwaita-icon-theme as dependency. I've decided to go with the first
approach, what can be improved when we have "foreach" support in
msitools (https://bugzilla.gnome.org/show_bug.cgi?id=741296).
2014-12-15 17:36:10 +01:00
Fabiano Fidêncio
ee1ad5797d msi: add libgovirt as dependency
libgovirt is used to provide support to foreign menu using ovirt.
2014-12-15 17:36:10 +01:00
Fabiano Fidêncio
0fd0ccc129 nsis: add missing 24x24 icons 2014-12-15 17:36:10 +01:00
Fabiano Fidêncio
4db8e8f67f nsis: add gtk3 support
Add support to build the virt-viewer's nsis using GTK3.
2014-12-15 17:36:10 +01:00
Fabiano Fidêncio
59019cc4a3 nsis: remove $INSTDIR\etc 2014-12-15 17:36:10 +01:00
Fabiano Fidêncio
c46f42eafc nsis: remove $INSTDIR\etc\libvirt 2014-12-15 17:36:10 +01:00
Fabiano Fidêncio
6bd9b280b5 nsis: remove dup entries 2014-12-15 17:36:10 +01:00
Fabiano Fidêncio
80601c6131 nsis: add libgovirt (and its dependencies)
libgovirt is used to provide support to foreign menu using ovirt.
2014-12-15 17:36:10 +01:00
Fabiano Fidêncio
69aed2eb9f nsis: add libwinpthread-1.dll
libwinpthread-1.dll is a dependency of libvirt
2014-12-15 17:36:10 +01:00
Fabiano Fidêncio
0202f83c7a nsis: add libopus-0.dll
libopus-0.dll is a dependency of spice-glib
2014-12-15 17:36:10 +01:00
Fabiano Fidêncio
8dbefb1aca nsis: add libnettle-4-7.dll (and its dependencies)
libgcc_s_sjlj-1 is needed by libgmp (on x86)
libgcc_s_seh-1 is needed by libgmp (on x86_64s)
libgmp-10.dll is needed by libnettle
libhogweed-2-5.dll is provided by libnettle
libnettle-4-7.dll is needed by gnutls
gnutls is needed by gvnc and libvirt

An interesting point here that worth to mention is the usage of /nonfatal
when including libgcc_s_{sjlj,seh}-1.dll. As we only have the _seh in x64
the build breaks trying to add "not found" files. A check for arch was
one option to solve the problem, but _sjlj may exist in x64 as well, when
using an old gcc. An explicit check if the file exists (in compile time)
was another idea, but for some reason the "-" part of the filename was
interpreted as a math operand, breaking the build.
With all that in mind, adding /nonfatal was the most convenient solution.
2014-12-15 17:36:09 +01:00
Fabiano Fidêncio
a5b8266295 nsis: update libgnutls version
Use version -28 instead of -26, matching what currently is in f21.
2014-12-15 17:36:09 +01:00
Fabiano Fidêncio
cf6b2c5695 nsis: update libtasn1 version
Use version -6 instead of -3, matching what currently is in f21.
2014-12-15 17:36:09 +01:00
Fabiano Fidêncio
a58a1885c0 nsis: update libpng version
Use libpng15-15 instead of libpng16-16, matching what currently is in
f21.
2014-12-15 17:36:09 +01:00
Fabiano Fidêncio
df4450112a nsis: update libgcrypt version
Use version -20 instead of -11, matching what currently is in f21.
2014-12-15 17:36:09 +01:00
Pavel Grunt
68148e1bd1 display-vnc: fix zoom-level set by command line
Setting the zoom-level using the command line option '--zoom' is not
working for vnc guests. This problem can be solved by emitting
the "display-desktop-resize" signal when vnc is initialized.

https://bugzilla.redhat.com/show_bug.cgi?id=1170071
2014-12-10 14:11:57 +01:00
Marc-André Lureau
824c4b9c0d Do not show twice error dialog when no VM are found
When running virt-viewer without argument, and no VM are found, you get
two error dialogs. Only one is enough.
2014-12-01 11:09:14 +01:00
Marc-André Lureau
c0774f725a spice: calling VirtViewerSession:close() can destroy self
SpiceSession in spice-gtk v0.27 will remove channels from session during
disconnect (and not when they are actually disposed). When no channels
are left, session-disconnected is emitted, and the VirtViewerSession
will be unref from the application. Use a weak reference to self to
avoid crashing after calling spice_session_disconnect()

As a workaround for existing clients, spice-gtk v0.27 will defer the
disconnection to idle time.  But the fix still makes sense and would
prevent potentially future issues if spice-gtk changes back to sync
disconnection.

(the alternative of calling ref/unref would needlessly recreate a
SpiceSession with a call to create_spice_session(), which is something
we can avoid when leaving the application)
2014-12-01 11:07:57 +01:00
Marc-André Lureau
3d5627d79a virt-viewer: allow connection to unix socket only server
Even when the server doesn't provide a display connection address,
virt-viewer is able to connect to guest with libvirt attach.
2014-11-25 15:07:32 +01:00
Marc-André Lureau
8addab251e Report error on attach-only display
Provide error details if the display can only be access through libvirt
--attach method.
2014-11-25 13:00:50 +01:00
Marc-André Lureau
1eaaf8c3ab Report error in dialog
Use a UI dialog to inform of connection error.
2014-11-25 13:00:50 +01:00
Marc-André Lureau
6100d08dd3 Simplify virt_viewer_initial_connect()
- do not overwrite err if ->initial_connect() sets it
- remove need for waitvm if the display server isn't yet started (note:
  this function might be untested, I am not sure relying on libvirt events
  is enough)
2014-11-25 13:00:50 +01:00
Marc-André Lureau
9e2f9ea064 Simplify virt_viewer_initial_connect()
- remove need for waitvm if the display server isn't yet started (note:
  this function might be untested, I am not sure relying on libvirt events
  is enough)
2014-11-25 13:00:50 +01:00
Marc-André Lureau
7931161d59 Simplify virt_viewer_initial_connect()
Some refactoring to make the code easier to read, mostly code
movement/reindenting and introduction of a "wait" label which has the
same purpose as "done".
This also adds a "goto wait" within an if block, but this does not
change the initial code flow, just makes it more explicit.
2014-11-25 13:00:50 +01:00
Marc-André Lureau
15c7d17b96 Remove VIRT_VIEWER_VM_CHOOSE_DIALOG_CANCELLED
This error type isn't really an error, it is used to skip error report
code. The functions can simply return FALSE on failure, without GError
set, to indicate that program should quit normally.
2014-11-25 13:00:49 +01:00
Marc-André Lureau
71f156caf5 Limit HAVE_SOCKETPAIR to directly concerned code 2014-11-25 13:00:49 +01:00
Marc-André Lureau
5a444f106d Move libvirt reconnect polling to VirtViewer
This is libvirt specific, no need to share it in the VirtViewerApp base
class.
2014-11-25 13:00:49 +01:00
Marc-André Lureau
dbbd72676a spice: use virt_viewer_signal_connect_object
This isn't required, but makes it easier to track reference issues, as
you have guarantee that callbacks won't be executed if the objects are
disposed.
2014-11-25 12:56:51 +01:00
Fabiano Fidêncio
2e7e6f6748 Add virt-viewer-usb.png
Windows XP (at least) doesn't recognize .svg files
2014-11-24 14:14:14 +01:00
Fabiano Fidêncio
a7e95e8f3c Replace priv->withEvents usage for priv->domain_event
Once we have priv->domain_event, we don't need priv->withEvents anymore
2014-11-20 11:15:05 +01:00
Fabiano Fidêncio
fe95067c85 Prefer to use virConnectDomainEventRegisterAny()
The usage of virConnectDomainEventRegister() is no longer recommended
according to the libvirt's documentation.
2014-11-20 11:15:05 +01:00
Fabiano Fidêncio
333ba4fe51 Set freed priv->dom to NULL in _dispose()
Avoid a possible use/free after the object has been freed.
2014-11-20 11:15:05 +01:00
Fabiano Fidêncio
de8b381fa4 Make sure conn exists before use it
Although all the used functions have a explicit check for a valid
virConnPtr, let's be safe and only use priv->conn when its value is
non-NULL.
2014-11-20 11:15:05 +01:00
Christophe Fergeau
1c69f3cf40 VirtViewerApp: Never remove main window
It's currently possible to destroy any virt-viewer window, including the
main window. However, some part of the code expects that the main window
is always present, for example to present status messages.

In particular, stopping the guest (or running virsh destroy) will close
all windows: virt_viewer_session_clear_displays will get called, which
will call into virt_viewer_app_remove_display_removed, and finally into
virt_viewer_app_remove_nth_window, which will destroy the window being
removed if it holds the last reference to it.

So going through virt_viewer_session_clear_displays, all
VirtViewerWindow instances and their corresponding GtkWindow have been
destroyed. This is already an issue as VirtViewerApp::main_window will
be pointing to freed memory.

When using virt-viewer --reconnect, this will cause a crash when
restarting the guest in virt_viewer_app_create_session as it tries to
get a valid GtkWindow through:
GtkWindow *window = virt_viewer_window_get_window(priv->main_window);

This commit avoids this issue by special casing the main window in
virt_viewer_app_remove_nth_window to ensure it never gets removed.
This is similar to what is done in virt_viewer_app_hide_all_windows.
2014-11-18 14:30:01 +01:00
Christophe Fergeau
1c341e8cb3 Fix check of virt_viewer_app_initial_connect return value
Commit 13f493200 changed virt_viewer_app_initial_connect to return a
gboolean rather than an int, but one call site was not updated to the
new convention, and was still checking for a negative value rather than
for FALSE in order to detect failures.
2014-11-14 10:32:31 +01:00
Daniel P. Berrange
b94859e30d Check for spice-gtk 0.26 instead of a git snapshot of 0.25
As spice-gtk macro for checking the version numbers was broken, let's
check for 0.26 and avoid to have virt-viewer broken on a few distros
for a good long time.
2014-11-04 00:06:08 +01:00
Christophe Fergeau
161de0fd32 Don't use virGetLastErrorMessage()
This was introduced in libvirt 1.0.6 but we only require libvirt 0.10.0
2014-10-31 13:46:43 +01:00