mirror of
https://github.com/arabianq/pipewire-soundpad.git
synced 2026-04-28 06:21:23 +00:00
now can select multiple dirs at once
This commit is contained in:
+5
-3
@@ -79,10 +79,12 @@ impl SoundpadGui {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn add_dir(&mut self) {
|
||||
pub fn add_dirs(&mut self) {
|
||||
let file_dialog = FileDialog::new();
|
||||
if let Some(path) = file_dialog.pick_folder() {
|
||||
self.app_state.dirs.insert(path);
|
||||
if let Some(paths) = file_dialog.pick_folders() {
|
||||
for path in paths {
|
||||
self.app_state.dirs.insert(path);
|
||||
}
|
||||
self.config.dirs = self.app_state.dirs.clone();
|
||||
self.config.save_to_file().ok();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user