Commit Graph

1662 Commits

Author SHA1 Message Date
Daniel P. Berrangé
e382c931fd src: convert VirtViewerApp to G_DECLARE_DERIVABLE_TYPE
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-17 11:35:32 +00:00
Daniel P. Berrangé
99f6cd7f87 src: convert VirtViewerDisplayVnc to G_DECLARE_FINAL_TYPE
This removes the use of a private data struct.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-17 11:35:32 +00:00
Daniel P. Berrangé
45b03df8b8 src: convert VirtViewerDisplaySpice to G_DECLARE_FINAL_TYPE
This removes the use of a private data struct.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-17 11:35:32 +00:00
Daniel P. Berrangé
8519b2f737 src: convert VirtViewerDisplayVte to G_DECLARE_FINAL_TYPE
This removes the use of a private data struct.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-17 11:35:32 +00:00
Daniel P. Berrangé
4e4bd0d67f src: convert VirtViewerDisplay to G_DECLARE_DERIVABLE_TYPE
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-17 11:35:32 +00:00
Daniel P. Berrangé
10b2850d70 src: convert VirtViewerWindow to G_DECLARE_FINAL_TYPE
This removes the use of a private data struct.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-17 11:35:32 +00:00
Daniel P. Berrangé
7a71409028 build: bump min required glib to 2.48
All our targetted distros have this vintage glib letting us remove some
compat code, and introduce future use of new features.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-17 11:35:32 +00:00
Daniel P. Berrangé
b5cf22481f build: fix formatting of build id parameter for wxs file
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-15 00:12:34 +00:00
Daniel P. Berrangé
5400e86e4d rpm: fix passing of build-id parameter
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-15 00:12:34 +00:00
Daniel P. Berrangé
253a14f754 build-aux: fix typo in ovirt conditional for MSI build
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-15 00:12:34 +00:00
Daniel P. Berrangé
16a3d08d09 build: fix version in meson
The next version we're working on is going to be 10.0, not 3.0

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-15 00:12:34 +00:00
Shawn M. Chapla
bda6dbbecf Don't double attach accels on enable window mods
Check whether accels are currently attached to a window before attaching
them when enabling window modifiers.

This commit fixes an assert in _gtk_accel_group_attach introduced by
cfcac9fb, which erroneously assumed that is harmless to re-add accel
groups that have already been added to a window.

Signed-off-by: Shawn M. Chapla <schapla@codeweavers.com>
2021-02-14 14:51:06 -05:00
玉堂白鹤
70b90370e2 Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 100.0% (179 of 179 strings)

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

Signed-off-by: 玉堂白鹤 <yjwork@qq.com>
2021-02-05 14:40:12 +01:00
Daniel P. Berrangé
1f814df294 build: remove all traces of autotools build recipes
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-25 16:02:48 +00:00
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