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 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>
It hasn't bitten us (so hard) so far but would from the moment we add
support to app-menu/headerbar.
By not chaining-up to the parent's method, gtk_window_set_application()
is never called. This causes GApplication object not being able to load
the app-menu, but using the "fallback" which only contains the "Quit"
item.
By chaining-up to the parent's method, g_application_hold() call on
virt-viewer-app.c can be removed, as it is already called by the
parent's window_added() method.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
By the comment in the code:
"For the gtk2 build, we need to queue a resize even if the zoom level
hasn't changed. This is due to the fact that VirtViewerWindow will
queue a resize event for itself immediately after calling this
function (in order to shrink the window to fit the new display size
if necessary). If we don't queue a resize here, the window will become
tiny because we will only request 50x50 during the window resize."
And it doesn't happen on gtk3 at all. So, let's just remove the comment
and just quere the resize when zoom-changes actually happen.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
Since commit 01b66ef88b virt-viewer
does not crash on connection to a guest using an invalid display
configuration (eg. Cirrus & QXL vga). That commit allowed existence
of NULL display, however the code handling monitors alignment does
not expect this and crashes when virt-viewer is shifting/aligning
its windows.
Avoid crashing by returning early on NULL display.
#0 0x0000000000411d0a in displays_cmp (p1=p1@entry=0xbad940, p2=p2@entry=0xbad944, user_data=user_data@entry=0x8eb180) at virt-viewer-util.c:544
#1 0x00007ffff3f16ac5 in msort_with_tmp (p=0x7fffffffd670, b=0xbad940, n=2) at gqsort.c:93
#2 0x00007ffff3f16ded in msort_r (b=b@entry=0xbad940, n=n@entry=2, s=s@entry=4, cmp=cmp@entry=0x411ce0 <displays_cmp>, arg=arg@entry=0x8eb180) at gqsort.c:278
#3 0x00007ffff3f16e78 in g_qsort_with_data (pbase=pbase@entry=0xbad940, total_elems=total_elems@entry=2, size=size@entry=4, compare_func=compare_func@entry=0x411ce0 <displays_cmp>, user_data=user_data@entry=0x8eb180) at gqsort.c:303
#4 0x000000000041277c in virt_viewer_align_monitors_linear (displays=displays@entry=0x8eb180 = {...}) at virt-viewer-util.c:586
#5 0x000000000041a92d in virt_viewer_session_on_monitor_geometry_changed (self=0x8f38a0 [VirtViewerSessionSpice], display=<optimized out>) at virt-viewer-session.c:373
#6 0x00007ffff4415908 in g_closure_invoke (closure=0x9306c0, return_value=return_value@entry=0x0, n_param_values=2, param_values=param_values@entry=0x7fffffffd960, invocation_hint=invocation_hint@entry=0x7fffffffd900) at gclosure.c:801
#7 0x00007ffff4427a1d in signal_emit_unlocked_R (node=node@entry=0x668f80, detail=detail@entry=1551, instance=instance@entry=0x930440, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffd960) at gsignal.c:3627
#8 0x00007ffff442fab1 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffdaf0) at gsignal.c:3383
#9 0x00007ffff442fd9f in <emit signal notify:agent-connected on instance 0x930440 [SpiceMainChannel]> (instance=instance@entry=0x930440, signal_id=<optimized out>, detail=<optimized out>) at gsignal.c:3439
#10 0x00007ffff4419fd4 in g_object_dispatch_properties_changed (object=0x930440 [SpiceMainChannel], n_pspecs=<optimized out>, pspecs=<optimized out> at gobject.c:1061
#11 0x00007ffff441c4f9 in g_object_notify (pspec=<optimized out>, object=0x930440 [SpiceMainChannel]) at gobject.c:1155
#12 0x00007ffff441c4f9 in g_object_notify (object=0x930440 [SpiceMainChannel], property_name=<optimized out>) at gobject.c:1202
#13 0x00007ffff5a63dd0 in notify_main_context (opaque=0x7fffd6fde990) at gio-coroutine.c:240
#14 0x00007ffff3f07d7a in g_main_context_dispatch (context=0x68da40) at gmain.c:3152
#15 0x00007ffff3f07d7a in g_main_context_dispatch (context=context@entry=0x68da40) at gmain.c:3767
#16 0x00007ffff3f080b8 in g_main_context_iterate (context=0x68da40, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3838
#17 0x00007ffff3f0838a in g_main_loop_run (loop=0x710de0) at gmain.c:4032
#18 0x00007ffff5f53045 in gtk_main () at gtkmain.c:1207
#19 0x0000000000411a22 in main (argc=1, argv=0x7fffffffdfa8)
Resolves: rhbz#1250820
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
When virt-viewer is "Waiting for guest domain to start" and
the Ctrl- or Ctrl+ keys are pressed to zoom the blank display
virt-viewer will crash in virt_viewer_display_get_desktop_size
because of a NULL display pointer. To reproduce start virt-viewer
on a VM not running and zoom the display.
Signed-off-by: Charles Arnold <carnold@suse.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
This reverts commit 191f9a8ab4.
This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1342984.
Calling ImmDisableIME disable IME for the entire program.
On Windows 7 this also hide the keyboard application from the task bar
making impossible to switch keyboard while using remote viewer.
A recent commit in spice-gtk (7d881d2193bf5598b888a48bb4d8d7ad2e62f443,
"widget: Disable IME context on display widget") disable IME processing
just for SpiceDisplay. This avoid the above regression on Windows 7.
Not having this spice-gtk commit is not going to cause a huge
regression, so it's fine not to add strong coupling between this
commit and the spice-gtk commit which fixes this differently.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
So test-hotkeys include virt-viewer-app.h which includes
virt-viewer-window.h which includes virt-viewer-display.h which
in turn wants to include virt-viewer-enums.h. But, the enums
header file is generated at build time into builddir not srcdir.
Therefore it may happen if the two are distinct that compiler
fails to find the enums file:
In file included from ../../src/virt-viewer-window.h:29:0,
from ../../src/virt-viewer-app.h:28,
from ../../tests/test-hotkeys.c:27:
../../src/virt-viewer-display.h:28:31: fatal error: virt-viewer-enums.h: No such file or directory
#include "virt-viewer-enums.h"
^
compilation terminated.
The fix is to include builddir into paths where header files are
looked for.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
In function virt_viewer_display_vnc_new() we are calling
virt_viewer_signal_connect_object() which is defined in
virt-viewer-util module. However, the header file for the module
is never included.
CC libvirt_viewer_la-virt-viewer-display-vnc.lo
virt-viewer-display-vnc.c: In function 'virt_viewer_display_vnc_new':
virt-viewer-display-vnc.c:251:5: warning: implicit declaration of function 'virt_viewer_signal_connect_object' [-Wimplicit-function-declaration]
virt_viewer_signal_connect_object(app, "notify::enable-accel",
^
virt-viewer-display-vnc.c:251:5: warning: nested extern declaration of 'virt_viewer_signal_connect_object' [-Wnested-externs]
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
The hotkey is valid if it has a valid value. The value is valid if it is
not empty and is successfully parsed by gtk_accelerator_parse().
These hotkeys formats are considered invalid:
"key" - missing value
"key=" - missing value
"key=abcd" - value cannot be parsed by gtk_accelerator_parse()
Resolves: rhbz#1339572
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
It should be enabled only if the "release-cursor" sequence was not
specified (by using "--hotkeys=release-cursor=sequence"), otherwise
both sequences would release the cursor.
The solution is taken from the spice-display code.
Resolves: rhbz#1339575
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
The oVirt integration code in remote-viewer assumes that
the caller owns a reference on the OvirtApi instance returned
by ovirt_proxy_fetch_api{,finish}.
This is incorrect as these 2 API calls have always been documented as
being (transfer none). This was working so far because libgovirt was
leaking an OvirtApi reference. This bug is fixed upstream, so we now get
a warning on remote-viewer exit about trying to unref an invalid object.
This commit fixes that by taking the ref we expect in OvirtForeignMenu,
and by not releasing a ref we do not own in remote-viewer.c
If jsessionid is not set in the .vv file and we try to use anyway the
REST API, an authentication dialog will be shown by remote-viewer, which
is very unwelcome. If we don't have a jsessionid set, we know we won't
be able to silently login to the REST API, so don't try to set a foreign
menu when it's not set.
This program attempt multiple redirection combination:
- passing handles using either CreateProcess or SetStdHandle;
- having a console or not;
- redirection stdout/stderr yes or not.
Worth to mention that for running this test program the user will need
either a native MingW or Wine (with .exe executables enabled in Linux
binfmt).
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
This patch allows remote-viewer to redirect output/error streams to
files.
Also if launched from a console program (for instance from the command
prompt) you are able to see output from the console where you launch
the program.
This allow to launch the program with a syntax like:
> remote-viewer.exe --debug > log.txt 2>&1
or simply:
> remote-viewer.exe --debug
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
Instead of maintain a file which includes every single icon that we use
from adwaita-icon-theme (adwaita-icons-needed.wxi.in), let's depend on
mingw-adwaita-icon-theme directly.
It reduces considerably the maintainability and the risk to have missing
icons. Although, the size of the final binary gets increased from ~35MB
to ~50MB.
Resolves: rhbz#1301064
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
The only reason for us to keep maintaining the nsis installer was the
activex plugin (spicex), which requires those nsis based installers.
As the next release of RHEV/oVirt won't use the activex plugin (spicex)
let's completely remove the nsis installer from our tree and focus on
only maintain the msi installer.
oVirt/RHEV is shipping virt-viewer based on 2.0 release and, if needed,
they can stick to 3.0 branch in a future update (in case their plan goes
wrong and they end up needing the nsis support).
Related: rhbz#1324885 and rhbz#1316560
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
In order to avoid the situation where a dialog flashes onto the screen
and then is immediately hidden, I've added a couple timeouts to the
dialog.
The first is a 250ms timeout before showing the dialog. This avoids
showing the dialog at all for very small, quick transfers.
There is also a 500ms timeout before hiding a finished task. This
ensures that even transfers that only take e.g. 251ms to transfer will
get shown to the user for at least 500ms rather than being hidden 1ms
after showing the dialog.
Related: rhbz#1332180, rhbz#1324521
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
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>
virt-viewer _only_ supports guests that have either:
A) a signle graphics device with multiple displays (monitorid=0,
displayid=(0,1,2,3)).
B) multiple graphics device with a single display each
(monitorid=(0,1,2,3), displayid=0).
From now on, avoid crashing connecting to a guest which has a graphics
configuration that violates A or B. However, even avoiding the crash, we
cannot ensure the guest will work as expected.
Resolves: rhbz#1250820
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Spice release version 0.31 requires that only spice-client.h or
spice-client-gtk.h should be included directly. As a result,
compilation is now throwing warnings like:
warning: #warning "Only <spice-client.h> can be included directly" [-Wcpp]
warning: #warning "Only <spice-client-gtk.h> can be included directly" [-Wcpp]
This patch also bumps spice version requirement to 0.31, to ensure
those files are available.
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
virt-viewer-auth.h does not use any libvirt types, so the #include is
not needed, and virt-viewer-auth.h is used while building remote-viewer,
which do not use libvirt compilation flags. This caused failures on
a freshly installed box without libvirt headers.
oVirt storage domains can be in various states (inactive, in
maintainance, ...). We only want to show the ISOs it contains in the
foreign menu when the storage domain is actually active, not in the
other states.
https://bugzilla.redhat.com/show_bug.cgi?id=1310450
Don't keep trying to use a monitor config when it already failed for one
monitor, otherwise virt-viewer can end up in a situation where none of
the displays are enabled but the program is still running.
So, in case of any failure, let's skip the whole monitor config, forcing
virt-viewer to use the "fallback" one instead.
Resolves: rhbz#1315206
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
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>
Title currently says "About Glade". It's not a big deal because it's not
actually shown anywhere, but just for correctness let's change it to
"About Virt-Viewer".
Thanks Jonathon Jongsma for pointing this out.
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Since commit a9ce19f it has not been possible to check app version from
a tty without X session running. The issue is that gtk_get_option_group
function opens the default display if passed TRUE as argument.
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>