Commit 4d7de3df authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

katesession: Cleanup & fix launching by pressing enter

parent 76f61eca
......@@ -61,7 +61,7 @@ PlasmaComponents.ListItem {
}
maximumLineCount: 1
text: name.trim()
visible: !showInput // TypeRole: 0: Text, 1: Image, 2: Url
visible: !showInput
elide: Text.ElideRight
wrapMode: Text.Wrap
}
......
......@@ -16,7 +16,7 @@ PlasmaExtras.ScrollArea {
id: menu
property alias view: menuListView
property alias model: menuListView.model
signal itemSelected(string uuid)
signal itemSelected(string profileIdentifier)
ListView {
id: menuListView
......@@ -35,7 +35,7 @@ PlasmaExtras.ScrollArea {
delegate: KateSessionsItemDelegate {
width: menuListView.width
onItemSelected: menu.itemSelected(uuid)
onItemSelected: menu.itemSelected(profileIdentifier)
}
}
}
......@@ -79,10 +79,10 @@ Item {
case Qt.Key_Enter:
case Qt.Key_Return: {
if (sessionsMenu.view.currentIndex >= 0) {
const uuid = sessionsMenu.model.get(sessionsMenu.view.currentIndex).UuidRole
if (uuid) {
sessionsSource.serviceAction(uuid, "invoke")
sessionsMenu.view.currentIndex = 0
const profileIdentifier = sessionsMenu.model.get(sessionsMenu.view.currentIndex).profileIdentifier;
if (profileIdentifier) {
model.openProfile(profileIdentifier);
sessionsMenu.view.currentIndex = 0;
}
}
break;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment