1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-28 15:32:50 -05:00

Merge branch 'master' of github.com:bbedward/DankMaterialShell

This commit is contained in:
bbedward
2025-09-07 19:42:34 -04:00
4 changed files with 208 additions and 8 deletions

View File

@@ -177,6 +177,9 @@ PanelWindow {
Component.onCompleted: {
text = SessionData.notepadContent
root.currentFileName = SessionData.notepadCurrentFileName
root.currentFileUrl = SessionData.notepadCurrentFileUrl
root.lastSavedFileContent = SessionData.notepadLastSavedContent
}
Connections {
@@ -237,6 +240,10 @@ PanelWindow {
root.currentFileUrl = ""
root.hasUnsavedChanges = false
root.lastSavedFileContent = ""
SessionData.notepadCurrentFileName = ""
SessionData.notepadCurrentFileUrl = ""
SessionData.notepadLastSavedContent = ""
SessionData.saveSettings()
}
break
case Qt.Key_A:
@@ -326,6 +333,10 @@ PanelWindow {
root.currentFileUrl = ""
root.hasUnsavedChanges = false
root.lastSavedFileContent = ""
SessionData.notepadCurrentFileName = ""
SessionData.notepadCurrentFileUrl = ""
SessionData.notepadLastSavedContent = ""
SessionData.saveSettings()
}
}
}
@@ -408,6 +419,10 @@ PanelWindow {
if (exitCode === 0) {
root.hasUnsavedChanges = false
root.lastSavedFileContent = SessionData.notepadContent
SessionData.notepadCurrentFileName = root.currentFileName
SessionData.notepadCurrentFileUrl = root.currentFileUrl.toString()
SessionData.notepadLastSavedContent = root.lastSavedFileContent
SessionData.saveSettings()
} else {
console.warn("Notepad: Failed to save file, exit code:", exitCode)
}
@@ -422,6 +437,10 @@ PanelWindow {
SessionData.notepadContent = text
root.hasUnsavedChanges = false
root.lastSavedFileContent = text
SessionData.notepadCurrentFileName = root.currentFileName
SessionData.notepadCurrentFileUrl = root.currentFileUrl.toString()
SessionData.notepadLastSavedContent = text
SessionData.saveSettings()
}
}
@@ -465,6 +484,10 @@ PanelWindow {
root.currentFileUrl = ""
root.hasUnsavedChanges = false
root.lastSavedFileContent = ""
SessionData.notepadCurrentFileName = ""
SessionData.notepadCurrentFileUrl = ""
SessionData.notepadLastSavedContent = ""
SessionData.saveSettings()
})
} else if (root.pendingAction === "open") {
Qt.callLater(() => {
@@ -617,6 +640,10 @@ PanelWindow {
root.currentFileUrl = ""
root.hasUnsavedChanges = false
root.lastSavedFileContent = ""
SessionData.notepadCurrentFileName = ""
SessionData.notepadCurrentFileUrl = ""
SessionData.notepadLastSavedContent = ""
SessionData.saveSettings()
} else if (root.pendingAction === "open") {
root.fileDialogOpen = true
loadBrowser.open()

View File

@@ -80,7 +80,7 @@ Rectangle {
return
}
const keyBase = (w.appId || w.class || w.windowClass || "unknown").toLowerCase()
const keyBase = (w.app_id || w.appId || w.class || w.windowClass || "unknown").toLowerCase()
const key = isActiveWs ? `${keyBase}_${i}` : keyBase
if (!byApp[key]) {