LaunchServer: Remove icons from LaunchServer::Handler

This commit is contained in:
Linus Groh 2020-12-25 23:59:58 +01:00 committed by Andreas Kling
parent d4a60583a9
commit dd2ce8bc8f
Notes: sideshowbarker 2024-07-19 00:36:05 +09:00
2 changed files with 1 additions and 17 deletions

View File

@ -79,12 +79,6 @@ String Handler::to_details_str() const
default:
break;
}
if (!icons.is_empty()) {
JsonObject icons_obj;
for (auto& icon : icons)
icons_obj.set(icon.key, icon.value);
obj.add("icons", move(icons_obj));
}
obj.finish();
return builder.build();
}
@ -116,14 +110,6 @@ void Launcher::load_handlers(const String& af_dir)
return table;
};
auto load_hashmap = [](auto& af, auto& group) {
HashMap<String, String> map;
auto keys = af->keys(group);
for (auto& key : keys)
map.set(key, af->read_entry(group, key));
return map;
};
Core::DirIterator dt(af_dir, Core::DirIterator::SkipDots);
while (dt.has_next()) {
@ -136,8 +122,7 @@ void Launcher::load_handlers(const String& af_dir)
auto app_executable = af->read_entry("App", "Executable");
auto file_types = load_hashtable(af, "FileTypes");
auto protocols = load_hashtable(af, "Protocols");
auto icons = load_hashmap(af, "Icons");
m_handlers.set(app_executable, { Handler::Type::Default, move(app_name), app_executable, move(file_types), move(protocols), move(icons) });
m_handlers.set(app_executable, { Handler::Type::Default, move(app_name), app_executable, move(file_types), move(protocols) });
}
}

View File

@ -45,7 +45,6 @@ struct Handler {
String executable;
HashTable<String> file_types {};
HashTable<String> protocols {};
HashMap<String, String> icons {};
static String name_from_executable(const StringView&);
void from_executable(Type, const String&);