From d25383673ee40d5a8b0ccdc664021abae77d5cca Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 26 Jul 2022 22:37:32 +0200 Subject: [PATCH] #2779 shortcut for showing the documentation --- fs/share/man/man1/xpra.1 | 2 ++ xpra/client/client_window_base.py | 3 +++ xpra/client/gtk_base/gtk_client_base.py | 4 ++++ xpra/scripts/config.py | 1 + 4 files changed, 10 insertions(+) diff --git a/fs/share/man/man1/xpra.1 b/fs/share/man/man1/xpra.1 index c08722083c..31d38f5a03 100644 --- a/fs/share/man/man1/xpra.1 +++ b/fs/share/man/man1/xpra.1 @@ -1388,6 +1388,8 @@ Shows the menu normally found in the system tray. Shows the start new command dialog. .IP \fBshow_shortcuts\fP Shows the list of shortcuts. +.IP \fBshow_docs\fP +Shows the documentation in a browser window. .IP \fBmagic_key\fP Placeholder which can be used by some client toolkits. .IP \fBvoid\fP diff --git a/xpra/client/client_window_base.py b/xpra/client/client_window_base.py index 272da82ab3..0a839b93a2 100644 --- a/xpra/client/client_window_base.py +++ b/xpra/client/client_window_base.py @@ -916,6 +916,9 @@ def show_file_upload(self, *args): def show_shortcuts(self, *args): self._client.show_shortcuts(*args) + def show_docs(self, *args): + self._client.show_docs(*args) + def log(self, message=""): log.info(message) diff --git a/xpra/client/gtk_base/gtk_client_base.py b/xpra/client/gtk_base/gtk_client_base.py index 2e93dcf447..36c7d32082 100644 --- a/xpra/client/gtk_base/gtk_client_base.py +++ b/xpra/client/gtk_base/gtk_client_base.py @@ -641,6 +641,10 @@ def show_about(self, *_args): force_focus() about() + def show_docs(self, *_args): + from xpra.scripts.main import run_docs + run_docs() + def show_shortcuts(self, *_args): if self.shortcuts_info and not self.shortcuts_info.is_closed: force_focus() diff --git a/xpra/scripts/config.py b/xpra/scripts/config.py index 82899ecf2e..8212ad0498 100755 --- a/xpra/scripts/config.py +++ b/xpra/scripts/config.py @@ -826,6 +826,7 @@ def get_default_key_shortcuts(): (True, "#+F4:quit"), (True, "#+F5:show_window_info"), (True, "#+F6:show_shortcuts"), + (True, "#+F7:show_docs"), (True, "#+F10:magic_key"), (True, "#+F11:show_session_info"), (True, "#+F12:toggle_debug"),