From 31e45452d9932579dae5a4c2cfc794ccaf3a35f4 Mon Sep 17 00:00:00 2001 From: Levi Neely <141506390+lneely@users.noreply.github.com> Date: Wed, 8 Jul 2026 19:28:59 +0200 Subject: [PATCH] fix(kf5): open folder dialog before creating session --- plasmoid/contents/ui/main-kf5.qml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/plasmoid/contents/ui/main-kf5.qml b/plasmoid/contents/ui/main-kf5.qml index e016a65..8f374fe 100644 --- a/plasmoid/contents/ui/main-kf5.qml +++ b/plasmoid/contents/ui/main-kf5.qml @@ -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" } } }