fix(kf5): open folder dialog before creating session
This commit is contained in:
parent
5ad224dfae
commit
31e45452d9
|
|
@ -25,6 +25,17 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
FileDialog {
|
||||
id: newSessionFolderDialog
|
||||
title: "Choose working directory for new session"
|
||||
selectFolder: true
|
||||
folder: dbus.activeCwd ? "file://" + dbus.activeCwd : shortcuts.home
|
||||
onAccepted: {
|
||||
var path = fileUrl.toString().replace("file://", "")
|
||||
dbus.createSession(path)
|
||||
}
|
||||
}
|
||||
|
||||
Plasmoid.status: dbus.sessions.length > 0
|
||||
? PlasmaCore.Types.ActiveStatus
|
||||
: PlasmaCore.Types.PassiveStatus
|
||||
|
|
@ -115,7 +126,7 @@ Item {
|
|||
|
||||
PlasmaComponents.ToolButton {
|
||||
icon.name: "list-add"
|
||||
onClicked: dbus.createSession("")
|
||||
onClicked: newSessionFolderDialog.open()
|
||||
PlasmaComponents.ToolTip { text: "New session" }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Reference in New Issue