Disable SidePane shortcuts when no account present

This commit is contained in:
miruka 2019-08-23 11:06:19 -04:00
parent 7eda87217c
commit 8ebd7189cc

View File

@ -35,33 +35,39 @@ HShortcutHandler {
// SidePane // SidePane
HShortcut { HShortcut {
enabled: mainUI.accountsPresent
sequences: settings.keys.focusSidePane sequences: settings.keys.focusSidePane
onPressed: mainUI.sidePane.setFocus() onPressed: mainUI.sidePane.setFocus()
} }
HShortcut { HShortcut {
enabled: mainUI.accountsPresent
sequences: settings.keys.clearRoomFilter sequences: settings.keys.clearRoomFilter
onPressed: mainUI.sidePane.paneToolBar.roomFilter = "" onPressed: mainUI.sidePane.paneToolBar.roomFilter = ""
} }
HShortcut { HShortcut {
enabled: mainUI.accountsPresent
sequences: settings.keys.addNewAccount sequences: settings.keys.addNewAccount
onPressed: mainUI.sidePane.paneToolBar.addAccountButton.clicked() onPressed: mainUI.sidePane.paneToolBar.addAccountButton.clicked()
} }
HShortcut { HShortcut {
enabled: mainUI.accountsPresent
sequences: settings.keys.goToPreviousRoom sequences: settings.keys.goToPreviousRoom
onPressed: mainUI.sidePane.accountRoomList.previous() onPressed: mainUI.sidePane.accountRoomList.previous()
onHeld: pressed(event) onHeld: pressed(event)
} }
HShortcut { HShortcut {
enabled: mainUI.accountsPresent
sequences: settings.keys.goToNextRoom sequences: settings.keys.goToNextRoom
onPressed: mainUI.sidePane.accountRoomList.next() onPressed: mainUI.sidePane.accountRoomList.next()
onHeld: pressed(event) onHeld: pressed(event)
} }
HShortcut { HShortcut {
enabled: mainUI.accountsPresent
sequences: settings.keys.toggleCollapseAccount sequences: settings.keys.toggleCollapseAccount
onPressed: mainUI.sidePane.accountRoomList.toggleCollapseAccount() onPressed: mainUI.sidePane.accountRoomList.toggleCollapseAccount()
} }