Removed double Connections in settings.

This commit is contained in:
quadbyte 2025-08-14 23:50:41 -04:00
parent 3108b5b1a4
commit eac335ab95
3 changed files with 13 additions and 26 deletions

View file

@ -45,7 +45,7 @@ Singleton {
reload() reload()
} }
onLoaded: function () { onLoaded: function () {
console.log("[Settings] loaded") console.log("[Settings] Loaded")
Qt.callLater(function () { Qt.callLater(function () {
if (adapter.wallpaper.current !== "") { if (adapter.wallpaper.current !== "") {
console.log("[Settings] Set current wallpaper") console.log("[Settings] Set current wallpaper")
@ -181,17 +181,4 @@ Singleton {
} }
} }
} }
Connections {
target: adapter.wallpaper
function onIsRandomChanged() {
Wallpapers.toggleRandomWallpaper()
}
function onRandomIntervalChanged() {
Wallpapers.restartRandomWallpaperTimer()
}
function onDirectoryChanged() {
Wallpapers.loadWallpapers()
}
}
} }

View file

@ -9,7 +9,7 @@ Singleton {
id: root id: root
Component.onCompleted: { Component.onCompleted: {
console.log("[WP] Service initialized") console.log("[Wallpapers] Service initialized")
loadWallpapers() loadWallpapers()
// Wallpaper is set when the settings are loaded. // Wallpaper is set when the settings are loaded.
@ -23,7 +23,7 @@ Singleton {
property var randomChoices: ["simple", "fade", "left", "right", "top", "bottom", "wipe", "wave", "grow", "center", "any", "outer"] property var randomChoices: ["simple", "fade", "left", "right", "top", "bottom", "wipe", "wave", "grow", "center", "any", "outer"]
function loadWallpapers() { function loadWallpapers() {
console.log("[WP] Load Wallpapers") console.log("[Wallpapers] Load Wallpapers")
scanning = true scanning = true
wallpaperList = [] wallpaperList = []
// Unsetting, then setting the folder will re-trigger the parsing! // Unsetting, then setting the folder will re-trigger the parsing!
@ -32,7 +32,7 @@ Singleton {
} }
function changeWallpaper(path) { function changeWallpaper(path) {
console.log("[WP] changing to:", path) console.log("[Wallpapers] Changing to:", path)
setCurrentWallpaper(path, false) setCurrentWallpaper(path, false)
} }
@ -53,7 +53,7 @@ Singleton {
} else { } else {
// Fallback: update the settings directly for non-SWWW mode // Fallback: update the settings directly for non-SWWW mode
//console.log("[WP] Not using Swww, setting wallpaper directly") //console.log("[Wallpapers] Not using Swww, setting wallpaper directly")
} }
if (randomWallpaperTimer.running) { if (randomWallpaperTimer.running) {
@ -126,7 +126,7 @@ Singleton {
} }
wallpaperList = files wallpaperList = files
scanning = false scanning = false
console.log("[WP] List refreshed, count:", wallpaperList.length) console.log("[Wallpapers] List refreshed, count:", wallpaperList.length)
} }
} }
} }

View file

@ -17,7 +17,7 @@ Singleton {
property var hlWorkspaces: Hyprland.workspaces.values property var hlWorkspaces: Hyprland.workspaces.values
// Detect which compositor we're using // Detect which compositor we're using
Component.onCompleted: { Component.onCompleted: {
console.log("[WS] Initializing workspaces service") console.log("[Workspaces] Initializing workspaces service")
detectCompositor() detectCompositor()
} }
@ -25,27 +25,27 @@ Singleton {
try { try {
try { try {
if (Hyprland.eventSocketPath) { if (Hyprland.eventSocketPath) {
console.log("[WS] Detected Hyprland compositor") console.log("[Workspaces] Detected Hyprland compositor")
isHyprland = true isHyprland = true
isNiri = false isNiri = false
initHyprland() initHyprland()
return return
} }
} catch (e) { } catch (e) {
console.log("[WS] Hyprland not available:", e) console.log("[Workspaces] Hyprland not available:", e)
} }
if (typeof Niri !== "undefined") { if (typeof Niri !== "undefined") {
console.log("[WS] Detected Niri service") console.log("[Workspaces] Detected Niri service")
isHyprland = false isHyprland = false
isNiri = true isNiri = true
initNiri() initNiri()
return return
} }
console.log("[WS] Could not detect any supported compositor") console.log("[Workspaces] Could not detect any supported compositor")
} catch (e) { } catch (e) {
console.error("[WS] Error detecting compositor:", e) console.error("[Workspaces] Error detecting compositor:", e)
} }
} }
@ -102,7 +102,7 @@ Singleton {
} }
workspacesChanged() workspacesChanged()
} catch (e) { } catch (e) {
console.error("[WS] Error updating Hyprland workspaces:", e) console.error("[Workspaces] Error updating Hyprland workspaces:", e)
} }
} }