From c6897da62d3666886132937df77ae71a4a0bc7a1 Mon Sep 17 00:00:00 2001 From: Huan Thieu Nguyen Date: Sun, 21 May 2023 23:41:22 +0200 Subject: [PATCH] window: Let the user select multiple files to open. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Uses code that drag and drop already uses. It's kinda ugly because the file dialog returns a ListModel. As an added bonus, since the button responds to the action "win.open", it will also allow open multiple files with the primary menu. It would be a good idea to change the "Open…" label in the primary menu though. Closes #191 --- data/gtk/window.ui | 2 +- src/window.rs | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/data/gtk/window.ui b/data/gtk/window.ui index ab31a43..1488aa6 100644 --- a/data/gtk/window.ui +++ b/data/gtk/window.ui @@ -182,7 +182,7 @@ center - _Open File… + _Open Files… True win.open