summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-07-22 16:29:38 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-07-22 16:29:38 +1000
commit32ff695d9e2993fcc904a58b3f5486b2285e8825 (patch)
treec4e547a8f9f48e5c80a8dee6020a93a8d657b563 /services
parentfiledialog: add scrollbar (diff)
downloadcaelestia-shell-32ff695d9e2993fcc904a58b3f5486b2285e8825.tar.gz
caelestia-shell-32ff695d9e2993fcc904a58b3f5486b2285e8825.tar.bz2
caelestia-shell-32ff695d9e2993fcc904a58b3f5486b2285e8825.zip
filedialog: better icon filtering
Only thumbnail valid image types Also move wallpaper extensions into separate singleton in utils
Diffstat (limited to 'services')
-rw-r--r--services/Wallpapers.qml5
1 files changed, 2 insertions, 3 deletions
diff --git a/services/Wallpapers.qml b/services/Wallpapers.qml
index d72423b..2044c87 100644
--- a/services/Wallpapers.qml
+++ b/services/Wallpapers.qml
@@ -10,7 +10,6 @@ Searcher {
id: root
readonly property string currentNamePath: Paths.strip(`${Paths.state}/wallpaper/path.txt`)
- readonly property list<string> extensions: ["jpg", "jpeg", "png", "webp", "tif", "tiff"]
property bool showPreview: false
readonly property string current: showPreview ? previewPath : actualCurrent
@@ -89,7 +88,7 @@ Searcher {
running: true
command: ["find", Paths.expandTilde(Config.paths.wallpaperDir), "-type", "d", "-path", '*/.*', "-prune", "-o", "-not", "-name", '.*', "-type", "f", "-print"]
stdout: StdioCollector {
- onStreamFinished: wallpapers.model = text.trim().split("\n").filter(w => root.extensions.includes(w.slice(w.lastIndexOf(".") + 1))).sort()
+ onStreamFinished: wallpapers.model = text.trim().split("\n").filter(w => Images.isValidImageByName(w)).sort()
}
}
@@ -100,7 +99,7 @@ Searcher {
command: ["inotifywait", "-r", "-e", "close_write,moved_to,create", "-m", Paths.expandTilde(Config.paths.wallpaperDir)]
stdout: SplitParser {
onRead: data => {
- if (root.extensions.includes(data.slice(data.lastIndexOf(".") + 1)))
+ if (Images.isValidImageByName(data))
getWallsProc.running = true;
}
}