IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
The script was originally used by the Test::AutoBuild
project to perform periodic automatic builds; however, that
effort has been abandoned a long time ago, and these days
virt-viewer CI builds are happening on the Jenkins-based
CentOS CI environment under the libvirt umbrella[1], where
build recipes are maintained separately from the projects
themselves.
The script is still used to prepare releases, so it can't
be dropped from the repository: rename it so that its
purpose is more clearly communicated instead.
[1] https://ci.centos.org/view/libvirt/
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
We previously bumped the gtk+ requirement to 3.18 for the function
gtk_window_fullscreen_on_monitor(). But this function is only necessary
in Wayland. So add some preprocessor version checks to allow it to
compile on older distributions if they don't care about wayland support.
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
On Windows, the arguments we get in GApplication::ocal_command_line
come from g_win32_get_command_line(), and g_option_context_parse_strv()
documentation says:
« On Windows, the strings are expected to be in UTF-8. This is in
contrast to g_option_context_parse() which expects them to be in the
system codepage, which is how they are passed as argv to main(). See
g_win32_get_command_line() for a solution. »
This was causing issues on Windows when running:
remote-viewer -t "你好" spice://<target-host>:5900
In fullscreen mode, we attempt to enable a guest display for each client
monitor and then place a fullscreen window for each display on the
appropriate monitor. Previously, we were using gtk_window_move() to move
the window to the proper monitor, and then calling
gtk_window_fullscreen() to enter fullscreen mode on that monitor.
However, under wayland, gtk_window_move() no longer has any effect for
toplevel windows, so all displays were showing up on top of eachother on
the same client monitor.
Fortunately, Gtk+ 3.18 added a new gtk_window_fullscreen_on_monitor()
API that works on Wayland. In theory this allows us to remove the call
to gtk_window_move() from the code. But to avoid potentially changing
behavior on xorg or older systems, I left the existing logic.
This requires a dependency bump for gtk+ from 3.12 to 3.18. Gtk 3.18 is
provided by the following distributions (or newer):
- RHEL 7.4
- Fedora 23
- Ubuntu 16.04LTS
Resolves: rhbz#1584561
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
Spice and VTE display do not need to implement it.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
Instead of modifying it in object initialization.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
virt_viewer_window_set_menus_sensitive() is the common function to set
sensitivity on menu items.
It was lacking "toolbar_send_key", so add it there too.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
There is a hack to maintain the toggle state to a desired state within
the "toggled" handler.
However it is only necessary for the ask-quit case. In this case, we
want to maintain the item active, which is simpler to handle than the
general case. Simplify the code by folding
virt_viewer_app_window_set_visible() and removing the static
"reentering" hack, only maintaining "active" on the last item.
Note that the hack was needed since there is no way to hook a signal
handler on "clicked" before "toggled" is emitted and handled by Gtk,
to avoid the recursion.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
We don't use class signal handlers, remove the extra pointers.
g_signal_override_class_handler() could be used instead when needed.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
- spice+unix:// was added in spice-gtk v0.28
- spice+tls:// was added in spice-gtk v0.35
This allows launchers to start remote-viewer when they encounter a
Spice URI with +unix or +tls.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
Previously we were emitting the VirtViewerSession::session-disconnected
when we got the Spice::session::channel-destroy signal for the last
channel. However, since the channels are still valid at this point, and
because VirtViewerApp quits the application in response to the
session-disconnected signal, that means that the channels were never
being properly freed. This was particularly problematic for the usbredir
channel, which must disconnect any connected USB devices as part of its
destruction. By using the new SpiceSession::disconnected signal instead,
we can ensure that all channels have been disconnected and properly
destroyed before quitting the application.
It may be useful to know why the storage domain has not been listed,
given that there are different reasons for that. To make it easier to
provide more detailed debug messages, we move code from the callback
function to this new one.
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
With these new values, 0.3.3 for libgovirt and 0.8 for librest, we can
remove checks for OVIRT_REST_CALL_ERROR_CANCELLED and correspondent
rest_proxy_auth_cancel().
Distros that already ship these versions, such as Fedora, RHEL 7.4
onwards, and Ubuntu since 17.10.
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Even when the user adds comments, we should place the guest's name
unless it is present already.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1623756
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
oVirt REST API does not provide a way to know what is a valid ISO image
which can be assigned to a running VM. I've seen floppy disk images
(.vfd) in a domain, which is already filtered. Now I've seen an ISO
domain with .qcow2 files in it, which can't be assigned to a VM either.
This commit filters every file which does not have a .iso extension as
it's unlikely to be possible to use it.
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
The ovirt code uses g_strv_contains() with fallback code in
glib-compat.h when we are using a glib version where it's not available.
However, when we use a glib version where g_strv_contains is available,
we get a compilation warning since we are compiling GLIB_VERSION_MAX_ALLOWED
set to 2.38.
This commit wraps both the compat code and the g_strv_contains() call in
a strv_contains() helper where we can hide the magic needed to avoid
deprecation warnings.
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
This adds an unused parameter, but lets us get rid of this new warning
with gcc 8:
virt-viewer-window.c: In function 'get_image_format':
virt-viewer-window.c:930:33: warning: cast between incompatible function types from 'GHashTable * (*)(void)' {aka 'struct _GHashTable * (*)(void)'} to 'void * (*)(void *)' [-Wcast-function-type]
g_once(&image_formats_once, (GThreadFunc)init_image_formats, NULL);
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
This is no longer needed since 140cb84
'remote-viewer: remove --spice-controller'
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
On Windows, we can't use bindtextdomain(GETTEXT_PACKAGE, LOCALE_DIR); as
LOCALE_DIR is a compile-time constant, while the location of the
translations will be dependant on where the user installs virt-viewer.
This results in an untranslated virt-viewer UI on Windows. This commit
calls bindtextdomain() with a directory which is relative to the
installation path so that translation are properly found.
This is similar to what spice-gtk is doing:
https://cgit.freedesktop.org/spice/spice-gtk/tree/src/spice-glib-main.c
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
- Use macros for paths instead of absolute paths.
- Remove dangling %{gtk_arg} macro in configure.
- Fix scope of enable_autotools macro to avoid warning during build.
warning: Macro %enable_autotools defined but not used within scope
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Similar to last commit, as noticed by reporter in bugzilla:
https://bugzilla.redhat.com/show_bug.cgi?id=1477966
Man page should reference spice-client, not spice-gtk.
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
The man page spice-gtk ships is named "spice-client", not "spice-gtk"
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=1477966
This fixes commit 140cb84c2538bf0eab7dea2035dfecc4db74c784, where we
removed the spice-xpi-client-remote-viewer.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
This helper was useful to debug spice controller & activex plugin. Now
that the controller is gone, it is no longer needed.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Victor Toso <victortoso@redhat.com>
spice controller interface is being removed from spice-gtk.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Victor Toso <victortoso@redhat.com>
Some users want the ability to set connection details without writing
to a file or passing command line arguments.
Learn to read the connection file from standard input for such use
case.
This allows a parent process to set the connection details without
intermediary file.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Victor Toso <victortoso@redhat.com>
When connecting to a VM via oVirt instance, the original uri can not be
retrieved using virt_viewer_session_get_uri(). Consequently, it was
never saved, even though the connection succeeds and the actual callback
for "session-connected" signal, which saves the URI, is invoked.
To solve this problem, we always pass a copy of the guri as user-data
parameter for the callback, and if the call to
virt_viewer_session_get_uri() returns NULL, the parameter is used
instead.
Resolves: https://bugzilla.redhat.com/1459792
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
This last patch of the series is where we actually check if the storage
domain is active in the data center the VM is associated with. It makes
use of g_strv_contains(), which is available only in glib version 2.44.
Compatibility code has been added if building against older versions
than required.
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1427467https://bugzilla.redhat.com/show_bug.cgi?id=1428401
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
It is possible that the data center the VM is associated with has more
than one storage domain associated with it as well, when only one is
active while the others are not.
The current ovir-foreign-menu code does not take it into consideration,
thus the ISO dialog may show invalid results with that scenario. We fix
this problem by making use of new functions in libgovirt, adding support
or hosts, clusters and data centers.
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1427467https://bugzilla.redhat.com/show_bug.cgi?id=1428401
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
This can save us some bandwidth, as we are searching for the specific
virtual machine instead of retrieving the collection with all VMs, and
then iterating over the results after the transfer finishes.
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Setting LC_ALL=C breaks python apps doing I/O on UTF-8 source
files. In particular this broke glib-mkenums
Traceback (most recent call last):
File "/usr/bin/glib-mkenums", line 669, in <module>
process_file(fname)
File "/usr/bin/glib-mkenums", line 406, in process_file
line = curfile.readline()
File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 849: ordinal not in range(128)
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
If the image format cannot be determined for a screenshot filename,
simply return an error informing the user that this is not a valid image
format.
In the past, if we couldn't determine the file type, we simply saved it
as a PNG, and appended a ".png" file extension to the filename. This has
several problems. First, it can result in some oddly-named files (e.g. a
screenshot named 'Screenshot.pdf.png').
Second, modifying the filename that is returned from the GtkFileChooser
undermines the overwrite-confirmation functionality that is built into
the gtk file chooser. When the user specifies a filename in the file
chooser dialog, the chooser will automatically check whether a file of
that name exists, and if it does, it will display a dialog asking
whether the user wants to overwrite it. But if we then append a ".png"
extension to the filename and save it, we may be overwriting an existing
file without warning. By returning an error for unrecognized file types,
we avoid this problem.
Resolves: rhbz#1455832
Currently, the user gets no feedback if the screenshot fails (e.g. if
they don't have permission to write in the chosen directory, etc). This
patch adds a simple dialog showing the error message when a screenshot
fails.
Since the code attempts to append ".png" to filenames without an
extension, it doesn't make much sense to have the default filename be
extensionless. Including the extension on the default filename makes
things more straightforward.
Related: rhbz#1455832
Otherwise, in kiosk mode, it'll be hidden from user.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1459800
Signed-off-by: Victor Toso <victortoso@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>