From bac4d038131ed9ab5a4f4440f102a455cdbe7cc2 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Sat, 15 Jun 2024 18:34:45 -0500 Subject: [PATCH] modules/hyprland/workspaces: remove deprecated property --- include/modules/hyprland/workspaces.hpp | 1 - src/modules/hyprland/workspaces.cpp | 15 +++------------ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/include/modules/hyprland/workspaces.hpp b/include/modules/hyprland/workspaces.hpp index 6c6e0932..df7292b1 100644 --- a/include/modules/hyprland/workspaces.hpp +++ b/include/modules/hyprland/workspaces.hpp @@ -66,7 +66,6 @@ class Workspaces : public AModule, public EventHandler { auto populateBoolConfig(const Json::Value& config, const std::string& key, bool& member) -> void; auto populateSortByConfig(const Json::Value& config) -> void; auto populateIgnoreWorkspacesConfig(const Json::Value& config) -> void; - auto populatePersistentWorkspacesConfig(const Json::Value& config) -> void; auto populateFormatWindowSeparatorConfig(const Json::Value& config) -> void; auto populateWindowRewriteConfig(const Json::Value& config) -> void; diff --git a/src/modules/hyprland/workspaces.cpp b/src/modules/hyprland/workspaces.cpp index e5bee553..52239b7b 100644 --- a/src/modules/hyprland/workspaces.cpp +++ b/src/modules/hyprland/workspaces.cpp @@ -577,9 +577,9 @@ auto Workspaces::parseConfig(const Json::Value &config) -> void { populateBoolConfig(config, "active-only", m_activeOnly); populateBoolConfig(config, "move-to-monitor", m_moveToMonitor); + m_persistentWorkspaceConfig = config.get("persistent-workspaces", Json::Value()); populateSortByConfig(config); populateIgnoreWorkspacesConfig(config); - populatePersistentWorkspacesConfig(config); populateFormatWindowSeparatorConfig(config); populateWindowRewriteConfig(config); } @@ -591,8 +591,8 @@ auto Workspaces::populateIconsMap(const Json::Value &formatIcons) -> void { m_iconsMap.emplace("", ""); } -auto Workspaces::populateBoolConfig(const Json::Value &config, const std::string &key, - bool &member) -> void { +auto Workspaces::populateBoolConfig(const Json::Value &config, const std::string &key, bool &member) + -> void { auto configValue = config[key]; if (configValue.isBool()) { member = configValue.asBool(); @@ -632,15 +632,6 @@ auto Workspaces::populateIgnoreWorkspacesConfig(const Json::Value &config) -> vo } } -auto Workspaces::populatePersistentWorkspacesConfig(const Json::Value &config) -> void { - if (config.isMember("persistent-workspaces") || config.isMember("persistent_workspaces")) { - spdlog::warn( - "persistent_workspaces is deprecated. Please change config to use persistent-workspaces."); - m_persistentWorkspaceConfig = - config.get("persistent-workspaces", config.get("persistent_workspaces", Json::Value())); - } -} - auto Workspaces::populateFormatWindowSeparatorConfig(const Json::Value &config) -> void { auto formatWindowSeparator = config["format-window-separator"]; m_formatWindowSeparator =