tomwalters@0: % procedure for 'aim-mat' tomwalters@0: % function aim_display_versions(handles) tomwalters@0: % INPUT VALUES: tomwalters@0: % RETURN VALUE: tomwalters@0: % bleeck@3: % tomwalters@0: % (c) 2011, University of Southampton bleeck@3: % Maintained by Stefan Bleeck (bleeck@gmail.com) bleeck@3: % download of current version is on the soundsoftware site: bleeck@3: % http://code.soundsoftware.ac.uk/projects/aimmat bleeck@3: % documentation and everything is on http://www.acousticscale.org bleeck@3: bleeck@3: tomwalters@0: tomwalters@0: tomwalters@0: function aim_display_versions(handles) tomwalters@0: tomwalters@0: %PCP tomwalters@0: pcpnames=get(handles.listbox0,'String'); tomwalters@0: for i=1:length(pcpnames) tomwalters@0: str=sprintf('ver=handles.all_options.pcp.%s.revision;',pcpnames{i}); tomwalters@0: try tomwalters@0: eval(str); tomwalters@0: catch tomwalters@0: ver='Revision not known'; tomwalters@0: end tomwalters@0: text{1}{i}.columname='PCP'; tomwalters@0: text{1}{i}.modulename=pcpnames{i}; tomwalters@0: text{1}{i}.version=ver; tomwalters@0: end tomwalters@0: %BMM tomwalters@0: bmmnames=get(handles.listbox1,'String'); tomwalters@0: for i=1:length(bmmnames) tomwalters@0: str=sprintf('ver=handles.all_options.bmm.%s.revision;',bmmnames{i}); tomwalters@0: try tomwalters@0: eval(str); tomwalters@0: catch tomwalters@0: ver='Revision not known'; tomwalters@0: end tomwalters@0: text{2}{i}.columname='BMM'; tomwalters@0: text{2}{i}.modulename=bmmnames{i}; tomwalters@0: text{2}{i}.version=ver; tomwalters@0: end tomwalters@0: %NAP tomwalters@0: napnames=get(handles.listbox2,'String'); tomwalters@0: for i=1:length(napnames) tomwalters@0: str=sprintf('ver=handles.all_options.nap.%s.revision;',napnames{i}); tomwalters@0: try tomwalters@0: eval(str); tomwalters@0: catch tomwalters@0: ver='Revision not known'; tomwalters@0: end tomwalters@0: text{3}{i}.columname='NAP'; tomwalters@0: text{3}{i}.modulename=napnames{i}; tomwalters@0: text{3}{i}.version=ver; tomwalters@0: end tomwalters@0: %STROBES tomwalters@0: strobesnames=get(handles.listbox3,'String'); tomwalters@0: for i=1:length(strobesnames) tomwalters@0: str=sprintf('ver=handles.all_options.strobes.%s.revision;',strobesnames{i}); tomwalters@0: try tomwalters@0: eval(str); tomwalters@0: catch tomwalters@0: ver='Revision not known'; tomwalters@0: end tomwalters@0: text{4}{i}.columname='STROBES'; tomwalters@0: text{4}{i}.modulename=strobesnames{i}; tomwalters@0: text{4}{i}.version=ver; tomwalters@0: end tomwalters@0: %SAI tomwalters@0: sainames=get(handles.listbox4,'String'); tomwalters@0: for i=1:length(sainames) tomwalters@0: str=sprintf('ver=handles.all_options.sai.%s.revision;',sainames{i}); tomwalters@0: try tomwalters@0: eval(str); tomwalters@0: catch tomwalters@0: ver='Revision not known'; tomwalters@0: end tomwalters@0: text{5}{i}.columname='SAI'; tomwalters@0: text{5}{i}.modulename=sainames{i}; tomwalters@0: text{5}{i}.version=ver; tomwalters@0: end tomwalters@0: %USER tomwalters@0: usernames=get(handles.listbox6,'String'); tomwalters@0: for i=1:length(usernames) tomwalters@0: str=sprintf('ver=handles.all_options.user.%s.revision;',usernames{i}); tomwalters@0: try tomwalters@0: eval(str); tomwalters@0: catch tomwalters@0: ver='Revision not known'; tomwalters@0: end tomwalters@0: text{6}{i}.columname='USER'; tomwalters@0: text{6}{i}.modulename=usernames{i}; tomwalters@0: text{6}{i}.version=ver; tomwalters@0: end tomwalters@0: %MOVIES tomwalters@0: movienames=get(handles.listbox5,'String'); tomwalters@0: for i=1:length(movienames) tomwalters@0: str=sprintf('ver=handles.all_options.movie.%s.revision;',movienames{i}); tomwalters@0: try tomwalters@0: eval(str); tomwalters@0: catch tomwalters@0: ver='Revision not known'; tomwalters@0: end tomwalters@0: text{7}{i}.columname='MOVIES'; tomwalters@0: text{7}{i}.modulename=movienames{i}; tomwalters@0: text{7}{i}.version=ver; tomwalters@0: end tomwalters@0: tomwalters@0: tomwalters@0: figure; tomwalters@0: win=get(gca,'Parent'); tomwalters@0: set(win,'Name','All models and all versions'); tomwalters@0: set(win,'NumberTitle','off'); tomwalters@0: set(win,'MenuBar','none'); tomwalters@0: movegui(win,'center'); tomwalters@0: pos=get(win,'Position'); tomwalters@0: set(win,'Visible','on'); tomwalters@0: box = uicontrol('Style', 'ListBox','Position', [0,0,pos(3),pos(4)],'HorizontalAlignment','left'); tomwalters@0: set(box,'Parent',win); tomwalters@0: set(box,'FontSize',10); tomwalters@0: tomwalters@0: str=[]; tomwalters@0: counter=1; tomwalters@0: for i=1:7 tomwalters@0: nr_modules=length(text{i}); tomwalters@0: str{counter}=text{i}{1}.columname ; tomwalters@0: counter=counter+1; tomwalters@0: % str=[str text{i}{1}.columname '\n']; tomwalters@0: for j=1:nr_modules tomwalters@0: ver=strrep(text{i}{j}.version,'$',''); tomwalters@0: str{counter}=[' ' text{i}{j}.modulename ' ' ver]; tomwalters@0: counter=counter+1; tomwalters@0: % str=[str text{i}{j}.modulename '\t' text{i}{j}.version '\n']; tomwalters@0: end tomwalters@0: end tomwalters@0: tomwalters@0: tomwalters@0: % display the conflicts tomwalters@0: tomwalters@0: str{counter}='' ; tomwalters@0: counter=counter+1; tomwalters@0: str{counter}='' ; tomwalters@0: counter=counter+1; tomwalters@0: % conflicts: tomwalters@0: if isfield(handles.info,'conflicts') tomwalters@0: conflicts=handles.info.conflicts; tomwalters@0: else tomwalters@0: return tomwalters@0: end tomwalters@0: tomwalters@0: tomwalters@0: if isempty(conflicts) tomwalters@0: str{counter}='no conflicts'; tomwalters@0: % counter=counter+1;%#ok tomwalters@0: else tomwalters@0: str{counter}='conflicts:'; tomwalters@0: counter=counter+1; tomwalters@0: for i=1:length(conflicts) tomwalters@0: str{counter}=conflicts{i}; tomwalters@0: counter=counter+1; tomwalters@0: end tomwalters@0: end tomwalters@0: tomwalters@0: tomwalters@0: tomwalters@0: set(box,'String',str); tomwalters@0: set(box,'max',length(str)); tomwalters@0: tomwalters@0: tomwalters@0: