- Timestamp:
- May 8, 2021, 11:07:13 AM (4 years ago)
- Location:
- trunk/src
- Files:
-
- 4 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r1101 r1102 216 216 path_list{1}=''; 217 217 for ilist=2:UvData.OpenParam.NbBuiltin 218 path_list{ilist}=transform_path; % set transform_path to the path_list 219 end 218 path_list{ilist}=transform_path; % set transform_path to the path_list 219 end 220 221 %% EXPORT menu 222 export_menu={'as field in workspace';'in new figure';'on existing axis';'make movie';'more...'}; 223 export_path=fullfile(path_uvmat,'export_fct'); 220 224 221 225 %% load the list of previously browsed files in menus Open, Open_1 and TransformName … … 238 242 end 239 243 if isfield(h,'transform_fct') && iscell(h.transform_fct) % load the menu of transform fct set by user 240 for ilist=1:length(h.transform_fct) ;244 for ilist=1:length(h.transform_fct) 241 245 if exist(h.transform_fct{ilist},'file') 242 246 [path,file]=fileparts(h.transform_fct{ilist}); 243 247 transform_menu=[transform_menu; {file}]; 244 248 path_list=[path_list; {path}]; 249 end 250 end 251 end 252 if isfield(h,'export_fct') && iscell(h.export_fct) % load the menu of export fct set by user 253 for ilist=1:length(h.export_fct) 254 if exist(h.export_fct{ilist},'file') 255 [path,file]=fileparts(h.export_fct{ilist}); 256 export_menu=[export_menu; {file}]; 245 257 end 246 258 end … … 252 264 set(handles.TransformPath,'String','') 253 265 set(handles.TransformPath,'UserData',[]) 266 export_menu=[export_menu;{'more...'}];%append the option more.. to the menu 267 %set(handles.TransformName,'String',transform_menu)% display the menu of transform fcts 254 268 255 269 %% case of an input argument for uvmat … … 877 891 delete(hObject) 878 892 893 % -------------------------------------------------------------------- 894 function MenuExportCustom_Callback(hObject, eventdata, handles) 895 export_fct_name=get(handles.MenuExportCustom,'label'); 896 current_dir=pwd;%current working dir 897 cd(fullfile(fileparts(which('uvmat')),'export_fct')) 898 export_handle=str2func(export_fct_name); 899 cd(current_dir) 900 export_handle(handles) 901 902 % -------------------------------------------------------------------- 903 function MenuExportMore_Callback(hObject, eventdata, handles) 904 905 prev_path=fullfile(fileparts(which('uvmat')),'export_fct'); 906 transform_fct_chosen=uigetfile_uvmat('Pick the export function',prev_path,'.m'); 907 if ~isempty(transform_fct_chosen) 908 [PathName,transform_name]=fileparts(transform_fct_chosen); 909 set(handles.MenuExportCustom,'label',transform_name) 910 set(handles.MenuExportCustom,'checked','on') 911 MenuExportCustom_Callback(hObject, eventdata, handles) 912 end 879 913 880 914 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Note: See TracChangeset
for help on using the changeset viewer.