Changeset 1084 for trunk/src/uigetfile_uvmat.m
- Timestamp:
- Aug 10, 2020, 3:20:45 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uigetfile_uvmat.m
r1071 r1084 93 93 uicontrol('Style','pushbutton','Tag','refresh','Units','normalized','Position', [0.36 0.77 0.2 0.05],'Callback',@refresh_GUI,... 94 94 'String','Refresh','FontWeight','bold','FontUnits','points','FontSize',12); 95 uicontrol('Style','popupmenu','Units','normalized', 'Position', [0.75 0.74 0.23 0.05],'tag','sort_option','Callback',@refresh_GUI,'Visible','o ff',...95 uicontrol('Style','popupmenu','Units','normalized', 'Position', [0.75 0.74 0.23 0.05],'tag','sort_option','Callback',@refresh_GUI,'Visible','on',... 96 96 'String',{'sort name';'sort date'},'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''sort_option'': sort the files by names or dates'); 97 97 uicontrol('Style','listbox','Units','normalized', 'Position',[0.02 0.08 0.96 0.66], 'Callback', @(src,event)list_Callback(option,FilterExt,src,event),'tag','list',... … … 102 102 close_button=uicontrol('Style','pushbutton','Units','normalized', 'Position', [0.78 0.005 0.2 0.07],'Callback',@(src,event)close(option,src,event),... 103 103 'FontWeight','bold','FontUnits','points','FontSize',12); 104 %set(hrefresh,'UserData',StatusData)105 104 if strcmp(option,'status_display') %put a run advancement display 106 105 set(hfig,'DeleteFcn',@(src,event)close(option,src,event)) 107 106 uicontrol('Style','frame','Units','normalized', 'Position', [0.02 0.85 0.9 0.04]); 108 107 uicontrol('Style','frame','Units','normalized', 'Position',[0.02 0.85 0.01 0.04],'BackgroundColor',[1 0 0],'tag','waitbar'); 109 % uicontrol('Style','text','Units','normalized', 'Position', [0.4 0.8 0.35 0.03],'BackgroundColor',BackgroundColor,...110 % 'String','sort: ','FontUnits','points','FontSize',12,'FontWeight','bold','HorizontalAlignment','right');111 108 delete(home_button) 112 109 set(OK_button,'String','Open') … … 198 195 set(hObject,'backgroundColor',[0 1 0])% indicate end button activatio 199 196 fig_struct=get(hObject,'parent'); 200 if isstruct(fig_struct) ;%recent Matlab197 if isstruct(fig_struct)%recent Matlab 201 198 uiresume(fig_struct.Number) 202 199 else … … 337 334 %------------------------------------------------------------------------- 338 335 ListStruct=dir_uvmat(DirName);% get structure of the current directory 336 date_index=find(strcmp('datenum',fieldnames(ListStruct)));% find the index of the date displayin the list of fields 339 337 NumFiles=0; %default 340 338 if numel(ListStruct)<1 % case of empty dir … … 363 361 check_dir=check_dir(check_keep); 364 362 end 365 check_emptydate=cellfun('isempty',ListCells( 5,:));% = 1 if datenum undefined366 ListCells( 5,find(check_emptydate))={0}; %set to 0 the empty dates367 ListDates=cell2mat(ListCells( 5,:));%list of numerical dates363 check_emptydate=cellfun('isempty',ListCells(date_index,:));% = 1 if datenum undefined 364 ListCells(date_index,find(check_emptydate))={0}; %set to 0 the empty dates 365 ListDates=cell2mat(ListCells(date_index,:));%list of numerical dates 368 366 if isnumeric(sort_option) 369 367 check_old=ListDates<sort_option-1;% -1 is put to account for a 1 s delay in the record of starting time … … 384 382 ListFiles=[{'+/..'} ListFiles(check_keep)]; 385 383 if check_date 386 ListDateString=ListCells( 2,:);%list of file dates384 ListDateString=ListCells(3,:);%list of file dates 387 385 if isnumeric(sort_option) 388 386 ListDateString(check_old)={'--OLD--'};
Note: See TracChangeset
for help on using the changeset viewer.