fix: lint files
This commit is contained in:
parent
b7bd06ad8f
commit
bcee4e15d3
|
@ -166,18 +166,17 @@ void waybar::modules::MPD::setLabel() {
|
|||
if (config_["title-len"].isInt()) title = title.substr(0, config_["title-len"].asInt());
|
||||
|
||||
try {
|
||||
label_.set_markup(
|
||||
fmt::format(format, fmt::arg("artist", Glib::Markup::escape_text(artist).raw()),
|
||||
fmt::arg("albumArtist", Glib::Markup::escape_text(album_artist).raw()),
|
||||
fmt::arg("album", Glib::Markup::escape_text(album).raw()),
|
||||
fmt::arg("title", Glib::Markup::escape_text(title).raw()),
|
||||
fmt::arg("date", Glib::Markup::escape_text(date).raw()),
|
||||
fmt::arg("volume", volume), fmt::arg("elapsedTime", elapsedTime),
|
||||
fmt::arg("totalTime", totalTime), fmt::arg("songPosition", song_pos),
|
||||
fmt::arg("queueLength", queue_length), fmt::arg("stateIcon", stateIcon),
|
||||
fmt::arg("consumeIcon", consumeIcon), fmt::arg("randomIcon", randomIcon),
|
||||
fmt::arg("repeatIcon", repeatIcon), fmt::arg("singleIcon", singleIcon),
|
||||
fmt::arg("filename", filename)));
|
||||
label_.set_markup(fmt::format(
|
||||
format, fmt::arg("artist", Glib::Markup::escape_text(artist).raw()),
|
||||
fmt::arg("albumArtist", Glib::Markup::escape_text(album_artist).raw()),
|
||||
fmt::arg("album", Glib::Markup::escape_text(album).raw()),
|
||||
fmt::arg("title", Glib::Markup::escape_text(title).raw()),
|
||||
fmt::arg("date", Glib::Markup::escape_text(date).raw()), fmt::arg("volume", volume),
|
||||
fmt::arg("elapsedTime", elapsedTime), fmt::arg("totalTime", totalTime),
|
||||
fmt::arg("songPosition", song_pos), fmt::arg("queueLength", queue_length),
|
||||
fmt::arg("stateIcon", stateIcon), fmt::arg("consumeIcon", consumeIcon),
|
||||
fmt::arg("randomIcon", randomIcon), fmt::arg("repeatIcon", repeatIcon),
|
||||
fmt::arg("singleIcon", singleIcon), fmt::arg("filename", filename)));
|
||||
} catch (fmt::format_error const& e) {
|
||||
spdlog::warn("mpd: format error: {}", e.what());
|
||||
}
|
||||
|
|
|
@ -314,9 +314,7 @@ void Item::updateImage() {
|
|||
}
|
||||
|
||||
Glib::RefPtr<Gdk::Pixbuf> Item::getIconPixbuf() {
|
||||
|
||||
if (!icon_name.empty()) {
|
||||
|
||||
try {
|
||||
std::ifstream temp(icon_name);
|
||||
if (temp.is_open()) {
|
||||
|
@ -347,7 +345,8 @@ Glib::RefPtr<Gdk::Pixbuf> Item::getIconPixbuf() {
|
|||
if (icon_name.empty()) {
|
||||
spdlog::error("Item '{}': No icon name or pixmap given.", id);
|
||||
} else {
|
||||
spdlog::error("Item '{}': Could not find an icon named '{}' and no pixmap given.", id, icon_name);
|
||||
spdlog::error("Item '{}': Could not find an icon named '{}' and no pixmap given.", id,
|
||||
icon_name);
|
||||
}
|
||||
|
||||
return getIconByName("image-missing", getScaledIconSize());
|
||||
|
|
|
@ -227,8 +227,8 @@ std::tuple<std::size_t, int, std::string, std::string, std::string, std::string>
|
|||
|
||||
int nb = node.size();
|
||||
if (parentWorkspace != 0) nb = leafNodesInWorkspace(parentWorkspace);
|
||||
return {nb, node["id"].asInt(), Glib::Markup::escape_text(node["name"].asString()),
|
||||
app_id, app_class, shell};
|
||||
return {nb, node["id"].asInt(), Glib::Markup::escape_text(node["name"].asString()),
|
||||
app_id, app_class, shell};
|
||||
}
|
||||
}
|
||||
// iterate
|
||||
|
|
Loading…
Reference in New Issue