Commit Graph

78 Commits

Author SHA1 Message Date
Fabiano Fidêncio
cc455b7f91 window: Replace autoDrawer with native Gtk widgets
GtkRevealer was intrudced in Gtk+ 3.10 and, combined with Gtk Overlay
(intoduced in Gtk+ 3.2), can provide a more sustainably implementation
of the AutoDrawer functionality.

This approach is completely based on the approach taken by virt-manager:
dc05600324

Resolves: https://bugs.freedesktop.org/show_bug.cgi?id=94495

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2016-06-23 17:35:17 +02:00
Fabiano Fidêncio
1f6f1a48e5 ui: Move ui files to $(srcdir)/resources/ui
I'd like to keep our resources all in the same place. In the future we
will be able to have:
$(srcdir)
 |_ resources
    |_ ui: for our {remote,virt}-viewer ui specific files
    |_ gtk: for files that can be automatically handled by Gtk (like
    |       app-menu).
    |_ css: for custom themes (like:
            https://bugs.freedesktop.org/show_bug.cgi?id=94276)

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-06-20 18:24:16 +02:00
Fabiano Fidêncio
1315f0aa3d ui: Rename UI files to .ui (instead of .xml)
When using GtkApplication, Gtk automatically searches for the menus of
the application at "org/example/app/gtk/menus.ui".

Currently we don't have a "menus.ui", but try to see this commit is a
first step in order to use app-menu.

For now, let's standardize that all our UI files will have the ".ui"
extension instead of the ".xml" one.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-06-20 17:33:53 +02:00
Jonathon Jongsma
0856067d79 Add file transfer dialog
This dialog will show the progress of files being transferred from the
client to the guest and allows the user to cancel ongoing file transfer
tasks.  The user can cancel each transfer individually, or cancel all
ongoing transfers at once.

Resolves: rhbz#1332180, rhbz#1324521
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2016-05-03 08:04:10 +02:00
Pavel Grunt
2736081940 Move tests under /tests directory
Keep tests separated from the code
2016-03-14 16:36:37 +01:00
Pavel Grunt
d81f7c047f Add libvirt-viewer-util library an use it in tests 2016-03-14 16:35:43 +01:00
Pavel Grunt
3e42ec7c39 test: Add tests for monitor mapping 2016-03-08 19:04:12 +01:00
Fabiano Fidêncio
82e13442b9 Use GResource for loading ui files
Let's take advantage of GResource for loading ui files in a better and
cleaner way than virt_viewer_util_load_ui() was doing.
It also brings the benefit, at least for developers, of being able to
test ui changes without having to "make install" virt-viewer.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2016-03-03 23:08:37 +01:00
Fabiano Fidêncio
45afba8d0b configure: Simplify libvirt/libvirt-glib handling
Merge libvirt and libvirt-glib checking in PKG_CHECK_MODULES, then we
don't nee the LIBVIRT_GLIB_{CFLAGS,LIBS} in Makefile.am

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2016-02-25 22:26:59 +01:00
Fabiano Fidêncio
51ce01dfdd Bring back libvirt-glib dependency
libvirt-glib dependency was dropped in commit 296f91c in favor to
maintain the full glib event loop integration into virt-viewer tree.
This decision was taken because libvirt-glib was not mature enough at
that time, which is not the case nowadays.

The libvirt-glib version chosen as dependency (0.1.8) is the first
release that includes the fixes for the glib event loop integration that
were backported to virt-viewer last year.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2016-02-25 22:17:37 +01:00
Fabiano Fidêncio
a37127c7cf cleanup: Drop old compatibilty code
A few more pieces of old compatibility code can be dropped, as we
already depend on GLib 2.38.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-02-24 16:57:34 +01:00
Eduardo Lima (Etrunko)
76d2e483d5 Drop old compatibility code
With glib requirements now being 2.38, these functions do not make sense anymore.

Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2016-02-18 21:46:02 +01:00
Fabiano Fidêncio
4235ef3453 Drop support to gtk2
The 3.0 release was the last one that still supports GTK2. For the
Windows builds the support to GTK2 was dropped in the previous release.
Let's do the same for the entire project now.

Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
2016-02-15 21:49:57 +01:00
Jonathon Jongsma
ba5bf67288 Build an intermediate convenience library
Instead of building every single source file twice (once for
virt-viewer, and once for remote-viewer), just build them into a
temporary library and link the final executables against that.

The one possible drawback to this approach is that we now use the same
log domain for both executables: 'virt-viewer'. Previously, the
remote-viewer executable used 'remote-viewer' for its log domain.
2015-06-30 14:31:11 -05:00
Jonathon Jongsma
1716c1a7b9 Build: put one file on a line
For easier maintenance, put a single source file per-line in the
makefile
2015-06-30 14:31:11 -05:00
Jonathon Jongsma
bdd3b7af74 Remove spice-controller flags from virt-viewer build
Virt-viewer does not use spice-controller, only remote-viewer does. So
there's no need to ad SPICE_CONTROLLER_CFLAGS to the virt-viewer build.
2015-06-30 14:31:11 -05:00
Lukas Venhoda
0571843d7f remote-viewer-connect: Changed hardcoded UI into XML
Hardcoded UI removed in favor of XML.
Added the new XML file for translation.
2015-06-16 14:11:00 +02:00
Lukas Venhoda
f4018a8dbe remote-viewer: Connect dialog moved to its own file
Connect dialog from remote-viewer is now in its own file.
Most other dialog also have their own files.
This will make changing the dialog into a window easier.

Renamed connect_dialog to remote_viewer_connect_dialog.
2015-06-16 14:10:03 +02:00
Christophe Fergeau
c9a6a27061 test: Add test case for virt_viewer_compare_buildid 2015-06-09 18:06:39 +02:00
Marc-André Lureau
73b80ba99f Add preferences dialog UI file 2015-03-05 21:31:30 +01:00
Pavel Grunt
7a47a4da08 Show VM chooser dialog when oVirt VM name is missing
When a user tries to connect to ovirt without specifying
VM name (remote-viewer ovirt://ovirt.example.com) or with
wrong VM name a list of available virtual machines is shown,
and the user may pick a machine he wants to connect to.
2014-10-10 12:57:08 +02:00
Christophe Fergeau
894396d6b5 ovirt: Add OvirtForeignMenu class
This class is used to implement the so-called oVirt 'foreign menu'
which is a menu populated with ISO images available on the
oVirt instance that the user can dynamically insert into the
virtual machine he is currently viewing.
2014-08-18 13:20:42 +02:00
Jonathon Jongsma
b684a76fa4 Add a dialog showing details of the current guest
This allows the user to obtain the GUID and vm name of the currently-connected
guest.  Obviously, this only works with spice. In the future, it will allow them
to set guest-specific configuration options (using a GUID as a key)
2014-08-07 08:51:15 -05:00
Jonathon Jongsma
9f6878c35a Load ui files first from installed location
virt_viewer_util_load_ui() looks first in the current directory, and then looks
in the system data dirs for a ui file to load, but if you install virt-viewer in
a different prefix, it will load the system UI file rather than the one from the
install prefix. Try to load the ui file from pkgdatadir first.
2014-01-20 16:10:12 -06:00
Christophe Fergeau
0fd9a6185b build-sys: Simplify setting of optional CFLAGS/LDFLAGS
They don't need to be wrapped inside if HAVE_XXX blocks in Makefile.am
as when XXX is not available, XXX_CFLAGS and XXX_LIBS will expand to
the empty string, and thus we can carry them unconditionally in
our app_CFLAGS/app_LDFLAGS variables.
2013-04-12 21:21:15 +02:00
Christophe Fergeau
67c8c3790f Add oVirt support
This commit adds support for ovirt:// URIs. It does so by using
libgovirt to get the spice/vnc connection information through
oVirt xmlrpc API.
2013-04-12 19:45:38 +02:00
Christophe Fergeau
b8f64b82a9 Fix compilation with older glib versions
Recent commits introduced use of g_clear_object and
g_byte_array_new_take which are only present respectively in glib
2.28 and 2.32
2013-03-20 16:03:28 +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
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
53c6549fb4 windows: add debug-helper
This is a simple program that will set some debug variable, and run
gdb and wait until it finished. This makes it possible to debug
"remote-viewer --spice-controller" easily, by setting the necessary
variables and keeping the parent process running (the activex whatches
its death)

To use it, replace the HKCU "Software\spice-space.org\spicex\client"
value "$INSTDIR\bin\remote-viewer.exe --spice-controller" with
"$INSTDIR\bin\debug-helper.exe remote-viewer.exe --spice-controller".
2012-10-23 14:49:18 +02:00
Daniel P. Berrange
a732a94df3 Use a more specific regex to fix enum include paths
Simply doing a search replace on $(srcdir) doesn't work very
well in non-VPATH builds. Use a more specific regex that won't
generate false matches
2012-09-14 18:00:27 +01:00
Daniel P. Berrange
f8c6065330 Look in builddir for icons & strip build dir prefix from enum file includs 2012-09-14 17:35:31 +01:00
Marc-André Lureau
c8d20b35bd Bump glib > 2.22, add compat file
We use API from 2.22, and some from further version. Add
virt-glib-compat.h fallback file for those.
2012-07-23 16:27:33 +02:00
Marc-André Lureau
7cf00ea8d2 build: generate enums type boilerplate 2012-07-23 16:27:32 +02:00
Marc-André Lureau
8e1a8b3242 dist: ship .ico in tarball
Some distros (a 4-letters) don't have icotool.
Let's ship the .ico in the tarball.

The build will fail if icoutil is not installed when
building from git or when the .ico is absent. The error
should be explicit.
2012-05-14 23:27:20 +02:00
Daniel P. Berrange
5887eb07b8 Fix debug output on glib >= 2.31 2012-04-25 15:30:31 +01:00
Daniel P. Berrange
c1af3ab0cc Fix scaling of window to avoid integer truncation
Use round() instead of integer truncation when scaling the window,
to avoid floating point precision problems on i386
2012-04-19 16:18:31 +01:00
Daniel P. Berrange
be3ce01096 Add a desktop file for launching remote-viewer
Enable automagic handling of spice:// URLs in firefox by
registering a desktop handler for remote-viewer with the
SPICE URI scheme
2012-04-18 14:12:57 +01:00
Daniel P. Berrange
dc22bb1221 Fix typo in variable names for Win32 command helper 2012-04-04 10:41:32 +01:00
Christophe Fergeau
95e42b9cec build-sys: fix Windows specific LDFLAGS on non-mingw 2012-04-03 14:07:21 +02:00
Marc-André Lureau
db1b308a63 remote-viewer: make it a GUI/windows application with hybrid console
If the application can attach to its parent console, redirect
input/output. So that will work nicely with the command line wrapper.
2012-04-02 23:56:50 +02:00
Marc-André Lureau
55477f9f20 Add a Windows command line wrapper
Add a small command line wrapper, to be able to call GUI/windows application from the console
2012-04-02 23:56:49 +02:00
Marc-André Lureau
81c2c3bfec build-sys: use git.mk to generate gitignore
This makefile is just fantastic, it forces you into good practices,
support various build targets (my windows builddir ignore the right
files etc..)

The more I use it, the more I like it.
2012-03-30 14:48:13 +02:00
Marc-André Lureau
902b9a71e2 win32: add a few Windows sepecific data
Add application icon and manifest
2012-03-30 14:48:13 +02: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
64e1616f75 fix make distcheck 2012-03-01 16:42:09 +01:00
Marc-André Lureau
50b0c72392 Fix compilation with gtk 2.18 2012-03-01 15:15:51 +01:00
Daniel P. Berrange
24ab6e6e40 Add back compat for GObject 2.22 which lacks GBinding 2012-02-16 14:52:55 +00:00
Daniel P. Berrange
e1064a5355 Only link remote-viewer program against SPICE controller 2012-02-16 14:37:22 +00:00
Daniel P. Berrange
8b18ea0ea5 Remove use of a libtool convenience library
The use of a libtool convenience library causes some platforms to
loose the ability to use the GNU_RELRO security feature in the
resulting binary. Refactor the makefile to simply compile the
common files twice, once for virt-viewer & once for remote-viewer
2012-02-16 14:20:25 +00:00