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

@ -904,7 +904,7 @@ EditorPanel::EditorPanel (FilePanel* filePanel)
send_to_external = Gtk::manage(new PopUpButton("", false)); send_to_external = Gtk::manage(new PopUpButton("", false));
send_to_external->set_tooltip_text(M("MAIN_BUTTON_SENDTOEDITOR_TOOLTIP")); send_to_external->set_tooltip_text(M("MAIN_BUTTON_SENDTOEDITOR_TOOLTIP"));
send_to_external->setEmptyImage("palette-brush.png"); send_to_external->setEmptyImage("palette-brush");
setExpandAlignProperties(send_to_external->buttonGroup, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL); setExpandAlignProperties(send_to_external->buttonGroup, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_FILL);
updateExternalEditorWidget( updateExternalEditorWidget(
options.externalEditorIndex >= 0 ? options.externalEditorIndex : options.externalEditors.size(), options.externalEditorIndex >= 0 ? options.externalEditorIndex : options.externalEditors.size(),

View File

@ -70,9 +70,7 @@ Cairo::RefPtr<Cairo::ImageSurface> RTScalable::loadSurfaceFromIcon(const Glib::u
const auto iconInfo = theme->lookup_icon(iconName, size); const auto iconInfo = theme->lookup_icon(iconName, size);
if (!iconInfo) { 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; return surf;
} }
@ -80,9 +78,7 @@ Cairo::RefPtr<Cairo::ImageSurface> RTScalable::loadSurfaceFromIcon(const Glib::u
const auto iconPath = iconInfo.get_filename(); const auto iconPath = iconInfo.get_filename();
if (iconPath.empty()) { 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; 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)) { if (Glib::file_test(path.c_str(), Glib::FILE_TEST_EXISTS)) {
surf = Cairo::ImageSurface::create_from_png(path); surf = Cairo::ImageSurface::create_from_png(path);
} else { } 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; 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()),
static_cast<double>(RTScalable::getScale())); static_cast<double>(RTScalable::getScale()));
} else { } 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; return surf;

View File

@ -44,7 +44,7 @@ ToneEqualizer::ToneEqualizer(): FoldableToolPanel(this, TOOL_NAME, M("TP_TONE_EQ
"red" "red"
}; };
for (size_t i = 0; i < bands.size(); ++i) { for (size_t i = 0; i < bands.size(); ++i) {
bands[i] = Gtk::manage(new Adjuster(M("TP_TONE_EQUALIZER_BAND_" + std::to_string(i)), -100, 100, 1, 0, Gtk::manage(new RTImage(Glib::ustring("circle-") + images[i] + "-small.png")))); bands[i] = Gtk::manage(new Adjuster(M("TP_TONE_EQUALIZER_BAND_" + std::to_string(i)), -100, 100, 1, 0, Gtk::manage(new RTImage(Glib::ustring("circle-") + images[i] + "-small"))));
bands[i]->setAdjusterListener(this); bands[i]->setAdjusterListener(this);
pack_start(*bands[i]); pack_start(*bands[i]);
bands[i]->showIcons(false); bands[i]->showIcons(false);