From afceb7ebaed13dd680a1acfb8354b736a1fd2cc3 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sat, 18 Jan 2020 18:20:00 +0100 Subject: Dialog.c: show configured keystrokes in dialogs Instead of hardcoding the keystrokes in Dialog.h determine the currently configured keystrokes for the action and insert them into the dialog strings. Fixes ArcticaProject/nx-libs#438 --- nx-X11/programs/Xserver/hw/nxagent/Dialog.h | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Dialog.h') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Dialog.h b/nx-X11/programs/Xserver/hw/nxagent/Dialog.h index 42bba290d..2f503bc62 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Dialog.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Dialog.h @@ -174,7 +174,7 @@ nxagentFailedReconnectionMessage "\ The session is now running in desktop resize mode.\n\ You can resize the desktop by simply dragging the\n\ -desktop window's border. You can press Ctrl+Alt+R\n\ +desktop window's border. You can press %s\n\ again to disable this option.\ " @@ -187,9 +187,12 @@ again to disable this option.\ "\ The session is now running in viewport mode. You can\n\ navigate across different areas of the desktop window\n\ -by dragging the desktop with the mouse or by using the\n\ -arrows keys while pressing Ctrl+Alt. Press Ctrl+Alt+R\n\ -again to return to the desktop resize mode.\ +by dragging the desktop with the mouse while pressing\n\ +Ctrl+Alt or use the keystrokes listed below. Press\n\ +%s again to return to the desktop resize mode.\n\ +\n\ +Use these keystrokes to navigate:\n\ +%s\ " #define DIALOG_DISABLE_DESKTOP_RESIZE_MODE_TYPE "ok" @@ -201,7 +204,7 @@ again to return to the desktop resize mode.\ \ "\ Deferred screen updates are now enabled. You can press\n\ -Ctrl+Alt+E again to disable this option.\ +%s again to disable this option.\ " #define DIALOG_ENABLE_DEFER_MODE_TYPE "ok" @@ -213,7 +216,7 @@ Ctrl+Alt+E again to disable this option.\ \ "\ Deferred screen updates are now disabled. You can press\n\ -Ctrl+Alt+E to enable it again.\ +%s to enable it again.\ " #define DIALOG_DISABLE_DEFER_MODE_TYPE "ok" @@ -225,7 +228,7 @@ Ctrl+Alt+E to enable it again.\ \ "\ Keyboard auto-grabbing mode is now enabled. You can press\n\ -Ctrl+Alt+G again to disable auto-grabbing.\ +%s again to disable auto-grabbing.\ " #define DIALOG_ENABLE_AUTOGRAB_MODE_TYPE "ok" @@ -237,7 +240,7 @@ Ctrl+Alt+G again to disable auto-grabbing.\ \ "\ Keyboard auto-grabbing mode is now disabled. You can press\n\ -Ctrl+Alt+G again to re-enable auto-grabbing.\ +%s again to re-enable auto-grabbing.\ " #define DIALOG_DISABLE_AUTOGRAB_MODE_TYPE "ok" -- cgit v1.2.3 From f85e71a6ee2fa5229534ab595b9c7a9445412de1 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 1 Apr 2020 18:41:58 +0200 Subject: Dialog.h: Fix incomplete macro nxagentNoDialogIsRunning The autograb stuff had been forgotten. --- nx-X11/programs/Xserver/hw/nxagent/Dialog.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Dialog.h') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Dialog.h b/nx-X11/programs/Xserver/hw/nxagent/Dialog.h index 2f503bc62..0b8295158 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Dialog.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Dialog.h @@ -78,7 +78,9 @@ extern void nxagentTerminateDialogs(void); nxagentEnableRandRModeDialogPid == 0 && \ nxagentDisableRandRModeDialogPid == 0 && \ nxagentEnableDeferModePid == 0 && \ - nxagentDisableDeferModePid == 0) + nxagentDisableDeferModePid == 0 && \ + nxagentEnableAutograbModePid == 0 && \ + nxagentDisableAutograbModePid == 0) #define DECODE_DIALOG_TYPE(type) \ ((type) == DIALOG_KILL_SESSION ? "DIALOG_KILL_SESSION" : \ -- cgit v1.2.3 From b4b0a1a775b324c85ecf1361cb87e5e275cf0108 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 1 Apr 2020 18:42:53 +0200 Subject: Dialog.h: reformat comment --- nx-X11/programs/Xserver/hw/nxagent/Dialog.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Dialog.h') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Dialog.h b/nx-X11/programs/Xserver/hw/nxagent/Dialog.h index 0b8295158..b11df5045 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Dialog.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Dialog.h @@ -98,10 +98,9 @@ extern void nxagentTerminateDialogs(void); "UNKNOWN_DIALOG") /* - * Message to be showed to users when the close - * button is pressed. The right message is chosen - * according if session does or does not run in - * persistent mode. + * Message to be shown to users when the close button is pressed. The + * right message is chosen according if session does or does not run + * in persistent mode. */ #define DIALOG_KILL_SESSION_MESSAGE \ -- cgit v1.2.3