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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
When running 'remote-viewer' without arguments,
and selecting a non-supported protocol, e.g. ssh://foo,
the generated error was silently swallowed by the retry loop.
This was introduced in 06b2c382468876a19600374bd59475e66d488af8.
Signed-off-by: Christophe de Dinechin <cdupontd@redhat.com>
We must take into account that users can close the dialog at anytime,
even during an operation of fetch or set ISO has not been finished. This
will cause the callbacks for those operations to be invoked with an
invalid object, crashing the application.
To fix this issue we need to pass a GCancellable to the asynchronous
operations, so they can be cancelled if the dialog happens to get closed
before they complete.
NOTE: This patch triggers a deadlock in libgovirt when the dialog is
closed before the operation completes. Bug reported in
https://bugzilla.gnome.org/show_bug.cgi?id=777808. We will need to bump
libgovirt dependency whenever it has a new release.
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
It is needed to use the 'foreign' init option otherwise autotools
requires README
Fix make distcheck and spec file generation
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
Also moves 'Change CD' menu item from the toplevel menu to a subitem
under 'File' toplevel menu.
In order to avoid object interdependency, it is necessary to make the
ovirt foreign-menu pointer from RemoteViewer, accessible via property,
so it can be passed to the dialog as an opaque GObject.
Finally, with this commit, we clean up ovirt foreign menu code, which
only deals with data, leaving the UI bits to be handled properly in the
new ISO list dialog.
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
The motivation for this dialog started with rhbz #1310624, where it was
reported that foreign menu was causing too many debug messages to be
printed to the console, because remote viewer had a timeout of 5 seconds
to refresh the ISO list automatically.
As a workaround, the timeout was adjusted for 5 minutes, but it could
cause more problems, such as inconsistencies between what was shown by
remote viewer and what the server had configured.
Another issue caused by displaying the ISO files as a menu item was that
if the list was too long, it would take all the available space on the
screen. In the end, a menu item was not the correct choice of UI
component for this use case.
In order to solve both problems, we now present the ISO list as a
dedicated dialog, where the refresh of ISO list is triggered manually by
the user and the list is contained within the dialog, by displaying de
files in a treeview.
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Also, to keep consistency around the codebase, changed the return value
of ovirt_foreign_menu_get_current_iso_name() from char * to gchar *.
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Similar to the previous commit, the ISO dialog will fetch the result
asynchronously, rather than relying on the "notify::files" signal from
OvirtForeignMenu object. It also enables error to be shown if anything
goes wrong.
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
The #endif is closing a #ifdef HAVE_OVIRT block, while another one is
opened right next, so there is no need to have those lines. Also, due to
the large amount of source code in between, add a small comment on the
last #endif to identify what it refers to.
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Avoid showing the "Unknown" name in the guest detail dialog when
waiting for the domain to be started.
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
Instead of having a warning message telling the user that they can't
have more displays enabled in fullscreen than the number of physical
displays, let's just have it as a debug message.
Related: rhbz#1368390
Acked-by: Fabiano Fidêncio <fabiano@fidencio.org>
The display id in the warning log is now consistent with the display
id in the "view->displays->display x" menu item
Related: rhbz#1368390
Acked-by: Fabiano Fidêncio <fabiano@fidencio.org>
After all ongoing file transfers are finished, save a list of the file
transfer tasks that had errors and display the list of failed files to
the user so that they know that a failure occurred and can potentially
retry the transfer. Previously, we just failed silently so the user
may not have even been aware that the transfer failed.
When transferring a large number of files, the file transfer dialog was
unusable because the window size would be larger than the client
desktop. To solve this, remove the list of individual files (and the
ability to cancel each file transfer independantly) and only display
a single overall progress bar that shows the status of all ongoing
transfers.
This also allows us to remove the delayed unref of the task since we
don't need to show the task information about each individual transfer
task until the window is closed. Removes TaskFinishedData type.
This patch requires new API from spice-gtk to calculate the overall
progress:
spice_file_transfer_task_get_total_bytes()
spice_file_transfer_task_get_transferred_bytes()
rpmbuild -ta only works if the tar.gz contains a single
spec file, so remove the mingw-virt-viewer.spec from
dist.
We should however be including both the spec.in files.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Use switch/case instead of lots of conditional blocks
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
When using client-side decorations, as well as in certain other
situations (wayland, and windows in some cases), the window gradually
resizes larger and larger.
This is caused by a change in how gtk interprets the sizes passed to
gtk_window_resize(), particularly when client-side decorations (CSD) are
involved. For example, In the past this size was assumed to include the
size of the CSD, but now it it assumes that the sizes only represent the
size of the window's content, without any decorations. However,
gtk_widget_get_preferred_size() (when called on a GtkWindow*), returns a
size that includes the size of the CSD. So
virt_viewer_window_queue_resize() was essentially growing the window by
the size of the CSD every time it was called.
To work around this issue, we need to calculate the preferred size of
the window's child, not the size of the entire window (including CSD).
Then we add the width of the window's border (just to be safe) and pass
those values to gtk_window_resize().
Normally virt-viewer relies on the VNC/SPICE widget seeing
an EOF on its underlying connection to detect when the
session is closed.
When tunnelling to a remote guest over SSH though, this
EOF can be delayed for a very long time, leaving a dead
session open.
This can be seen with
virt-viewer -c qemu+ssh://remotehost/system guestname
when on the remote shell run
virsh destroy guestname
and notice that virt-viewer does not see the shutdown
immediately.
When we get a domain stopped event we know the session
should be dead, so forceably close it, if not already
closed.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
The following commit broke the display of the guest name in
the title for VNC displays:
commit 61a1bc4dcbb056755fe96c5945f84c1312041059
Author: Pavel Grunt <pgrunt@redhat.com>
Date: Wed Apr 15 13:50:35 2015 +0200
session-vnc: Set window for display to avoid gtk-vnc v0.3.8 crash
The VNC display widget of gtk-vnc v0.3.8 needs a window at the moment
The problem is that this causes the window to be associated
with the display before the guest name is available. Thus
when ensure_window_for_display() runs, the window is already
configured and so it never invokes the logic to set the title.
The fix is to unconditionally update the title in the
ensure_window_for_display() method, even if the window already
exists.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
When connecting to a RHEVM/oVirt machine through an expired vvfile the
user ends up in an endless loop of getting an error message, pressing
"Okay", re-scheduling a new connection retry. getting an error message
due to the expired vvfile and so on.
In order to avoid the issue, let's not re-schedule the connection retry
when the user tries to connect through a vvfile and it fails.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This is a temporary solution, as discussed in the bug. We will adjust
the timer to refresh the ISO list from 15 seconds to 5 minutes (300
seconds), while reworking in the UI to replace the menu with a dialog,
which seems a saner way to display the list.
Resolves: rhbz#1347726
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Here we added mnemonics for the buttons "Cancel" and "Connect" and also
for the "Connection Address" entry (as it was before moving this dialog
to a .ui file).
The "Recent connections" widget is left behind as GtkRecentChooserWidget
isn't suitable for mnemonic activation.
Resolves: rhbz#1351487
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
The "grab-notify" signal lets us know when our widget becomes
shadowed by a Gtk+ grab on another widget, or when it becomes unshadowed
due to a grab being removed.
That's exactly the case we face when dealing with "usb-redirection" and
"close" items of the fullscreen toolbar. And, currently, when these
widgets get closed the timed-revealer stays there forever. From now on
let's take advantage of the "grab-notify" signal and schedule a timeout
for the revealer when these widgets' windows get closed.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Since commit cc455b7f916110d7cfae6b7af753349e070c9494, the background
color has not been set correctly for Gtk+ 3.18 (Fedora 23), while it was
working fine for more recent version 3.20 (Fedora 24). Tracked down to
some changes in GtkNotebook code which can not be easily backported.
Instead of customizing background and foreground colors, let's just
stick with the default colors provided by theme.
Related https://bugs.freedesktop.org/show_bug.cgi?id=94276
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Adds metadata to be used with Gnome Software.
Includes name, summary, description and a few screenshots of remote-viewer.
Signed-off-by: Lukáš Venhoda <lvenhoda@redhat.com>
Acked-by: Daniel P. Berrange <berrange@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
VirtViewerTimedRevealer now derives from GtkEventBox/GtkContainer, so
it follows GTK+ conventions and takes ownership of the floating ref on
'toolbar'. Since VirtViewerWindow and VirtViewerTimedRevealer will have
the same lifespan, we don't need to own a reference on toolbar in
VirtViewerWindow.
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
As suggested by Christophe, inheriting from GtkEventBox instead of
having one instance of it as a member can help us to get rid of
virt_viewer_timed_revealer_get_overlay_widget().
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
VirtViewerTimedRevealer::evBox is created in
virt_viewer_timed_revealer_new() and will be passed to
gtk_container_add() through gtk_overlay_add_overlay(overlay,
virt_viewer_timed_revealer_get_overlay_widget(priv->revealer))
This means VirtViewerTimedRevealer does not own a reference on evBox,
and that it should not try to release it in
VirtViewerTimedRevealer::dispose()
Backtrace for the crash:
#0 0x00007ffff3e92c9d in g_type_check_instance_is_fundamentally_a () at /lib64/libgobject-2.0.so.0
#1 0x00007ffff3e722a5 in g_object_unref () at /lib64/libgobject-2.0.so.0
#2 0x000000000041ebe3 in virt_viewer_timed_revealer_dispose (object=0x1127320) at virt-viewer-timed-revealer.c:128
#3 0x00007ffff3e723b6 in g_object_unref () at /lib64/libgobject-2.0.so.0
#4 0x000000000041c040 in virt_viewer_window_dispose (object=0x981f70) at virt-viewer-window.c:191
#5 0x00007ffff3e723b6 in g_object_unref () at /lib64/libgobject-2.0.so.0
#6 0x0000000000413a58 in virt_viewer_app_display_removed (nth=<optimized out>, self=0x680330) at virt-viewer-app.c:989
#7 0x0000000000413a58 in virt_viewer_app_display_removed (session=<optimized out>, display=<optimized out>, self=0x680330) at virt-viewer-app.c:1000
#8 0x00007ffff3e705e0 in g_cclosure_marshal_VOID__OBJECTv () at /lib64/libgobject-2.0.so.0 #9 0x00007ffff3e6d784 in _g_closure_invoke_va () at /lib64/libgobject-2.0.so.0
#10 0x00007ffff3e88cd9 in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
#11 0x00007ffff3e897eb in g_signal_emit_by_name () at /lib64/libgobject-2.0.so.0
#12 0x0000000000418973 in virt_viewer_session_remove_display (session=0x9c6de0, display=0x961a90) at virt-viewer-session.c:463
#13 0x0000000000420934 in destroy_display (data=<optimized out>) at virt-viewer-session-spice.c:851
#14 0x00007ffff3b6d0eb in g_ptr_array_foreach () at /lib64/libglib-2.0.so.0
#15 0x00007ffff3b6d180 in ptr_array_free () at /lib64/libglib-2.0.so.0
#16 0x000000000042072a in virt_viewer_session_spice_clear_displays (self=0x9c6de0) at virt-viewer-session-spice.c:94
#17 0x000000000042240d in virt_viewer_session_spice_close (session=<optimized out>) at virt-viewer-session-spice.c:459
#18 0x0000000000414be5 in virt_viewer_app_quit (self=self@entry=0x680330) at virt-viewer-app.c:285
#19 0x0000000000415500 in virt_viewer_app_maybe_quit (self=0x680330, window=window@entry=0x981a90) at virt-viewer-app.c:481
#20 0x000000000041c4ad in virt_viewer_window_delete (src=<optimized out>, dummy=<optimized out>, self=0x981a90) at virt-viewer-window.c:771
#21 0x00007ffff61807f1 in _gtk_marshal_BOOLEAN__BOXEDv () at /lib64/libgtk-3.so.0
#22 0x00007ffff3e6d784 in _g_closure_invoke_va () at /lib64/libgobject-2.0.so.0
#23 0x00007ffff3e887b3 in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
#24 0x00007ffff3e8933f in g_signal_emit () at /lib64/libgobject-2.0.so.0
#25 0x00007ffff62dde6c in gtk_widget_event_internal () at /lib64/libgtk-3.so.0
#26 0x00007ffff617f5ef in gtk_main_do_event () at /lib64/libgtk-3.so.0
#27 0x00007ffff5c7dd25 in _gdk_event_emit () at /lib64/libgdk-3.so.0
#28 0x00007ffff5cae672 in gdk_event_source_dispatch () at /lib64/libgdk-3.so.0
#29 0x00007ffff3b9895a in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#30 0x00007ffff3b98d10 in g_main_context_iterate.isra () at /lib64/libglib-2.0.so.0
#31 0x00007ffff3b98dbc in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#32 0x00007ffff41643cd in g_application_run () at /lib64/libgio-2.0.so.0
#33 0x000000000040fc1a in main (argc=3, argv=0x7fffffffdec8) at virt-viewer-main.c:41
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
virt_viewer_timed_revealer_new calls gtk_container_add on the instance
returned by gtk_revealer_new so VirtViewerTimedRevealer does not own any
ref on this GtkRevealer instance. Unrefing it in _dispose() is thus wrong.
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>