Commit Graph

1826 Commits

Author SHA1 Message Date
Daniel P. Berrangé
3ae426e926 src: switch to using "#pragma once" for headers
We can rely on GCC/CLang and thus use this more concise approach

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-17 11:35:32 +00:00
Daniel P. Berrangé
25092c2122 src: centralize the editor indentation rules
Instead of repeating an emacs footer in every source file, use config
files in the root of the repository. This fixes the bug that several
source files are missing the indent rules.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-17 11:35:32 +00:00
Daniel P. Berrangé
396f31cb4b tests: convert VirtViewerTest to G_DECLARE_FINAL_TYPE
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-17 11:35:32 +00:00
Daniel P. Berrangé
aa8bb67972 src: convert OvirtForeignMenu 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é
622d5c2e3e src: convert RemoteViewerISOListDialog to G_DECLARE_FINAL_TYPE
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-17 11:35:32 +00:00
Daniel P. Berrangé
06b57ee1fe src: convert RemoteViewer 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é
5c8c6db41b src: convert VirtViewer 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é
080a6fefe2 src: convert VirtViewerFileTransferDialog 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é
58a8e71404 src: convert VirtViewerTimedRevealer 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é
18322a9551 src: convert VirtViewerNotebook 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é
4973411ed8 src: convert VirtViewerSessionVnc 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é
1985713f78 src: convert VirtViewerSessionSpice 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é
96c24fd9db src: convert VirtViewerSession 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é
025fbb2470 src: convert VirtViewerFile 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é
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