1693 Commits

Author SHA1 Message Date
Daniel P. Berrangé
5a0bf52d73 src: introduce public helpers for changing cd and screenshot dialogs
This decouples the functional implementation from the UI controls that
trigger it.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-19 12:36:07 +00:00
Daniel P. Berrangé
049f93d90a src: introduce public helpers for about and guest details dialogs
This decouples the functional implementation from the UI controls that
trigger it.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-19 12:36:07 +00:00
Daniel P. Berrangé
825975d2e7 src: introduce public helpers for changing zoom levels
This decouples the functional implementation from the UI controls that
trigger it.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-19 12:36:07 +00:00
Daniel P. Berrangé
29d0c7cecd src: decouple accelerators array from actions array
We will be adding many more actions shortly, so cannot keep the two
arrays' sizes in sync.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-19 12:36:07 +00:00
Daniel P. Berrangé
ef6485c63e src: remove conditional test when setting USB reset accelerator
The first time this method is called we know that
usb_device_reset_accel_valid will be FALSE.

The other times this method is called all pass override=TRUE.

Thus the conditional test in virt_viewer_set_usb_device_reset_accel
always evaluates to TRUE and thus can be removed.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-19 12:36:07 +00:00
Eduard Lucena
bb51ddb72f Translated using Weblate (Spanish)
Currently translated at 83.7% (150 of 179 strings)

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

Signed-off-by: Eduard Lucena <eduardlucena@gmail.com>
2021-02-19 00:06:53 +01:00
Igor Gorbounov
8199a74091 Translated using Weblate (Russian)
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/ru/

Signed-off-by: Igor Gorbounov <igor.gorbounov@gmail.com>
2021-02-19 00:06:53 +01:00
Daniel P. Berrangé
efbc5f9c91 src: build as a GUI app
This hides the console window when running on Windows platforms

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-18 22:41:00 +00:00
Daniel P. Berrangé
e71c72490d src: replace deprecated GtkVBox with GtkBox
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-18 14:21:36 +00:00
Daniel P. Berrangé
71d146f3d0 src: recreate .ui files with latest glade
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-18 14:21:36 +00:00
Daniel P. Berrangé
eb9dffbbd9 src: set min gtk to 3.18 to match glib 2.48 vintage
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-18 14:21:36 +00:00
Daniel P. Berrangé
6c6af77fdd src: remove setting of resize grip property
This API is deprecated since GTK 3.14 as the concept has been removed.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-18 14:21:36 +00:00
Daniel P. Berrangé
496f99f5da src: remove deprecations squash for g_strv_contains
We rely on new enough glib version, so don't need to squash warnings.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-18 14:21:36 +00:00
Jakub Janků
5a55d43796 vnc-session: use g_signal_connect_object
If the VncDisplay emits a signal and the VirtViewerSessionVnc
instance is no longer valid, using the pointer inside one of the
callbacks can lead to segfault.

To prevent that, use g_signal_connect_object instead of
g_signal_connect.

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

Signed-off-by: Jakub Janků <jjanku@redhat.com>
2021-02-18 11:20:25 +01:00
Jakub Janků
8bc91ac80f session: remove "session-error" signal
This partially reverts commit de5cd71.

Problem with that commit is, that it practically renders
the "session-auth-*" signals from vnc session useless.
That's because gtk-vnc currently emits "vnc-error" before each
"vnc-auth-*" signal and the error callback in virt-viewer-app.c
calls virt_viewer_app_disconnected(), which in turn closes
the session.
As a consequence, virt-viewer never retries authentication
with vnc, it simply exits.

Since the last commit, vnc, similarly to spice, emits
"session-disconnected" with the appropriate error message. Thus
there's no need to maintain separate "session-error" signal
for now.

With vnc, this error message is shown to the user in a dialog,
if the disconnect happened during the init phase.
"session-auth-*" callbacks create their own dialogs, so
initialized must be set to TRUE to avoid having a dialog
displayed twice.

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

Signed-off-by: Jakub Janků <jjanku@redhat.com>
2021-02-18 11:20:22 +01:00
Jakub Janků
11ec065ce2 vnc-session: save message from "vnc-error" for "vnc-disconnected"
"vnc-error" is always followed by "vnc-disconnected".
So save the error message and use it in "vnc-disconnected" callback.

"session-disconnected" already allows us to set a string
with details on why the disconnection happened.

This approach is also similar to the one in spice session
(GError is saved in virt_viewer_session_spice_channel_destroyed).

Signed-off-by: Jakub Janků <jjanku@redhat.com>
2021-02-18 11:16:29 +01:00
Daniel P. Berrangé
942fc8c6fb src: remove G_BEGIN_DECLS / G_END_DECLS
None of our header files are installed for public use, so these macros
are not required.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-17 11:35:32 +00:00
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