Commit Graph

1598 Commits

Author SHA1 Message Date
Daniel P. Berrangé
8eb7ff6688 gitlab: don't block container / build jobs on DCO check
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-25 16:02:48 +00:00
Daniel P. Berrangé
f03e009eb7 gitlab: convert CI to use meson instead of autotools
A new 'codestyle' job is added for syntax-check, since that is not run
as part of the 'dist' target.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-25 16:02:48 +00:00
Daniel P. Berrangé
ef2a679d69 build: convert release script over to use meson
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-25 16:02:48 +00:00
Daniel P. Berrangé
1f701aae66 rpm: convert the RPM builds over to using meson
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-25 16:02:48 +00:00
Daniel P. Berrangé
b2c072cf0b build: introduce meson build recipes
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-25 16:02:48 +00:00
Daniel P. Berrangé
f21cb3d233 icons: install svg files into the "scalable" directory
The USB SVG was mistakenly installed into a size specific dir, while the
main logo was not installed at all.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-22 16:14:40 +00:00
Daniel P. Berrangé
3a57d746a6 src: ensure all spice channel types have enum cases
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-22 16:14:40 +00:00
Daniel P. Berrangé
eb3641f347 src: simplify some conditionals related to features lacking on Windows
This avoids the need to probe for them prior to build.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-22 16:14:40 +00:00
Daniel P. Berrangé
c78adca86f src: mark argc/argv unused in windows command line wrapper
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-22 16:14:40 +00:00
Daniel P. Berrangé
0fdd3ed563 src: avoid warning about strncpy without trailing NUL
We know that the destination will already have a trailing NUL after the
three characters we're copying. The compiler can't see this though and
warns about lack of NUL termination.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-22 16:14:40 +00:00
Daniel P. Berrangé
f6007cfad1 src: enable more format string validation at build time
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-22 16:14:40 +00:00
Daniel P. Berrangé
24bf4c998d src: switch to use G_GNUC_FALLTHROUGH macros
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-22 16:14:40 +00:00
Daniel P. Berrangé
45dd26ece2 src: add missing COMMON_CFLAGS to libvirt_viewer_util.la
This ensures that G_LOG_DOMAIN is used in all places, and in turns
highlights a bug in the test suite.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-22 16:14:40 +00:00
Daniel P. Berrangé
0dab000823 src: remove use of 'volatile' from enum type decl
This avoids warnings with latest glib/gcc

src/virt-viewer-enums.c: In function ‘virt_viewer_display_show_hint_flags_get_type’:
/usr/include/glib-2.0/glib/gatomic.h:112:5: error: argument 2 of ‘__atomic_load’ discards ‘volatile’ qualifier [-Werror=incompatible-pointer-types]
  112 |     __atomic_load (gapg_temp_atomic, &gapg_temp_newval, __ATOMIC_SEQ_CST); \
      |     ^~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gthread.h:260:7: note: in expansion of macro ‘g_atomic_pointer_get’
  260 |     (!g_atomic_pointer_get (location) &&                             \
      |       ^~~~~~~~~~~~~~~~~~~~
src/virt-viewer-enums.c:34:7: note: in expansion of macro ‘g_once_init_enter’
   34 |   if (g_once_init_enter (&g_define_type_id__volatile))
      |       ^~~~~~~~~~~~~~~~~

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-22 16:14:40 +00:00
Daniel P. Berrangé
041857e677 tests: ensure compiler knows the argv[0] is non-NULL
../tests/redirect-test.c
/usr/i686-w64-mingw32/sys-root/mingw/include/winbase.h: In function 'WinMain':
../../tests/redirect-test.c:318:5: error: '%s' directive argument is null [-Werror=format-overflow=]
  318 |     fprintf(log_f, "argc %d argv[0] %s \n", argc, argv[0]);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../tests/redirect-test.c:318:5: error: '%s' directive argument is null [-Werror=format-overflow=]

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-22 16:14:40 +00:00
Daniel P. Berrangé
7f9aba52c7 build: remove obsolete minimize-po.pl script
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-22 16:14:40 +00:00
Daniel P. Berrangé
98c2628f44 build: merge all syntax-check logic into one file
The gnulib syntax-check rules are spread across GNUmakefile, cfg.mk and
maint.mk. This made sense when we were getting two of the files from the
gnulib submodule. Now that we own all files though, we can at least
merge maint.mk and cfg.mk together. GNUmakefile can be eliminated when
we switch to meson.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-22 16:14:40 +00:00
Daniel P. Berrangé
c8384180c8 build: delete all syntax check rules we're skipping
If we've marked rules as skipped, there's no sense keeping them in the
maint.mk file.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-22 16:14:40 +00:00
Daniel P. Berrangé
e30f842b24 build: remove all logic unrelated to syntax-check
The standard maint.mk from gnulib provides alot more than just the
'syntax-check' target. This can all be purged to give a more minimal
file.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-22 16:14:40 +00:00
Daniel P. Berrangé
a743d85c4e build: move cfg.mk and maint.mk into build-aux directory
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-22 16:14:40 +00:00
Daniel P. Berrangé
a95a5f71a7 rpm: remove obsolete desktop file script deps
This is handled automatically by RPM post-transaction.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-22 16:14:40 +00:00
Daniel P. Berrangé
0e2051ac21 rpm: remove dep on update-alternatives
This is obsolete since the removal of the spice-xpi helper

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-22 16:14:40 +00:00
Daniel P. Berrangé
d4b37dac04 rpm: don't subsititute in package name
This is always a fixed constant.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-22 16:14:40 +00:00
Daniel P. Berrangé
15cd58093a rpm: drop rule for obsleting spice-client
The old package has been gone for long enough.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-22 16:14:40 +00:00
Daniel P. Berrangé
a47eb848c1 rpm: remove conditionals for spice/ovirt/bash-completion
We can assume that we have a new enough distro for all these features.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-22 16:14:40 +00:00
Daniel P. Berrangé
db6c067c93 rpm: use https for URLs
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-22 16:14:40 +00:00
Daniel P. Berrangé
f36bd36667 rpm: remove version numbers from deps
We can assume that the distros we target have sufficiently new versions
of all our dependencies.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-22 16:14:40 +00:00
Daniel P. Berrangé
d1ed3d4e75 gitlab: refresh container images
This replaces opensuse 15.1 with 15.2

This bring in the missing vte package dep

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-22 16:14:40 +00:00
Uri Lublin
74fdd26c94 vnc: no dialog for server-closed-connection error
Following commit de5cd71, when the server closes the connection
(likely when qemu-kvm exits), a dialog is shown to the user.

This behavior change is not good for automatic tests that expect
virt-viewer to exit without any dialog.

This patch makes sure no dialog is shown for this error, by
checking if the VNC connection was already initialized.

Signed-off-by: Uri Lublin <uril@redhat.com>
2021-01-18 22:48:47 +02:00
Daniel P. Berrangé
696b835911 gitlab: convert to use meson for libvirt-glib
https://gitlab.com/libvirt/libvirt-glib/-/issues/2
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-12 20:05:44 +00:00
Uri Lublin
7c442b60b3 zoom hotkeys: disable numpad when users set new hotkeys
If a user sets any hotkey, disable numpad hotkeys.
If a user does not set any hotkey and the default hotkeys
are enabled, then numpad hotkeys are enabled too.

This is a folloup for commits a40c8f4 and e89e82e + 8cc0667.
Currently setting (e.g. ctrl [123]) hotkeys for zoom (in/out/reset),
re-enable the default numpad hotkeys (ctrl [+-0]).

Related to: https://bugzilla.redhat.com/show_bug.cgi?id=1791261

Suggested-by: Jakub Janků <jjanku@redhat.com>
Signed-off-by: Uri Lublin <uril@redhat.com>
2021-01-12 12:13:05 +00:00
Daniel P. Berrangé
b23b53a728 gitlab: update build rules for changed gtk-vnc meson options
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-11 17:01:38 +00:00
Uri Lublin
ae3e15f851 man: add zoom hotkeys
Signed-off-by: Uri Lublin <uril@redhat.com>
2021-01-05 11:06:19 +02:00
Uri Lublin
8de1e49136 tests: hotkeys: add zoom hotkeys
Signed-off-by: Uri Lublin <uril@redhat.com>
2021-01-05 11:06:19 +02:00
Uri Lublin
8cc0667023 hotkeys: enable setting zoom hotkeys from a vv file
Signed-off-by: Uri Lublin <uril@redhat.com>
2021-01-05 11:06:19 +02:00
Uri Lublin
e89e82eeb9 hotkeys: enable setting zoom hotkeys from command line
Signed-off-by: Uri Lublin <uril@redhat.com>
2021-01-05 11:06:19 +02:00
Weblate
5952d51dd8 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: virt-viewer/virt-viewer
Translate-URL: https://translate.fedoraproject.org/projects/virt-viewer/virt-viewer/

Signed-off-by: Fedora Weblate Translation <i18n@lists.fedoraproject.org>
2021-01-04 17:05:30 +01:00
Andika Triwidada
d2dca584c0 Translated using Weblate (Indonesian)
Currently translated at 27.9% (50 of 179 strings)

Translation: virt-viewer/virt-viewer
Translate-URL: https://translate.fedoraproject.org/projects/virt-viewer/virt-viewer/id/

Signed-off-by: Andika Triwidada <andika@gmail.com>

Translated using Weblate (Indonesian)

Currently translated at 13.9% (25 of 179 strings)

Translation: virt-viewer/virt-viewer
Translate-URL: https://translate.fedoraproject.org/projects/virt-viewer/virt-viewer/id/

Signed-off-by: Andika Triwidada <andika@gmail.com>

Translated using Weblate (Indonesian)

Currently translated at 2.7% (5 of 179 strings)

Translation: virt-viewer/virt-viewer
Translate-URL: https://translate.fedoraproject.org/projects/virt-viewer/virt-viewer/id/

Signed-off-by: Andika Triwidada <andika@gmail.com>

Added translation using Weblate (Indonesian)

Signed-off-by: Andika Triwidada <andika@gmail.com>
2021-01-04 17:05:30 +01:00
Jakub Janků
c3a3f23968 disable default grab sequence in kiosk mode
Hotkeys should be disabled in kiosk mode. However, if no
"release-cursor" hotkey is specified, the default Ctrl+Alt
grab sequence keeps functioning even in kiosk mode.
That's because it's based on the spice/vnc functionality instead
of on the accelerators in virt-viewer.

That's especially problematic with spice, because the grab
sequence releases both the cursor and the keyboard. Thus the user
can escape from kiosk mode by pressing Ctrl+Alt followed by
Alt+Tab, for example.

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1893584

Signed-off-by: Jakub Janků <jjanku@redhat.com>
2021-01-04 13:33:34 +00:00
Daniel P. Berrangé
1e18203e55 ci: refresh containers for CentOS-8 PowerTools repo rename
A recent CentOS-8 update renamed the "PowerTools" repo to "powertools"
and since dnf is case sensitive wrt repo names, this broke ability to
build new containers.

The refresh fixes the repo name and pulls in other misc improvements
to containers.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-12-15 10:43:40 +00:00
Daniel P. Berrangé
dae506032f gitlab: rename dockerfiles to have a "ci-" prefix
This means the dockerfile has the same name as the generated container
image.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-12-04 10:42:59 +00:00
Daniel P. Berrangé
bf29e894c8 gitlab: refresh containers with lcitool for fully minimized base
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-12-04 10:42:59 +00:00
Daniel P. Berrangé
ab84b11b2d gitlab: re-generate container images from lcitool
This introduces Fedora 33 and removes some redundant packages.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-12-04 10:42:59 +00:00
Daniel P. Berrangé
3d3f0fbe26 gitlab: move dockerfiles into ci/containers sub-directory
This brings the repo into alignment with the main libvirt.git practice.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-12-04 10:42:59 +00:00
Jakub Janků
a40c8f4508 windows: fix nonuniform behavior of zoom hotkeys
If a vv file is used or the hotkeys are customized using the
--hotkeys cmd option, all hotkeys that are not explicitly
requested get disabled, this includes the zomm hotkeys.

As a consequence, the labels for zoom actions in the menu
disappear. However, the user can still perform these actions
using the keys on the numpad which are handled separately.

To fix it, check that the normal zoom hotkeys are enabled
before enabling the keypad ones.

Related to: https://bugzilla.redhat.com/show_bug.cgi?id=1791261

Signed-off-by: Jakub Janků <jjanku@redhat.com>
2020-12-03 14:50:26 +01:00
Shawn M. Chapla
d5e96a30cb Don't re-enable kiosk mode in virt_viewer_window_show
There is nothing that would disable any aspect of kiosk mode that would
ever need to be enabled with a call to virt_viewer_window_show. To the
contrary, "re-enabling" kiosk mode in virt_viwer_window_show can, in
certain cases, result in accels becoming disable despite the keyboard
being released.

Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
2020-11-26 19:48:21 +00:00
Shawn M. Chapla
cfcac9fb9d Add all accel groups when enabling window mods
Previously, enabling window modifiers would only add accel groups that
had presumably been disabled to the window in question. This was fragile
and caused bad behavior in cases when the criteria for whether or not an
accel group should be enabled changed between the time the groups were
disabled and re-enabled, potentially leading to certain groups never
being re-added. There is no harm in adding accel groups that are already
added to a window, so this change simply eliminates the unnecessary
check.

Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
2020-11-26 19:48:20 +00:00
Shawn M. Chapla
6af952adb9 Disable all accels when not grabbed in kiosk mode
Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
2020-11-26 19:48:20 +00:00
Shawn M. Chapla
f08cb607a4 Add "USB device reset" accel
Adds a "USB device reset" default keyboard shortcut (ctrl+shift+r), as
well as the option to override this shortcut with the --hotkeys opt.
Updates documentation accordingly.

Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
2020-11-26 18:22:23 +00:00
Shawn M. Chapla
1608dabd9f Add "USB device reset" option to File menu
Adds a "USB device reset" option to the File menu. When selected, "USB
device reset" will disconnect and reconnect all currently connected USB
devices.

Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
2020-11-26 18:22:23 +00:00