484 Commits

Author SHA1 Message Date
Marc-Andre Lureau
c4bfc57e72 Do not try to unref NULL menu 2012-03-22 00:24:47 +01:00
Marc-Andre Lureau
591cb0a97e Don't leak foreign menu
The RemoveViewer object will have its own ref.
2012-03-22 00:24:46 +01:00
Marc-André Lureau
9d22757722 spice: handle switch-host event
Do not disconnect session when switching host (non-seamless migration
method).

Also, handle a bit better main channel events and do not disconnect on
unknown events, however raise unhandled event message to warning
level.
2012-03-21 16:21:32 +01:00
Marc-André Lureau
6cfb7116b9 spice: remove usage of deprecated audio api 2012-03-21 16:21:32 +01:00
Marc-André Lureau
7ffd3d4f7e Display correct key bindings to release cursor
If the accels are enabled (with Spice controller custom bindings),
show the configured keybinding in the title bar.
2012-03-21 16:21:32 +01:00
Marc-André Lureau
cf8e5b029c spice: implement --fullscreen=auto-conf
- auto-conf is an optionnal argument to --fullscreen:
it will set the guest display configuration to match the client
display configuration, by sending the client monitors size and
position to capable guests.
2012-03-21 16:20:37 +01:00
Marc-André Lureau
395a44bd47 Fix indentation 2012-03-18 15:19:04 +01:00
Marc-André Lureau
e06c822023 Do not crash so easily when given invalid uri
'remote-viewer foobar' shouldn't crash
2012-03-16 17:16:57 +01:00
Daniel P. Berrange
cf5082577a Updated translations 2012-03-13 09:20:45 +00:00
Marc-André Lureau
b6a7a921a3 Make sure we call g_thread_init()
GThread is needed by spice-gtk
2012-03-09 19:01:35 +01:00
Marc-André Lureau
7f72c2515e Notify of focus state when a client connects
The current code notifies the controller when the remote-viewer
application starts, but not when the client is connected. We should do
the later instead
2012-03-09 19:01:35 +01:00
Daniel P. Berrange
2017b3e0ae Update NEWS for 0.5.2 release v0.5.2 2012-03-09 13:41:35 +00:00
Daniel P. Berrange
88ff553603 Import newer translations from transifex 2012-03-09 13:38:51 +00:00
Daniel P. Berrange
df404090ff Fix libvirt/SPICE min versions
We require libvirt >= 0.9.7 to get virDomainOpenGraphics

We require spice-gtk >= 0.11 to get the fix for dealing with
authentication over an SSH tunnel

We requires spice-protocol >= 0.10.1 to get a constant
required by USB redirection
2012-03-09 13:36:22 +00:00
Marc-André Lureau
4f142b1f16 Add a send-key menu in fullscreen 2012-03-08 14:19:46 +01:00
Marc-André Lureau
810d18c956 build: fix autogen message
When running ./autogen.sh on a pristine git checkout, I got:

libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
You should add the contents of '/usr/share/aclocal/intltool.m4' to 'aclocal.m4'.
2012-03-07 20:42:43 +01:00
Hans de Goede
3123a1107c virt-viewer-window: Don't try to resize non visible windows
Trying to resize not visible windows leads to the following being printed
to the console:
Gdk-CRITICAL **: IA__gdk_window_get_origin: assertion `GDK_IS_WINDOW (window)'

This gets triggered by the gdk_screen_get_monitor_geometry() call in
virt_viewer_window_resize()

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-03-07 20:33:12 +01:00
Hans de Goede
5b7985b927 virt-viewer-window: Add show / hide utility functions
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-03-07 20:33:12 +01:00
Hans de Goede
81cdc24470 virt-viewer-window: Move checks before resize to virt_viewer_window_resize
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-03-07 20:33:12 +01:00
Hans de Goede
1b48cd0c0e virt-viewer-window: Remove useless tests for priv->window != NULL
priv->window gets set on init and never unset, so there is no need to check
for it.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-03-07 20:33:12 +01:00
Daniel P. Berrange
e2b892b417 Update AUTHORS file 2012-03-07 10:38:02 +00:00
Daniel P. Berrange
f6e603e139 Refresh translations 2012-03-07 10:20:59 +00:00
Hans de Goede
50dd8c29ee virt-viewer-window: Add a USB device selection to the fullscreen menu (v2)
Note this button only gets shown on USB redir capable virtual machines.

Changes in v2:
-Use gtk_widget_set_visible for simpler code

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-03-06 12:55:30 +01:00
Hans de Goede
ec5eaecb42 window: Call virt_viewer_app_quit instead of gtk_main_quit
When quiting from the fullscreen menu call virt_viewer_app_quit instead of
gtk_main_quit so that the session gets properly disconnected before quiting.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-03-06 12:55:30 +01:00
Hans de Goede
8ec03e5097 virt_viewer_app_quit: Cleanly close the connection before quiting
Even though the previous patches in this series ensure that the session
gets properly finalized, we still need to wait for the disconnect signal,
as spice-glib uses co-routines which need some time to cleanly close the
connection / session.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-03-06 12:55:30 +01:00
Hans de Goede
93eae5c49d session-spice: Delay the disconnected signal till all channels are closed
Before this patch session-spice would emit the disconnected signal as soon
as the main channel is closed, but other channels may still be open at
that time and raising the disconnected signal usally leads to the app class
calling gtk_main_quit, at which point the other channels never get properly
finalized (as there co-routines still hold a reference to them).

This is esp. bad for usbredir channels as these re-attach the kernel driver
for redirected devices when finalized. So exiting without properly finalizing
them leads to the formerly redirected devices not being usuable until the
driver is manually reloaded or the device is unplugged and re-plugged
(the kernel does not automatically re-bind kernel drivers when userspace
 closes a usbfs node).

This patch fixes this by delaying the emitting of the disconnect signal
until the last channel has been destroyed.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-03-06 12:55:30 +01:00
Hans de Goede
7c1414b318 virt-viewer-app: unref the session on dispose
With this patch combined with the previous patches in this series, the
VirtViewerSession (finally) gets properly finalized on exit.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-03-06 12:55:30 +01:00
Hans de Goede
0fa14f928e virt-viewer-display: Use a borrowed reference to session
Before this patch there was a cyclic reference between VirtViewerSesion and
VirtViewerDisplay, since all VirtViewerDisplays are created / destroyed by
VirtViewerSession it is safe to assume that lifetime of VirtViewerSession >=
VirtViewerDisplay, so VirtViewerDisplay can take a borrowed reference
breaking the circle, and allowing proper cleanup on exit.

Note that there is no g_object_unref removed from virt-viewer-display, this
because there is no finalize / dispose and before this patch
VirtViewerDisplay never unref-ed the reference it hold to the session.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-03-06 12:55:30 +01:00
Hans de Goede
963c7ebd65 virt-viewer-window: Use a borrowed reference to app
Before this patch there was a cyclic reference between VirtViewerApp and
VirtViewerWindow, since all VirtViewerWindows are created / destroyed by
VirtViewerApp it is safe to assume that lifetime of VirtViewerApp >=
VirtViewerWindow, so VirtViewerWindow can take a borrowed reference
breaking the circle, and allowing proper cleanup on exit.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-03-06 12:55:30 +01:00
Hans de Goede
01e553d21b virt-viewer-app: main_window is part of our windows hashtable
This means that:
1) There is no need to explictly set its title separately
2) It is unref-ed when we do g_hash_table_unref(priv->windows), so it
   should not be unref-ed separately otherwise it is unref-ed twice!

Notice that 2 was never a problem because of circular references
between VirtViewerApp and VirtViewerWindow, but once the follow
up patch to this one breaks the circle 2 becomes an issue.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-03-06 12:55:30 +01:00
Hans de Goede
e7a9f9ccdb session-spice: dispose should chain up to dispose not finalize!!
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-03-06 12:55:30 +01:00
Hans de Goede
54a3e7d600 usbredir: Gnome HIG-ify USB device selection dialog
These changes match the changes already made to the spice-gtk
usb device selection widget to match the spacing advised by the Gnome HIG.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-03-06 12:55:30 +01:00
Hans de Goede
c8f3a9e843 usbredir: Shrink the usb device selection dialog when devices are unplugged
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-03-06 12:55:30 +01:00
Christophe Fergeau
f3ba403680 Don't attempt to translate ""
The empty string has a magic meaning for gettext, it's used to
store a translation header with all kind of information about the
po file. This is not something we want to use as a window title, so
change to _("") to "" when we want an empty string.
2012-03-05 20:03:41 +01:00
Christophe Fergeau
1d782164a4 Fix path to spice-controller.h 2012-03-05 20:03:41 +01:00
Daniel P. Berrange
3066ed3458 Remove trailing blank line 2012-03-01 16:49:03 +00:00
Marc-André Lureau
64e1616f75 fix make distcheck 2012-03-01 16:42:09 +01:00
Marc-André Lureau
1a82b225b6 Prepare for release 0.5.2 2012-03-01 16:37:23 +01:00
Marc-André Lureau
6a475e374b update .mailmap 2012-03-01 16:20:25 +01:00
Marc-Andre Lureau
2c9cdb6fb9 remote-viewer: support spice foreign menu 2012-03-01 15:17:25 +01:00
Marc-André Lureau
2e8b6650cf Add property app:has-focus 2012-03-01 15:15:58 +01:00
Marc-André Lureau
50b0c72392 Fix compilation with gtk 2.18 2012-03-01 15:15:51 +01:00
Marc-André Lureau
9a322010a3 spice: fix connecting via ssh to a password-protected server
spice_session_connect() will attempt to connect directly to the
server, we need to continue calling spice_session_open_fd() for ssh
tunnel to work.
2012-03-01 15:15:02 +01:00
Marc-André Lureau
9d7c9000c3 spice: fix double unref of main channel
When doing unref() on a channel, channel-destroy signal may be emitted
during object dispose time, and it will attempt to unref() the channel
again likely leading to a crash.

It may be that spice-gtk should have a different/simpler object
life-cycle model, but it's also a good assumption to not take strong
references on the channels, but just keep a weak reference as the
session is really the channel life-cycle manager.

https://bugzilla.redhat.com/show_bug.cgi?id=797082
2012-03-01 15:06:43 +01:00
Daniel P. Berrange
bfc7e605e5 Import translations 2012-02-27 08:17:58 +00:00
Marc-André Lureau
49df4ab19a nsis: set HKCU "Software\spice-space.org\spicex\client"
With recent RHEV portal plugin, the Spice client is chosen according
to this key.
2012-02-23 16:46:20 +01:00
Marc-André Lureau
e2082caa0a remote-viewer: add smartcard controller message 2012-02-22 16:45:11 +01:00
Marc-André Lureau
c0ec28ce8a spice: teach customizable key bindings with controller
Tested with RHEVM 3.0 instance with custom bindings for fullscreen &
ungrab.
2012-02-22 16:45:08 +01:00
Marc-André Lureau
946a70762e Small code simplification 2012-02-22 16:45:02 +01:00
Marc-André Lureau
51ca18beee Use the accelgroup to define key bindings
With accelgroups, we can redefine the keybindings
2012-02-22 16:45:00 +01:00