From 0ca8d46eae64ee777b5d97a83ee52cf15af6f098 Mon Sep 17 00:00:00 2001 From: miruka Date: Tue, 5 Jan 2021 10:30:29 -0400 Subject: [PATCH] Fix and rename "Sessions" keybinds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix refresh and sign out keybinds that were broken, and rename these in settings.py: - Keys.Sessions.refresh → Keys.Security.refresh - Keys.Sessions.sign_out_checked_or_all → Keys.Security.sign_out --- src/config/settings.py | 12 ++++++------ src/gui/Pages/AccountSettings/Security.qml | 19 ++++++++++--------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/config/settings.py b/src/config/settings.py index 40bbf91a..f11a987e 100644 --- a/src/config/settings.py +++ b/src/config/settings.py @@ -447,16 +447,16 @@ class Keys: # Toggle pausing for animated GIF images. pause = ["Space"] - class Sessions: - # These keybinds affect the session list in your account settings. + class Security: + # These keybinds affect the Security tab in your account settings. # # Currently unchangable keys: - # Tab/Shift+Tab or the arrow keys to navigate the list, - # Space to check/uncheck focused session, - # Menu to open the focused session's context menu. + # - Tab/Shift+Tab to navigate the interface + # - Space to check/uncheck a focused session + # - Menu to open the focused session's context menu # Refresh the list of sessions. refresh = ["Alt+R", "F5"] # Sign out checked sessions if any, else sign out all sessions. - sign_out_checked_or_all = ["Alt+S", "Delete"] + sign_out = ["Alt+S", "Delete"] diff --git a/src/gui/Pages/AccountSettings/Security.qml b/src/gui/Pages/AccountSettings/Security.qml index 03fcb859..da47e962 100644 --- a/src/gui/Pages/AccountSettings/Security.qml +++ b/src/gui/Pages/AccountSettings/Security.qml @@ -119,7 +119,8 @@ HColumnPage { header: HColumnLayout { readonly property alias exportButton: exportButton readonly property alias importButton: importButton - readonly property alias signOutCheckedButton: signOutCheckedButton + readonly property alias signOutButton: signOutButton + readonly property alias refreshButton: refreshButton spacing: theme.spacing x: spacing @@ -181,7 +182,7 @@ HColumnPage { ) Keys.onTabPressed: - signOutCheckedButton.enabled ? + signOutButton.enabled ? refreshButton.forceActiveFocus() : page.focusListController() } @@ -218,7 +219,7 @@ HColumnPage { } NegativeButton { - id: signOutCheckedButton + id: signOutButton enabled: deviceList.model.count > 0 text: deviceList.selectedCount === 0 ? @@ -276,8 +277,8 @@ HColumnPage { if (parent.currentIndex === 0) { parent.currentIndex = -1 - parent.headerItem.signOutCheckedButton.enabled ? - parent.headerItem.signOutCheckedButton.forceActiveFocus() : + parent.headerItem.signOutButton.enabled ? + parent.headerItem.signOutButton.forceActiveFocus() : parent.headerItem.importButton.forceActiveFocus() return @@ -302,13 +303,13 @@ HColumnPage { } HShortcut { - sequences: window.settings.keys.refreshDevices - onActivated: refreshButton.clicked() + sequences: window.settings.Keys.Security.refresh + onActivated: deviceList.headerItem.refreshButton.clicked() } HShortcut { - sequences: window.settings.keys.signOutCheckedOrAllDevices - onActivated: signOutCheckedButton.clicked() + sequences: window.settings.Keys.Security.sign_out + onActivated: deviceList.headerItem.signOutButton.clicked() } FlickShortcuts {