From eac335ab955f2c9d5756cab54b366d44de088737 Mon Sep 17 00:00:00 2001 From: quadbyte Date: Thu, 14 Aug 2025 23:50:41 -0400 Subject: [PATCH] Removed double Connections in settings. --- Services/Settings.qml | 15 +-------------- Services/Wallpapers.qml | 10 +++++----- Services/Workspaces.qml | 14 +++++++------- 3 files changed, 13 insertions(+), 26 deletions(-) diff --git a/Services/Settings.qml b/Services/Settings.qml index 2e219c6..a6a5f4c 100644 --- a/Services/Settings.qml +++ b/Services/Settings.qml @@ -45,7 +45,7 @@ Singleton { reload() } onLoaded: function () { - console.log("[Settings] loaded") + console.log("[Settings] Loaded") Qt.callLater(function () { if (adapter.wallpaper.current !== "") { 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() - } - } } diff --git a/Services/Wallpapers.qml b/Services/Wallpapers.qml index e5197b8..3e656cf 100644 --- a/Services/Wallpapers.qml +++ b/Services/Wallpapers.qml @@ -9,7 +9,7 @@ Singleton { id: root Component.onCompleted: { - console.log("[WP] Service initialized") + console.log("[Wallpapers] Service initialized") loadWallpapers() // 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"] function loadWallpapers() { - console.log("[WP] Load Wallpapers") + console.log("[Wallpapers] Load Wallpapers") scanning = true wallpaperList = [] // Unsetting, then setting the folder will re-trigger the parsing! @@ -32,7 +32,7 @@ Singleton { } function changeWallpaper(path) { - console.log("[WP] changing to:", path) + console.log("[Wallpapers] Changing to:", path) setCurrentWallpaper(path, false) } @@ -53,7 +53,7 @@ Singleton { } else { // 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) { @@ -126,7 +126,7 @@ Singleton { } wallpaperList = files scanning = false - console.log("[WP] List refreshed, count:", wallpaperList.length) + console.log("[Wallpapers] List refreshed, count:", wallpaperList.length) } } } diff --git a/Services/Workspaces.qml b/Services/Workspaces.qml index 7bdf040..f513b37 100644 --- a/Services/Workspaces.qml +++ b/Services/Workspaces.qml @@ -17,7 +17,7 @@ Singleton { property var hlWorkspaces: Hyprland.workspaces.values // Detect which compositor we're using Component.onCompleted: { - console.log("[WS] Initializing workspaces service") + console.log("[Workspaces] Initializing workspaces service") detectCompositor() } @@ -25,27 +25,27 @@ Singleton { try { try { if (Hyprland.eventSocketPath) { - console.log("[WS] Detected Hyprland compositor") + console.log("[Workspaces] Detected Hyprland compositor") isHyprland = true isNiri = false initHyprland() return } } catch (e) { - console.log("[WS] Hyprland not available:", e) + console.log("[Workspaces] Hyprland not available:", e) } if (typeof Niri !== "undefined") { - console.log("[WS] Detected Niri service") + console.log("[Workspaces] Detected Niri service") isHyprland = false isNiri = true initNiri() return } - console.log("[WS] Could not detect any supported compositor") + console.log("[Workspaces] Could not detect any supported compositor") } catch (e) { - console.error("[WS] Error detecting compositor:", e) + console.error("[Workspaces] Error detecting compositor:", e) } } @@ -102,7 +102,7 @@ Singleton { } workspacesChanged() } catch (e) { - console.error("[WS] Error updating Hyprland workspaces:", e) + console.error("[Workspaces] Error updating Hyprland workspaces:", e) } }