1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 21:58:10 +00:00

SoundPlayer: Accept drop events

Files can now be dragged into the window and loading errors will be
handled more gracefully.
This commit is contained in:
Julian Offenhäuser 2020-12-02 23:58:00 +01:00 committed by Andreas Kling
parent 017490aa7f
commit 228fa1c51d
3 changed files with 20 additions and 3 deletions

View file

@ -81,7 +81,7 @@ int main(int argc, char** argv)
});
app_menu.add_action(GUI::CommonActions::make_open_action([&](auto&) {
Optional<String> path = GUI::FilePicker::get_open_filepath(window, "Open wav file...");
Optional<String> path = GUI::FilePicker::get_open_filepath(window, "Open sound file...");
if (path.has_value()) {
player.open_file(path.value());
}