dwm: Rename DEFAULT_TAG_LABEL to ..._STATE_LABEL

State makes more sense than tag.
This commit is contained in:
Mihir Lad 2020-07-20 00:27:46 -04:00
parent a7e9dcb0db
commit 7883ef82fe
2 changed files with 6 additions and 7 deletions

View File

@ -42,7 +42,7 @@ namespace modules {
private: private:
static constexpr const char* DEFAULT_FORMAT_TAGS{"<label-state> <label-layout> <label-title>"}; static constexpr const char* DEFAULT_FORMAT_TAGS{"<label-state> <label-layout> <label-title>"};
static constexpr const char* DEFAULT_TAG_LABEL{"%name%"}; static constexpr const char* DEFAULT_STATE_LABEL{"%name%"};
static constexpr const char* TAG_LABEL_STATE{"<label-state>"}; static constexpr const char* TAG_LABEL_STATE{"<label-state>"};
static constexpr const char* TAG_LABEL_LAYOUT{"<label-layout>"}; static constexpr const char* TAG_LABEL_LAYOUT{"<label-layout>"};

View File

@ -33,16 +33,15 @@ namespace modules {
// Populate m_state_labels map with labels and their states // Populate m_state_labels map with labels and their states
if (m_formatter->has(TAG_LABEL_STATE)) { if (m_formatter->has(TAG_LABEL_STATE)) {
m_state_labels.insert( m_state_labels.insert(
std::make_pair(state_t::FOCUSED, load_optional_label(m_conf, name(), "label-focused", DEFAULT_TAG_LABEL))); std::make_pair(state_t::FOCUSED, load_optional_label(m_conf, name(), "label-focused", DEFAULT_STATE_LABEL)));
m_state_labels.insert(std::make_pair( m_state_labels.insert(std::make_pair(
state_t::UNFOCUSED, load_optional_label(m_conf, name(), "label-unfocused", DEFAULT_TAG_LABEL))); state_t::UNFOCUSED, load_optional_label(m_conf, name(), "label-unfocused", DEFAULT_STATE_LABEL)));
m_state_labels.insert( m_state_labels.insert(
std::make_pair(state_t::VISIBLE, load_optional_label(m_conf, name(), "label-visible", DEFAULT_TAG_LABEL))); std::make_pair(state_t::VISIBLE, load_optional_label(m_conf, name(), "label-visible", DEFAULT_STATE_LABEL)));
m_state_labels.insert( m_state_labels.insert(
std::make_pair(state_t::URGENT, load_optional_label(m_conf, name(), "label-urgent", DEFAULT_TAG_LABEL))); std::make_pair(state_t::URGENT, load_optional_label(m_conf, name(), "label-urgent", DEFAULT_STATE_LABEL)));
// Dummy label for unoccupied tags
m_state_labels.insert( m_state_labels.insert(
std::make_pair(state_t::NONE, load_optional_label(m_conf, name(), "label-none", DEFAULT_TAG_LABEL))); std::make_pair(state_t::NONE, load_optional_label(m_conf, name(), "label-none", DEFAULT_STATE_LABEL)));
} }
m_seperator_label = load_optional_label(m_conf, name(), "label-separator", ""); m_seperator_label = load_optional_label(m_conf, name(), "label-separator", "");