Commit Graph

7 Commits

Author SHA1 Message Date
Paul Donohue
0a997601ab src: Unify hotkey setup from command line and config file
This is mostly just code de-duplication and cleanup.  The only
functional change is that the case-sensitive accel support from the
command-line hotkey handling now also applies to the config file.

Signed-off-by: Paul Donohue <git@PaulSD.com>
2021-07-30 10:03:02 +00:00
Paul Donohue
64a2ecdfe3 tests: Disable smartcard hotkey test to work around CI issue
The next commit fixes a bug which was causing
gtk_application_get_accels_for_action() in
virt_viewer_update_smartcard_accels() to incorrectly return nothing.
Now that it is correctly working,
gtk_application_get_accels_for_action() is internally trying to call
gdk_keymap_get_for_display(), which fails if there is no available X11
display.  This causes the CI pipeline to fail since the CI pipeline
doesn't have an X11 display.

To work around this, disable the smartcard hotkey test.

Signed-off-by: Paul Donohue <git@PaulSD.com>
2021-07-30 10:03:02 +00: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é
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
Uri Lublin
8de1e49136 tests: hotkeys: add zoom hotkeys
Signed-off-by: Uri Lublin <uril@redhat.com>
2021-01-05 11:06:19 +02:00
Pavel Grunt
ffa460b8c6 app: Check validity of hotkey
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>
2016-06-02 11:04:02 +02:00
Pavel Grunt
9a3041eb00 tests: Add hotkeys test
Check if expected g_warning messages are logged.

Related: rhbz#1339572

Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2016-06-02 10:59:25 +02:00