Commit Graph

558 Commits

Author SHA1 Message Date
Daniel P. Berrange
09a961ceba Adapt 'po file' syntax check to look at more files
The 'po file' check needs to consider various files in data/
as well as normal sources
2013-02-13 15:18:19 +00:00
Daniel P. Berrange
87bb91e6af Don't define the same make target/variables twice
The NSIS patches defined the .PHONY target twice and also
defined CLEANFILES twice
2013-02-13 15:18:16 +00:00
Daniel P. Berrange
25a2acc2da Auto-generate AUTHORS file from GIT logs
Rather than trying to manually keep track of authors,
just auto-generate the list from GIT logs

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-02-13 15:17:57 +00:00
Marc-André Lureau
db19b2ec99 win: add virt-viewer.msi build rule
In order to build the MSI, you will need msitools:
http://ftp.gnome.org/pub/GNOME/sources/msitools/

The MANUFACTURER environment variable is mandatory and should be set
to the manufacturer/author of the MSI build.
2013-02-13 13:20:37 +01:00
Marc-André Lureau
6203eff3bc spec: include mime file 2013-02-12 18:59:04 +01:00
Marc-André Lureau
a52b5ea88c build-sys: add --with-buildid to details build version
Add a configure argument to append build version details, similar to
what Daniel Berrange proposed in the "use finer package version in
mingw-virt-viewer" thread on the ML.
2013-02-12 18:56:33 +01:00
Marc-André Lureau
da45d9fa1e Register remote-viewer mime handling
Unfortunately, I don't see yet how we could avoid the browser dialog
asking which application to open. On Firefox, each user has a
mimeTypes.rdf, but we can't really modify it..
2013-02-11 19:35:00 +01:00
Marc-André Lureau
d5229a71eb win32: process message queue in debug-helper
Process messages while waiting for pi.hProcess.

Avoid the spice-x from hanging in WaitForInputIdle(), although the
client itself might not be ready, not even started...

https://bugzilla.redhat.com/show_bug.cgi?id=903190
2013-02-11 16:54:01 +01:00
Hans de Goede
ea6c9d2673 virtviewer-window: Make sure fullscreen window stays on the same monitor
Sometimes the guest may shortly disable and then re-enable a monitor while
in fullscreen mode, this happens for example when changing display resolution
through gnome-display-properties inside the guest. This causes the client
window-manager to remap the window, and this can cause it to end up
on a different monitor.

This patch fixes this by remembering the position the window is places at
when going fullcreen and moving it there again when its gets (re-)shown.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-02-11 14:25:01 +01:00
Marc-André Lureau
329a4b4908 Fix "Do not ask me again" checkbox settings saving
Based on bug report by Hans:

The code block for saving was below this check:

    if (priv->session) {
        virt_viewer_session_close(VIRT_VIEWER_SESSION(priv->session));
        if (priv->connected) {
            priv->quiting = TRUE;
            return;
        }
    }

Which means it never executes when quiting virt-viewer while conneced, causing
the "Do not ask me again" checkbox settings to not be saved.
2013-02-07 20:35:19 +01:00
Hans de Goede
e99f03008e usbredir: Fix usbredir menu always being grayed out on monitor 2+
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-02-06 16:14:28 +01:00
Hans de Goede
071bee5c57 virt-viewer-display-spice: Pass proper x and y coordinates in windowed mode
This stops monitor order from the guest from being re-arranged in multi-
monitor setups when switching between fullscreen and windowed mode.

Note this relies on spice-gtk's auto monitor alignment code, which currently
does not properly handle setups where there is more then 1 row of monitors,
ie 2x1 - 5x1 will work fine, but 2x2 will not.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-02-06 16:14:28 +01:00
Hans de Goede
abc1626f3b virt-viewer-display-spice: Use real monitor coordinates in fullscreen
Now that we pass the real monitor coordinates, tell spice-gtk to use them,
rather then to use the passed coordinates as input for its automatic monitor
alignment. This fixes ie monitors in a 2x2 grid, showing up as a 4x1
configuration in the guest.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-02-06 16:14:28 +01:00
Hans de Goede
d841aa0af6 virt-viewer-display-spice: Pass real monitor coordinates in fullscreen
Rather then always passing +0+0

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-02-06 16:14:28 +01:00
Michal Privoznik
f2890032fe g_{message,warning}: Use printf style
The g_message() and g_warning functions expect printf style of
arguments. That is, whenever we want to print a string, it has
to be preceded with "%s" format.
2013-02-04 15:20:28 +01:00
Michal Privoznik
0c212ee8ca configure: Update with autoupdate 2013-02-04 15:15:44 +01:00
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