diff --git a/lib/+artoa/+controller/loadRfb.m b/lib/+artoa/+controller/+file/loadRfb.m similarity index 65% rename from lib/+artoa/+controller/loadRfb.m rename to lib/+artoa/+controller/+file/loadRfb.m index ad83cab7b5507893181e0bd9840ccc47a5c6f332..440827c1d2ffe6f6d147ae0ccf71d29e08d5a60d 100644 --- a/lib/+artoa/+controller/loadRfb.m +++ b/lib/+artoa/+controller/+file/loadRfb.m @@ -6,10 +6,19 @@ global artoaDataInput; %% Initialize variables artoaDataInput.rfb = false; +%% Get required variables +folder = artoa.data.getMember(artoaDataInput, {'ini', 'directory', 'rfb'}, pwd()); +filter = artoa.data.getMember(artoaDataInput, {'ini', 'filemask', 'rfb'}, '*.rfb'); + %% Create file dialog and filename -[file, path] = uigetfile('*.rfb'); +[file, path] = uigetfile(fullfile(folder, filter)); filepath = fullfile(path, file); +%% Check if the dialog has been aborted +if file == 0 + return; +end + %% Check if file exists if ~isfile(filepath) error([mfilename ': Selected file ' filepath ' is not a file! Please try again!']); diff --git a/lib/+artoa/+controller/loadSoundSourceFile.m b/lib/+artoa/+controller/+file/loadSoundSourceFile.m similarity index 68% rename from lib/+artoa/+controller/loadSoundSourceFile.m rename to lib/+artoa/+controller/+file/loadSoundSourceFile.m index 4aaa1dd825020e3a3a0f1d5546c06ca24af3b4e1..e257cc6b1f54f8da6a2c08243adf2504e4773de8 100644 --- a/lib/+artoa/+controller/loadSoundSourceFile.m +++ b/lib/+artoa/+controller/+file/loadSoundSourceFile.m @@ -6,10 +6,19 @@ global artoaGui artoaDataInput; %% Initialize variables artoaDataInput.soundsources = false; +%% Get required variables +folder = artoa.data.getMember(artoaDataInput, {'ini', 'directory', 'soundsource'}, pwd()); +filter = artoa.data.getMember(artoaDataInput, {'ini', 'filemask', 'soundsource'}, '*.soso'); + %% Create file dialog and filename -[file, path] = uigetfile('*.soso'); +[file, path] = uigetfile(fullfile(folder, filter)); filepath = fullfile(path, file); +%% Check if dialog has been aborted +if file == 0 + return; +end + %% Check if file exists if ~isfile(filepath) error([mfilename ': Selected file ' filepath ' is not a file! Please try again!']);