1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16:07:46 +00:00

LaunchServer: Let open_file_url use app defaults

Before, programs using open_file_url (such as Terminal) would
fail to open any file if its extension (or mime type) wasn't
specified in LaunchServer.ini. This patch now permits it.
This commit is contained in:
demostanis 2022-07-23 01:37:37 +02:00 committed by Sam Atkins
parent 48766449e5
commit b89aced2e3
2 changed files with 43 additions and 17 deletions

View file

@ -50,9 +50,10 @@ private:
HashMap<String, String> m_file_handlers;
HashMap<String, String> m_mime_handlers;
bool has_mime_handlers(String const&);
Optional<String> mime_type_for_file(String path);
Handler get_handler_for_executable(Handler::Type, String const&) const;
void for_each_handler(String const& key, HashMap<String, String>& user_preferences, Function<bool(Handler const&)> f);
size_t for_each_handler(String const& key, HashMap<String, String> const& user_preferences, Function<bool(Handler const&)> f);
void for_each_handler_for_path(String const&, Function<bool(Handler const&)> f);
bool open_file_url(const URL&);
bool open_with_user_preferences(HashMap<String, String> const& user_preferences, String const& key, Vector<String> const& arguments, String const& default_program = {});