mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-11 01:06:01 +03:00
LaunchServer: Remove icons from LaunchServer::Handler
This commit is contained in:
parent
d4a60583a9
commit
dd2ce8bc8f
Notes:
sideshowbarker
2024-07-19 00:36:05 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/dd2ce8bc8fa Pull-request: https://github.com/SerenityOS/serenity/pull/4539
@ -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) });
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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&);
|
||||
|
Loading…
Reference in New Issue
Block a user