From ca85455a8ed5dbe920a47c1a48de1dd993446481 Mon Sep 17 00:00:00 2001 From: Adithya Ajith <50308085+adharmic@users.noreply.github.com> Date: Mon, 26 Aug 2024 05:25:52 -0500 Subject: [PATCH] misc: Rename all instances of "emtpy" to "empty" (#7522) --- src/Compositor.cpp | 4 ++-- src/Compositor.hpp | 2 +- src/desktop/Workspace.cpp | 10 +++++----- src/desktop/Workspace.hpp | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index c9a698ce93b..a419e741207 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -2624,7 +2624,7 @@ void CCompositor::forceReportSizesToWindowsOnWorkspace(const WORKSPACEID& wid) { } } -PHLWORKSPACE CCompositor::createNewWorkspace(const WORKSPACEID& id, const MONITORID& monid, const std::string& name, bool isEmtpy) { +PHLWORKSPACE CCompositor::createNewWorkspace(const WORKSPACEID& id, const MONITORID& monid, const std::string& name, bool isEmpty) { const auto NAME = name == "" ? std::to_string(id) : name; auto monID = monid; @@ -2635,7 +2635,7 @@ PHLWORKSPACE CCompositor::createNewWorkspace(const WORKSPACEID& id, const MONITO const bool SPECIAL = id >= SPECIAL_WORKSPACE_START && id <= -2; - const auto PWORKSPACE = m_vWorkspaces.emplace_back(CWorkspace::create(id, monID, NAME, SPECIAL, isEmtpy)); + const auto PWORKSPACE = m_vWorkspaces.emplace_back(CWorkspace::create(id, monID, NAME, SPECIAL, isEmpty)); PWORKSPACE->m_fAlpha.setValueAndWarp(0); diff --git a/src/Compositor.hpp b/src/Compositor.hpp index a570a06eb5b..bb986f5e2bd 100644 --- a/src/Compositor.hpp +++ b/src/Compositor.hpp @@ -165,7 +165,7 @@ class CCompositor { Vector2D parseWindowVectorArgsRelative(const std::string&, const Vector2D&); void forceReportSizesToWindowsOnWorkspace(const WORKSPACEID&); PHLWORKSPACE createNewWorkspace(const WORKSPACEID&, const MONITORID&, const std::string& name = "", - bool isEmtpy = true); // will be deleted next frame if left empty and unfocused! + bool isEmpty = true); // will be deleted next frame if left empty and unfocused! void renameWorkspace(const WORKSPACEID&, const std::string& name = ""); void setActiveMonitor(CMonitor*); bool isWorkspaceSpecial(const WORKSPACEID&); diff --git a/src/desktop/Workspace.cpp b/src/desktop/Workspace.cpp index a9412e6d243..72d9705ea68 100644 --- a/src/desktop/Workspace.cpp +++ b/src/desktop/Workspace.cpp @@ -5,18 +5,18 @@ #include using namespace Hyprutils::String; -PHLWORKSPACE CWorkspace::create(WORKSPACEID id, MONITORID monitorID, std::string name, bool special, bool isEmtpy) { - PHLWORKSPACE workspace = makeShared(id, monitorID, name, special, isEmtpy); +PHLWORKSPACE CWorkspace::create(WORKSPACEID id, MONITORID monitorID, std::string name, bool special, bool isEmpty) { + PHLWORKSPACE workspace = makeShared(id, monitorID, name, special, isEmpty); workspace->init(workspace); return workspace; } -CWorkspace::CWorkspace(WORKSPACEID id, MONITORID monitorID, std::string name, bool special, bool isEmtpy) { +CWorkspace::CWorkspace(WORKSPACEID id, MONITORID monitorID, std::string name, bool special, bool isEmpty) { m_iMonitorID = monitorID; m_iID = id; m_szName = name; m_bIsSpecialWorkspace = special; - m_bWasCreatedEmtpy = isEmtpy; + m_bWasCreatedEmpty = isEmpty; } void CWorkspace::init(PHLWORKSPACE self) { @@ -49,7 +49,7 @@ void CWorkspace::init(PHLWORKSPACE self) { const auto WORKSPACERULE = g_pConfigManager->getWorkspaceRuleFor(self); m_bPersistent = WORKSPACERULE.isPersistent; - if (self->m_bWasCreatedEmtpy) + if (self->m_bWasCreatedEmpty) if (auto cmd = WORKSPACERULE.onCreatedEmptyRunCmd) g_pKeybindManager->spawn(*cmd); diff --git a/src/desktop/Workspace.hpp b/src/desktop/Workspace.hpp index 9cacb0ccae8..7a32459cffe 100644 --- a/src/desktop/Workspace.hpp +++ b/src/desktop/Workspace.hpp @@ -17,7 +17,7 @@ class CWindow; class CWorkspace { public: - static PHLWORKSPACE create(WORKSPACEID id, MONITORID monitorID, std::string name, bool special = false, bool isEmtpy = true); + static PHLWORKSPACE create(WORKSPACEID id, MONITORID monitorID, std::string name, bool special = false, bool isEmpty = true); // use create() don't use this CWorkspace(WORKSPACEID id, MONITORID monitorID, std::string name, bool special = false, bool isEmpty = true); ~CWorkspace(); @@ -57,7 +57,7 @@ class CWorkspace { // last monitor (used on reconnect) std::string m_szLastMonitor = ""; - bool m_bWasCreatedEmtpy = true; + bool m_bWasCreatedEmpty = true; bool m_bPersistent = false;