diff --git a/+gui/GuiFile.m b/+gui/GuiFile.m index e9bfc4b5..1eae4a97 100644 --- a/+gui/GuiFile.m +++ b/+gui/GuiFile.m @@ -289,7 +289,8 @@ function autosave_timer(a,b,obj) p.mainGui=obj.getPar('mainGui'); p.saveroi=false; if obj.guihandles.autosavecheck.Value - savesml(obj.locData,'settings/temp/autosave_sml',p) + settingsdir=obj.getPar('SettingsDirectory'); + savesml(obj.locData,[settingsdir filesep 'temp' filesep 'autosave_sml'],p) time=datetime('now'); disp(['autosave: ' num2str(time.Hour) ':' num2str(time.Minute)]) end diff --git a/+gui/GuiPluginGroup.m b/+gui/GuiPluginGroup.m index 921817ab..dd6d892b 100644 --- a/+gui/GuiPluginGroup.m +++ b/+gui/GuiPluginGroup.m @@ -197,7 +197,7 @@ function processorselect_callback(object,data,obj) function menu_callback(callobj,b,obj) guimodules=obj.getPar('guimodules'); -% guimodules=readstruct('settings/temp/guimodules.txt',[],true); + switch callobj.Label case 'add plugin' plugins=obj.getPar('menu_plugins'); @@ -223,7 +223,8 @@ function menu_callback(callobj,b,obj) % guimodules.(pluginname{1}).(pluginname{2}).(pluginname{3})=pluginname; % save(obj.guipluginpath,'guimodules') case 'add workflow' - [file,path]=uigetfile(['settings/workflows/*.mat']); + settingsdir=obj.getPar('SettingsDirectory'); + [file,path]=uigetfile([settingsdir '/workflows/*.mat']); if ~file return end @@ -276,28 +277,7 @@ function menu_callback(callobj,b,obj) classname=obj.plugins.allclassnames{selection}; guimodules.(obj.maindir{1}).(obj.maindir{2}).(classname).name=newname; obj.setprocessorlist; -% case 'reset: use all plugins' -% answ=questdlg('Delete all settings for pluginlist? Effect takes place after restarting the application'); -% -% if strcmp(answ,'Yes') -% obj.setGlobalSetting('guiPluginConfigFile',''); -% end -% delete('settings/temp/guimodules.txt') -% return -% end -% case 'load plugin structure' -% fs='settings/*.txt'; -% [f,path]=uigetfile(fs,'load gui plugin structure file'); -% if f -% guimodules=readstruct([path f],[],1); -% msgbox('please restart SMAP') -% end -% case 'save plugin structure' -% fs='settings/guiplugins.txt'; -% [f,path]=uiputfile(fs,'save gui plugin structure file'); -% if f -% writestruct([path f],guimodules); -% end + case 'detach' f=figure('MenuBar','none','Toolbar','none'); @@ -311,7 +291,7 @@ function menu_callback(callobj,b,obj) for k=1:length(allclasses) guimodules.(obj.maindir{1}).(obj.maindir{2}).(allclasses{k}).position=k; end -% writestruct('settings/temp/guimodules.txt',guimodules); + obj.setPar('guimodules',guimodules); end diff --git a/+gui/GuiPluginWindow.m b/+gui/GuiPluginWindow.m index f8ed25e7..a9582212 100644 --- a/+gui/GuiPluginWindow.m +++ b/+gui/GuiPluginWindow.m @@ -106,7 +106,7 @@ function addplugingroup(obj,name,screenname) function menu_callback(callobj,b,obj) guimodules=obj.getPar('guimodules'); -% guimodules=readstruct('settings/temp/guimodules.txt',[],true); + switch callobj.Label case 'add' name=inputdlg('name of new tab'); @@ -126,7 +126,8 @@ function menu_callback(callobj,b,obj) guimodules.(obj.maindir)=rmfield(guimodules.(obj.maindir),fieldr); end case 'add workflow' - [file,path]=uigetfile(['settings/workflows/*.mat']); + settingsdir=obj.getPar('SettingsDirectory'); + [file,path]=uigetfile([settingsdir '/workflows/*.mat']); if file [~,name]=fileparts(file); name=name(1:min(end,16)); @@ -167,7 +168,6 @@ function menu_callback(callobj,b,obj) selected.Parent=hnew; end obj.setPar('guimodules',guimodules); -% writestruct('settings/temp/guimodules.txt',guimodules); end function module=makewf(obj,name, file) diff --git a/+gui/SEAnnotation.m b/+gui/SEAnnotation.m index ec36a4b5..e10f7061 100644 --- a/+gui/SEAnnotation.m +++ b/+gui/SEAnnotation.m @@ -164,7 +164,7 @@ function keypress(object,data,obj,focus) end function loadlist_callback(a,b,obj) -[f p]=uigetfile('settings/*.txt'); +[f p]=uigetfile([obj.getPar('SettingsDirectory') '/*.txt']); if f loadlist(obj,[p f]) end diff --git a/+gui/private/makeplugincallfile.m b/+gui/private/makeplugincallfile.m index 2fa6b9f3..2e9bef1c 100644 --- a/+gui/private/makeplugincallfile.m +++ b/+gui/private/makeplugincallfile.m @@ -2,18 +2,13 @@ if ~isdeployed addpath('plugins') addpath('plugins/shared'); -% addpath('settings/workflows'); try pold=plugin; catch pold=[]; end -% outputdir='+plugintemp'; -% if ~exist(outputdir,'dir') -% mkdir(outputdir) -% rehash -% end + strcase={}; strlist={}; diff --git a/+interfaces/imageloaderSMAP.m b/+interfaces/imageloaderSMAP.m index 1a2446b1..b482a9b3 100644 --- a/+interfaces/imageloaderSMAP.m +++ b/+interfaces/imageloaderSMAP.m @@ -8,7 +8,7 @@ waittime=5; currentImageNumber; allmetadatatags; - calibrationFile='settings/cameras.mat'; + calibrationFile; allowmultiplefiles=true; ismultichannel=false; multiloader={}; @@ -17,6 +17,7 @@ methods function obj=imageloaderSMAP(varargin) obj.metadata=interfaces.metadataSMAP; + obj.calibrationFile=[obj.getGlobalSetting('SettingsDirectory') '/cameras.mat']; if nargin>2 && ~isempty(varargin{3}) if isa(varargin{3},'interfaces.ParameterData') obj.P=varargin{3}; diff --git a/plugins/+Analyze/+sr3D/Biplane_getPSFxy.m b/plugins/+Analyze/+sr3D/Biplane_getPSFxy.m index 9f3abb23..626c2a02 100644 --- a/plugins/+Analyze/+sr3D/Biplane_getPSFxy.m +++ b/plugins/+Analyze/+sr3D/Biplane_getPSFxy.m @@ -123,7 +123,7 @@ function loadbutton(obj,a,b) % pard.datapart.position=[3,1]; -pard.Tfile.object=struct('Style','edit','String','settings/temp/temp_T.mat'); +pard.Tfile.object=struct('Style','edit','String','*_T.mat'); pard.Tfile.position=[8,1]; pard.Tfile.Width=3; diff --git a/plugins/+File/+Load/Loader_csvAndMore.m b/plugins/+File/+Load/Loader_csvAndMore.m index f0d0440d..5bbc51bf 100644 --- a/plugins/+File/+Load/Loader_csvAndMore.m +++ b/plugins/+File/+Load/Loader_csvAndMore.m @@ -1,6 +1,6 @@ classdef Loader_csvAndMore