Commit Graph

542 Commits

Author SHA1 Message Date
Michal Privoznik
bd84ea26ea Don't redefine _FORTIFY_SOURCE macro
If the _FORTIFY_SOURCE has been already defined, we unconditionally
redefine it, leaving us with warning/error thrown at compilation time.
2013-02-04 14:56:59 +01:00
Martin Kletzander
1648363b85 Make compilation work with automake 1.13
Just one thing needs to be changed for virt-viewer to build with
automake 1.13, AM_CONFIG_HEADER is deprecated and should be
AC_CONFIG_HEADERS.
2013-02-04 14:53:31 +01:00
Marc-André Lureau
7d9e442ffb remote-viewer: controller sets spice session proxy
Trivial change since spice-gtk now has proxy session property and
controller message, just forward it.
2013-01-31 16:59:02 +01:00
Marc-André Lureau
3cc2040be5 Add a "Do not ask me again" checkbox when closing app 2013-01-31 16:59:02 +01:00
Marc-André Lureau
4a61780033 Always ask user about closing session
Currently, virt-viewer doesn't ask for user confirmation when closing
a single monitor session. Always ask before closing, as requested by
user.

https://bugzilla.redhat.com/show_bug.cgi?id=803912
2013-01-31 16:59:02 +01:00
Marc-André Lureau
2798fd2d60 spice: add proxy configuration to connection file 2013-01-29 14:40:24 +01:00
Christophe Fergeau
d062767109 Remove unused label
It's no longer used after aecd80ec7
2013-01-24 16:58:55 +01:00
Christophe Fergeau
604dbe1db2 Remove unused variable
'window' is no longer used after 412bcf6f.
2013-01-24 16:58:55 +01:00
Christophe Fergeau
01532f9523 Fix warning when compiling without spice-gtk support
When remote-viewer is compiled without spice-gtk support, spice-session.h
will not get included in remote-viewer.c, causing these warnings:

remote-viewer.c: In function 'remote_viewer_start':
remote-viewer.c:693:9: warning: implicit declaration of function
'virt_viewer_session_set_file' [-Wimplicit-function-declaration]
remote-viewer.c:693:9: warning: nested extern declaration of
'virt_viewer_session_set_file' [-Wnested-externs]
2013-01-24 16:58:54 +01:00
Christophe Fergeau
9749a1d2c9 Add missing intltool BuildRequires
The configure script fails if intltool is not installed.
2013-01-24 12:58:06 +01:00
Christophe Fergeau
adeb7c7511 mingw: Add packages for virt-viewer NSIS installer
This makes it much easier to build an updated Windows installer binary
as this can now be done using mock/koji/... by using this .spec and
a virt-viewer tarball.
2013-01-24 12:58:06 +01:00
Christophe Fergeau
55585efd47 mingw: Build a gtk2 version of virt-viewer
The nsis file we ship is generating an installer for a GTK+2 build
of virt-viewer, so it's inconsistent for the mingw-virt-viewer
spec file to generate a GTK+3 build. Switch to building a GTK+2
version of virt-viewer in mingw-virt-viewer.spec
2013-01-24 12:58:06 +01:00
Christophe Fergeau
e474656e9b mingw: Package debug-helper.exe 2013-01-24 12:58:06 +01:00
Christophe Fergeau
9c7802445d mingw: Package debug files
When building on f18, the build fails because of unpackaged
debug files. Use the appropriate mingw macro to generate
the mingw debug packages.

The build failure is:

RPM build errors:
error: Installed (but unpackaged) file(s) found:
   /usr/i686-w64-mingw32/sys-root/mingw/bin/debug-helper.exe.debug
   /usr/i686-w64-mingw32/sys-root/mingw/bin/remote-viewer.exe.debug
   /usr/i686-w64-mingw32/sys-root/mingw/bin/virt-viewer.exe.debug
   /usr/i686-w64-mingw32/sys-root/mingw/bin/windows-cmdline-wrapper.exe.debug
   /usr/x86_64-w64-mingw32/sys-root/mingw/bin/debug-helper.exe.debug
   /usr/x86_64-w64-mingw32/sys-root/mingw/bin/remote-viewer.exe.debug
   /usr/x86_64-w64-mingw32/sys-root/mingw/bin/virt-viewer.exe.debug
   /usr/x86_64-w64-mingw32/sys-root/mingw/bin/windows-cmdline-wrapper.exe.debug
    Installed (but unpackaged) file(s) found:
   /usr/i686-w64-mingw32/sys-root/mingw/bin/debug-helper.exe.debug
   /usr/i686-w64-mingw32/sys-root/mingw/bin/remote-viewer.exe.debug
   /usr/i686-w64-mingw32/sys-root/mingw/bin/virt-viewer.exe.debug
   /usr/i686-w64-mingw32/sys-root/mingw/bin/windows-cmdline-wrapper.exe.debug
   /usr/x86_64-w64-mingw32/sys-root/mingw/bin/debug-helper.exe.debug
   /usr/x86_64-w64-mingw32/sys-root/mingw/bin/remote-viewer.exe.debug
   /usr/x86_64-w64-mingw32/sys-root/mingw/bin/virt-viewer.exe.debug
   /usr/x86_64-w64-mingw32/sys-root/mingw/bin/windows-cmdline-wrapper.exe.debug
2013-01-24 12:58:06 +01:00
Christophe Fergeau
7f9ceefa06 mingw: Fix typo in mingw macro name (hedder -> header) 2013-01-24 12:58:06 +01:00
Christophe Fergeau
a525e43e85 nsis: Adjust file list
Adjust file names for mingw-usbredir dlls and readline dlls
2013-01-24 12:58:06 +01:00
Hans de Goede
412bcf6f7f virt-viewer-display-spice: Get monitor under our window
When getting monitor info for going fullscreen, Get the monitor under
*our* window rather then under the root-window.

Noticed this not working properly when testing the monitor coordinates stuff,
but this should also help people seeing problems when using non equally sized
monitors.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-01-22 10:57:34 +01:00
Marc-André Lureau
b6af879d19 vnc: add connection by file
Learn to connect to a VNC server with the connection details file, ex:

[virt-viewer]
type=vnc
host=localhost
port=2356
password=foobar

v2:
- add username/password support

https://bugzilla.redhat.com/show_bug.cgi?id=843410
2013-01-18 12:28:58 +01:00
Marc-André Lureau
c0a2f9dfd5 file: add username support 2013-01-18 12:28:58 +01:00
Hans de Goede
008491a2d9 Make hotkey configuration functionality available from the cmdline (v2)
Changes in v2:
-Add --hotkeys documentation to the man-pages

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-12-21 10:54:27 +01:00
Hans de Goede
aecd80ec77 Add a virt_viewer_app_set_hotkeys() helper function
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2012-12-21 10:39:29 +01:00
Christophe Fergeau
0577c703fb Improve check for overridden grab key combination
remote-viewer can either use the default grab/ungrab handled by
spice-gtk, or override it and use the standard gtk+ accelerator
mechanism. However, the code currently assumes that if any accelerator
is set in remote-viewer, then the grab key has been overridden.
This commit makes sure the grab key is actually overridden before assuming
so.
2012-12-20 12:22:14 +01:00
Christophe Fergeau
d01097eed2 Don't leak SpiceGrabSequence in enable_accel_changed 2012-12-20 12:22:12 +01:00
Christophe Fergeau
cae0a491c6 Improve hotkeys controller behaviour
Disable default accelerators when setting bindings from the controller
in case the controller does not override them all. This ensures we don't
inherit from the bindings set in VirtViewerApp::constructor if the controller
doesn't set any bindings for a given action.
2012-12-20 11:59:30 +01:00
Marc-André Lureau
346f35c87b Use monitor geometry, not screen size
In a recent commit, 3bb6f5ec80, I
introduced a regression: going fullscreen would no longer match client
and guest resolution correctly.

A GdkScreen is not necessarily the physical screen monitor size.
Lookup the physical monitor size using
gdk_screen_get_monitor_geometry().

Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=881020
2012-12-07 14:55:27 +01:00
Michal Privoznik
3b810b7768 session-spice: Cast CA string to gunit8 pointer
SpiceSession has 'ca' property which is type of GByteArray*.
However, when we read the property from file, we read it as
string. For conversion g_byte_array_new_take() is used which
takes given pointer as guint8* so we need to do the cast.
2012-12-05 16:29:11 +01:00
Michal Privoznik
5c9955df09 Sanitize syntax-check
make syntax-check is producing some errors about empty line at EOF
and missing #include <config.h> in src/virt-viewer-file.c

* src/virt-viewer-file.c: add #include <config.h>
* data/virt-viewer-debug.nsis.in: remove empty line at EOF
2012-12-05 16:28:21 +01:00
Doug Goldstein
0f6b286e7a Make .desktop file comply with spec
The .desktop file did not comply with the Desktop Entry spec as checked
with desktop-file-validate. Boolean keys are defined as taking only
'true' or 'false', the entry Terminal had False. MimeType is a string
list and therefore must be terminated with a ;
2012-12-05 12:18:10 +01:00
Marc-André Lureau
09b9add92f remote-viewer: learn to connect from file
v2:
- move some variables to inner-block as requested by reviewer
2012-11-27 20:09:59 +01:00
Marc-André Lureau
c218d43b48 spice: learn to connect from file 2012-11-27 20:09:59 +01:00
Marc-André Lureau
79bdf3b177 Add VirtViewerSession:file property
If VirtViewerSession:file is set, it should be used to define the
connection parameters. Also correct the mime type used in this case.

The mime type is needed to identify the kind of resources we are
adding to the recent list. The recent list can then be filtered and
various application handling that type may attempt to access that
resource.
2012-11-27 20:08:01 +01:00
Marc-André Lureau
a0bbb6878d Add VirtViewerFile
v2:
- use !! for boolean values setter
- switch from bytearray/base64 to plain string for CA (PEM)
- add file format comment
2012-11-27 20:07:10 +01:00
Marc-André Lureau
4bf7aabbf3 Move spice_hotkey_to_gtk_accelerator() to util
To be compatible with RHEVM, VirtViewerFile hotkey format will use the
Spice Controller format.
2012-11-27 20:07:10 +01:00
Marc-André Lureau
fe4014f023 recent: get mime type from session
Do not use spice mime type for all kind of sessions, but depending on
what is actually being used.
2012-11-27 20:07:07 +01:00
Marc-André Lureau
ddfcc61c87 session: add virt_viewer_session_mime_type() 2012-11-27 19:04:35 +01:00
Marc-André Lureau
9f5192f117 debug.nsis: remove superflous path 2012-11-27 12:37:29 +01:00
Marc-André Lureau
0dca975d64 display: only un-constrain display size once it is mapped
Wait until the widget is actually on screen before removing its
size constrain. This solves 50x50 window secondary window size
when connecting to a multi-monitor spice guest.
2012-11-27 12:36:27 +01:00
Marc-André Lureau
03c3e4d08e Add virt-viewer-debug.exe NSIS installer
This installer will provide with the tools and configuration needed to
debug virt-viewer & remote-viewer. It will install itself by default in
virt-viewer directory.
2012-11-23 16:05:57 +01:00
Michal Privoznik
7c00b1a803 debug-helper: include <config.h> 2012-11-21 17:35:54 +01:00
Michal Privoznik
e56c7a0507 AUTHORS: add Dave Allan
as he has supplied patch (commit 74b1b62510).
2012-11-21 17:35:54 +01:00
Michal Privoznik
68f2d1fced cfg.mk: Don't require bindtextdomain directly
With current implementation, all binaries that need it call
bindtextdomain but not directly. They call a helper function
instead.  This makes, however, syntax-check fail as it cannot
recognize it.

Original patch proposed by Eric Blake <eblake@redhat.com>
2012-11-21 17:35:53 +01:00
Marc-André Lureau
30b5366e66 spice: the session is connected when main channel opened
The previous change in 399aae55aa rely
on correct session-connected signal. However, the spice backend
is emiting it too early, when the main channel is created, where
it should wait until it is connected instead.
2012-11-21 00:32:00 +01:00
Marc-André Lureau
399aae55aa "Unable to connect to the graphic server" error on guest shutdown
In virt_viewer_app_activate(), priv->connected is set to FALSE when
the connect/active is successfull. However, we rely on it to know
whether the virt_viewer_app_disconnected() is an error, so only set it
to FALSE when connection failed.

Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=875697
2012-11-20 12:59:56 +01:00
Marc-André Lureau
a4805a3bb8 build-sys: add min libvirt version requirement check 2012-11-16 18:19:16 +01:00
Christophe Fergeau
8a7aa6a1e1 Make sure png screenshots have a .png extensions
When falling back to saving to .png, the filename might not
end with .png. This commit appends the .png extension to the
screenshot filename if it's missing.
2012-11-15 10:21:03 +01:00
Christophe Fergeau
f9935c832b Allow to save to other formats than png
Currently, the screenshots can only be saved to png. This commit
checks if the file extension is a known one, and will save to this
format if it is. Otherwise it will fallback to saving to png.
2012-11-15 10:21:03 +01:00
Christophe Fergeau
45a791082e Set a default dir/name for screenshots
It makes sense for the screenshots to be saved in ~/Images,
especially as otherwise the filechooser will display
'recent documents' to which we cannot save. This commit also sets
the default screenshot name to 'Screenshot'.
2012-11-15 10:21:03 +01:00
Christophe Fergeau
6d35a443da Fix spice-gtk check in configure.ac
The check that at least one of spice-gtk and gtk-vnc is present
uses a wrong variable name to check for spice-gtk presence, which
causes the check to think it's never present. This would make
gtk-vnc presence mandatory. This commit fixes the name of the
spice-gtk variable ($have_gtk_spice -> $have_spice_gtk).
2012-11-15 10:21:03 +01:00
Michal Privoznik
9983fe74dd Don't SIGSEGV if no transport is used.
One of previous commits (74b1b62510) allowed us to connect to
localhost directly if ssh transport was used. However, if there's
not transport, we SIGSEGV'ed as g_str_equal doesn't like NULL as
one of arguments. Change this to g_strcmp0 which does the same
service but is more friendly to NULL arguments.
2012-11-14 15:20:58 +01:00
Michal Privoznik
fa39c5335c Reconnect to libvirtd after connection breaks
Currently, if user wants to reconnect to a domain he can use
'-r' cmd line argument. This makes virt-viewer listen to
domain events. However, if connection to libvirtd breaks
somehow, we will receive no longer any event. Hence we must
reconnect to the libvirt.
2012-11-13 15:23:51 +01:00