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:
parent
017490aa7f
commit
228fa1c51d
3 changed files with 20 additions and 3 deletions
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue