Add shortcut to add new chats
This commit is contained in:
parent
14ba4b50b5
commit
5d4840dcd8
|
@ -117,9 +117,9 @@ class UISettings(JSONConfigFile):
|
||||||
"startMuted": False,
|
"startMuted": False,
|
||||||
},
|
},
|
||||||
"keys": {
|
"keys": {
|
||||||
"startPythonDebugger": "Alt+Shift+D",
|
"startPythonDebugger": ["Alt+Shift+D"],
|
||||||
"toggleDebugConsole": "Alt+Shift+C",
|
"toggleDebugConsole": ["Alt+Shift+C"],
|
||||||
"reloadConfig": "Alt+Shift+R",
|
"reloadConfig": ["Alt+Shift+R"],
|
||||||
|
|
||||||
"scrollUp": ["Alt+Up", "Alt+K"],
|
"scrollUp": ["Alt+Up", "Alt+K"],
|
||||||
"scrollDown": ["Alt+Down", "Alt+J"],
|
"scrollDown": ["Alt+Down", "Alt+J"],
|
||||||
|
@ -132,7 +132,8 @@ class UISettings(JSONConfigFile):
|
||||||
|
|
||||||
"focusSidePane": ["Alt+S", "Ctrl+S"],
|
"focusSidePane": ["Alt+S", "Ctrl+S"],
|
||||||
"clearRoomFilter": ["Alt+Shift+S", "Ctrl+Shift+S"],
|
"clearRoomFilter": ["Alt+Shift+S", "Ctrl+Shift+S"],
|
||||||
"addNewAccount": ["Alt+N"],
|
"addNewChat": ["Alt+A"],
|
||||||
|
"addNewAccount": ["Alt+Shift+A"],
|
||||||
|
|
||||||
"goToLastPage": ["Ctrl+Tab"],
|
"goToLastPage": ["Ctrl+Tab"],
|
||||||
"goToPreviousRoom": ["Alt+Shift+Up", "Alt+Shift+K"],
|
"goToPreviousRoom": ["Alt+Shift+Up", "Alt+Shift+K"],
|
||||||
|
|
|
@ -54,7 +54,6 @@ HBox {
|
||||||
|
|
||||||
|
|
||||||
HRoomAvatar {
|
HRoomAvatar {
|
||||||
// TODO: click to change the avatar
|
|
||||||
id: avatar
|
id: avatar
|
||||||
clientUserId: userId
|
clientUserId: userId
|
||||||
displayName: nameField.text
|
displayName: nameField.text
|
||||||
|
|
|
@ -104,6 +104,12 @@ HShortcutHandler {
|
||||||
onPressed: mainUI.sidePane.toolBar.addAccountButton.clicked()
|
onPressed: mainUI.sidePane.toolBar.addAccountButton.clicked()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HShortcut {
|
||||||
|
enabled: mainUI.accountsPresent
|
||||||
|
sequences: settings.keys.addNewChat
|
||||||
|
onPressed: mainUI.sidePane.sidePaneList.addNewChat()
|
||||||
|
}
|
||||||
|
|
||||||
HShortcut {
|
HShortcut {
|
||||||
enabled: mainUI.accountsPresent
|
enabled: mainUI.accountsPresent
|
||||||
sequences: settings.keys.goToPreviousRoom
|
sequences: settings.keys.goToPreviousRoom
|
||||||
|
|
|
@ -72,6 +72,15 @@ HListView {
|
||||||
currentItem.item.activated()
|
currentItem.item.activated()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function addNewChat() {
|
||||||
|
if (! currentItem) incrementCurrentIndex()
|
||||||
|
|
||||||
|
pageLoader.showPage(
|
||||||
|
"AddChat/AddChat",
|
||||||
|
{userId: currentItem.item.delegateModel.user_id},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
function toggleCollapseAccount() {
|
function toggleCollapseAccount() {
|
||||||
if (! currentItem || filter) return
|
if (! currentItem || filter) return
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user