Ignore:
Timestamp:
Aug 10, 2020, 3:20:45 PM (4 years ago)
Author:
sommeria
Message:

various updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/uigetfile_uvmat.m

    r1071 r1084  
    9393    uicontrol('Style','pushbutton','Tag','refresh','Units','normalized','Position', [0.36 0.77 0.2 0.05],'Callback',@refresh_GUI,...
    9494        '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','off',...
     95    uicontrol('Style','popupmenu','Units','normalized', 'Position', [0.75 0.74 0.23 0.05],'tag','sort_option','Callback',@refresh_GUI,'Visible','on',...
    9696        'String',{'sort name';'sort date'},'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''sort_option'': sort the files by names or dates');
    9797    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',...
     
    102102    close_button=uicontrol('Style','pushbutton','Units','normalized', 'Position', [0.78 0.005 0.2 0.07],'Callback',@(src,event)close(option,src,event),...
    103103        'FontWeight','bold','FontUnits','points','FontSize',12);
    104     %set(hrefresh,'UserData',StatusData)
    105104    if strcmp(option,'status_display') %put a run advancement display
    106105        set(hfig,'DeleteFcn',@(src,event)close(option,src,event))
    107106        uicontrol('Style','frame','Units','normalized', 'Position', [0.02 0.85 0.9 0.04]);
    108107        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');
    111108        delete(home_button)
    112109        set(OK_button,'String','Open')
     
    198195set(hObject,'backgroundColor',[0 1 0])% indicate end button activatio
    199196fig_struct=get(hObject,'parent');
    200 if isstruct(fig_struct);%recent Matlab
     197if isstruct(fig_struct)%recent Matlab
    201198uiresume(fig_struct.Number)
    202199else
     
    337334%-------------------------------------------------------------------------
    338335ListStruct=dir_uvmat(DirName);% get structure of the current directory
     336date_index=find(strcmp('datenum',fieldnames(ListStruct)));% find the index of the date displayin the list of fields
    339337NumFiles=0; %default
    340338if numel(ListStruct)<1  % case of empty dir
     
    363361    check_dir=check_dir(check_keep);
    364362end
    365 check_emptydate=cellfun('isempty',ListCells(5,:));% = 1 if datenum undefined
    366 ListCells(5,find(check_emptydate))={0}; %set to 0 the empty dates
    367 ListDates=cell2mat(ListCells(5,:));%list of numerical dates
     363check_emptydate=cellfun('isempty',ListCells(date_index,:));% = 1 if datenum undefined
     364ListCells(date_index,find(check_emptydate))={0}; %set to 0 the empty dates
     365ListDates=cell2mat(ListCells(date_index,:));%list of numerical dates
    368366if isnumeric(sort_option)
    369367    check_old=ListDates<sort_option-1;% -1 is put to account for a 1 s delay in the record of starting time
     
    384382ListFiles=[{'+/..'} ListFiles(check_keep)];
    385383if check_date
    386     ListDateString=ListCells(2,:);%list of file dates
     384    ListDateString=ListCells(3,:);%list of file dates
    387385    if isnumeric(sort_option)
    388386        ListDateString(check_old)={'--OLD--'};
Note: See TracChangeset for help on using the changeset viewer.