Fix incorrect icon names

- Some icon names still had file extension indicated in their names
- This commit also enable icon name debug messages on console
This commit is contained in:
Pandagrapher
2023-08-12 18:20:27 +02:00
parent d0743ef359
commit 5b2dc59fbf
3 changed files with 6 additions and 14 deletions

View File

@@ -70,9 +70,7 @@ Cairo::RefPtr<Cairo::ImageSurface> RTScalable::loadSurfaceFromIcon(const Glib::u
const auto iconInfo = theme->lookup_icon(iconName, size);
if (!iconInfo) {
if (rtengine::settings->verbose) {
std::cerr << "Failed to load icon \"" << iconName << "\" for size " << size << "px" << std::endl;
}
std::cerr << "Failed to load icon \"" << iconName << "\" for size " << size << "px" << std::endl;
return surf;
}
@@ -80,9 +78,7 @@ Cairo::RefPtr<Cairo::ImageSurface> RTScalable::loadSurfaceFromIcon(const Glib::u
const auto iconPath = iconInfo.get_filename();
if (iconPath.empty()) {
if (rtengine::settings->verbose) {
std::cerr << "Failed to load icon \"" << iconName << "\" for size " << size << "px" << std::endl;
}
std::cerr << "Failed to load icon \"" << iconName << "\" for size " << size << "px" << std::endl;
return surf;
}
@@ -130,9 +126,7 @@ Cairo::RefPtr<Cairo::ImageSurface> RTScalable::loadSurfaceFromPNG(const Glib::us
if (Glib::file_test(path.c_str(), Glib::FILE_TEST_EXISTS)) {
surf = Cairo::ImageSurface::create_from_png(path);
} else {
if (rtengine::settings->verbose) {
std::cerr << "Failed to load PNG file \"" << fname << "\"" << std::endl;
}
std::cerr << "Failed to load PNG file \"" << fname << "\"" << std::endl;
}
return surf;
@@ -230,9 +224,7 @@ Cairo::RefPtr<Cairo::ImageSurface> RTScalable::loadSurfaceFromSVG(const Glib::us
static_cast<double>(RTScalable::getScale()),
static_cast<double>(RTScalable::getScale()));
} else {
if (rtengine::settings->verbose) {
std::cerr << "Failed to load SVG file \"" << fname << "\"" << std::endl;
}
std::cerr << "Failed to load SVG file \"" << fname << "\"" << std::endl;
}
return surf;