fix(config): Rename parameter for individual border size

Rename `border-{left,top,right,bottom}` to `border-{left,top,right,bottom}-size`
to follow the naming scheme used for other size parameters
This commit is contained in:
Michael Carlberg 2017-01-12 17:55:55 +01:00
parent 16a355a2b7
commit d49b1cacd3
2 changed files with 5 additions and 5 deletions

View File

@ -200,16 +200,16 @@ bar::bar(connection& conn, signal_emitter& emitter, const config& config, const
auto bcolor = m_conf.get(bs, "border-color", "#00000000"s);
m_opts.borders.emplace(edge::TOP, border_settings{});
m_opts.borders[edge::TOP].size = m_conf.get(bs, "border-top", bsize);
m_opts.borders[edge::TOP].size = m_conf.deprecated(bs, "border-top", "border-top-size", bsize);
m_opts.borders[edge::TOP].color = color::parse(m_conf.get(bs, "border-top-color", bcolor));
m_opts.borders.emplace(edge::BOTTOM, border_settings{});
m_opts.borders[edge::BOTTOM].size = m_conf.get(bs, "border-bottom", bsize);
m_opts.borders[edge::BOTTOM].size = m_conf.deprecated(bs, "border-bottom", "border-bottom-size", bsize);
m_opts.borders[edge::BOTTOM].color = color::parse(m_conf.get(bs, "border-bottom-color", bcolor));
m_opts.borders.emplace(edge::LEFT, border_settings{});
m_opts.borders[edge::LEFT].size = m_conf.get(bs, "border-left", bsize);
m_opts.borders[edge::LEFT].size = m_conf.deprecated(bs, "border-left", "border-left-size", bsize);
m_opts.borders[edge::LEFT].color = color::parse(m_conf.get(bs, "border-left-color", bcolor));
m_opts.borders.emplace(edge::RIGHT, border_settings{});
m_opts.borders[edge::RIGHT].size = m_conf.get(bs, "border-right", bsize);
m_opts.borders[edge::RIGHT].size = m_conf.deprecated(bs, "border-right", "border-right-size", bsize);
m_opts.borders[edge::RIGHT].color = color::parse(m_conf.get(bs, "border-right-color", bcolor));
// Load geometry values

View File

@ -67,7 +67,7 @@ string config::section() const {
void config::warn_deprecated(const string& section, const string& key, string replacement) const {
try {
auto value = get<string>(section, key);
m_log.warn("The config parameter `%s.%s` is deprecated, use `%s` instead.", section, key, move(replacement));
m_log.warn("The config parameter `%s.%s` is deprecated, use `%s.%s` instead.", section, key, section, move(replacement));
} catch (const key_error& err) {
}
}