Fix lower

This commit is contained in:
dmitry 2020-07-01 03:05:17 +03:00
parent 43500a9983
commit 8a13ed59bc

View File

@ -86,11 +86,13 @@ static bool image_load_icon(Gtk::Image& image, Glib::RefPtr<Gtk::IconTheme> icon
* send a single app-id, but in any case this works fine */
while (stream >> app_id)
{
std::transform(app_id.begin(), app_id.end(), lower_app_id.begin(),
[](char c){ return std::tolower(c); });
std::string icon_name = get_from_icon_theme(icon_theme, app_id);
if (icon_name.empty())
if (icon_name.empty()) {
lower_app_id = app_id;
std::transform(lower_app_id.begin(), lower_app_id.end(), lower_app_id.begin(),
[](char c){ return std::tolower(c); });
icon_name = get_from_icon_theme(icon_theme, lower_app_id);
}
if (icon_name.empty())
icon_name = get_from_desktop_app_info(app_id);