Changeset 134


Ignore:
Timestamp:
Jun 28, 2010, 10:35:31 AM (9 years ago)
Author:
tjniskan
Message:
  • Fixed an "uitreenode" warning that gets thrown with Matlab R2008a

and newer

M aedes_revision.m
M aedes_juigetfiles.m

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • aedes_juigetfiles.m

    r133 r134  
    111111%% Disable warnings about deprecated functions in Matlab R2008a->
    112112version_number = aedes_getmatlabversion;
    113 if version_number>=7.06
    114   warning('off','MATLAB:uitree:DeprecatedFunction');
    115   warning('off','MATLAB:uitreenode:DeprecatedFunction');
    116 end
     113%if version_number>=7.06
     114%  warning('off','MATLAB:uitree:DeprecatedFunction');
     115%  warning('off','MATLAB:uitreenode:DeprecatedFunction');
     116%end
    117117
    118118%% Create uitree for directory browsing --------------
    119119rooticonpath = [iconpath,'MyComputer.gif'];
    120 rootnode = uitreenode('My Computer','My Computer',rooticonpath,false);
     120if version_number>=7.06
     121  rootnode = uitreenode('v0','My Computer','My Computer',rooticonpath,false);
     122else
     123  rootnode = uitreenode('My Computer','My Computer',rooticonpath,false);
     124end
    121125tree = uitree(fh,'Root',rootnode,'position',pos);%,'ExpandFcn',@l_ExpFcn);
    122126set(tree,'NodeExpandedCallback',{@l_ExpFcnAlt,tree})
     
    129133             'NodeExpandedCallback',{@l_OpenDirectory,tree,1});
    130134%'NodeSelectedCallback',{@l_FileTreeNodeSelected,filetree},...
    131 fileroot = uitreenode('Loading','Loading...','',false);
     135if version_number>=7.06
     136  fileroot = uitreenode('v0','Loading','Loading...','',false);
     137else
     138  fileroot = uitreenode('Loading','Loading...','',false);
     139end
    132140filetree.setRoot(fileroot);
    133141filetree.reloadNode(fileroot);
     
    138146%% Create selected files uitree
    139147pos2=get(filetree,'position');
    140 selfiletreeroot = uitreenode('Selected Files','0 Files Selected','',false);
     148if version_number>=7.06
     149  selfiletreeroot = uitreenode('v0','Selected Files','0 Files Selected','',false);
     150else
     151  selfiletreeroot = uitreenode('Selected Files','0 Files Selected','',false);
     152end
    141153selfiletree = uitree(fh,'Root',selfiletreeroot,'position',[pos(1)+pos2(3)+pos(3)+100 pos(2) 220 pos(4)]);
    142154set(selfiletree,'DndEnabled',true);
     
    486498evdnode = evd.getCurrentNode;
    487499value=evdnode.getValue;
     500version_number = aedes_getmatlabversion;
    488501
    489502if ~tree.isLoaded(evdnode)
     
    505518          else
    506519                iconpath = [H.iconpath,'driveicon.gif'];
    507           end
    508           nodes(ii) = uitreenode(drives{ii},drives{ii},iconpath,0);
     520    end
     521    if version_number >= 7.06
     522      nodes(ii) = uitreenode('v0',drives{ii},drives{ii},iconpath,0);
     523    else
     524      nodes(ii) = uitreenode(drives{ii},drives{ii},iconpath,0);
     525    end
    509526        end
    510527  else
     
    540557        %leafing=l_CheckLeafing([value, directories{ii}, filesep]);
    541558        leafing=false;
    542         nodes(count) = uitreenode([value, directories{ii}, filesep], ...
    543                                   directories{ii}, iconpath, leafing);
     559        if version_number >= 7.06
     560          nodes(count) = uitreenode('v0',[value, directories{ii}, filesep], ...
     561            directories{ii}, iconpath, leafing);
     562        else
     563          nodes(count) = uitreenode([value, directories{ii}, filesep], ...
     564            directories{ii}, iconpath, leafing);
     565        end
    544566      end
    545567    end
     
    598620set(H.fh,'pointer','watch')
    599621drawnow
     622version_number = aedes_getmatlabversion;
    600623
    601624% Clear file tree view
    602625filetree.setRoot([]);
    603 fileroot = uitreenode('Loading','Loading...','',false);
     626if version_number >=7.06
     627  fileroot = uitreenode('v0','Loading','Loading...','',false);
     628else
     629  fileroot = uitreenode('Loading','Loading...','',false);
     630end
    604631filetree.setRoot(fileroot);
    605632filetree.reloadNode(fileroot);
     
    717744  if ~any(strcmp(directories{ii},{'.','..'}))
    718745    count=count+1;
    719     nodes(count)=uitreenode([path,directories{ii},filesep],directories{ii},[H.iconpath,'Folder.gif'],false);
     746    if version_number>=7.06
     747      nodes(count)=uitreenode('v0',[path,directories{ii},filesep],directories{ii},[H.iconpath,'Folder.gif'],false);
     748    else
     749      nodes(count)=uitreenode([path,directories{ii},filesep],directories{ii},[H.iconpath,'Folder.gif'],false);
     750    end
    720751  end
    721752end
    722753for ii=1:length(filenames)
    723754  count=count+1;
    724   nodes(count)=uitreenode([path,filenames{ii}],filenames{ii},[H.iconpath,'new.gif'],true);
     755  if version_number>=7.06
     756    nodes(count)=uitreenode('v0',[path,filenames{ii}],filenames{ii},[H.iconpath,'new.gif'],true);
     757  else
     758    nodes(count)=uitreenode([path,filenames{ii}],filenames{ii},[H.iconpath,'new.gif'],true);
     759  end
    725760end
    726761
     
    858893% Get handles
    859894H=getappdata(findall(0,'tag','aedes_juigetfiles_main_fig'),'H');
     895
     896version_number = aedes_getmatlabversion;
     897
    860898
    861899switch opt
     
    905943       name_str = [fname,fext];
    906944     end
    907      new_nodes(ii) = uitreenode(selfilenodes(ii).getValue,...
    908                                 name_str,...
    909                                 [H.iconpath,'new.gif'],...
    910                                 true);
     945     if version_number >= 7.06
     946       new_nodes(ii) = uitreenode('v0',selfilenodes(ii).getValue,...
     947         name_str,...
     948         [H.iconpath,'new.gif'],...
     949         true);
     950     else
     951       new_nodes(ii) = uitreenode(selfilenodes(ii).getValue,...
     952         name_str,...
     953         [H.iconpath,'new.gif'],...
     954         true);
     955     end
    911956     selfilenodevalues{ii}=selfilenodes(ii).getValue;
    912957   end
     
    935980           end
    936981           count=count+1;
    937            new_nodes(count) = uitreenode(nodeVal,...
    938                  name_str,...
    939                  [H.iconpath,'new.gif'],...
    940                  true);
     982     if version_number >= 7.06
     983       new_nodes(count) = uitreenode('v0',nodeVal,...
     984         name_str,...
     985         [H.iconpath,'new.gif'],...
     986         true);
     987     else
     988       new_nodes(count) = uitreenode(nodeVal,...
     989         name_str,...
     990         [H.iconpath,'new.gif'],...
     991         true);
     992     end
    941993         end
    942994   end
  • aedes_revision.m

    r133 r134  
    9393% bash-script every time it is called so that this file "aedes_revision.m" is
    9494% always in the list of committed files. DO NOT EDIT THE NEXT LINE!!!
    95 % - SVN Hook -
     95% - Svn Hook -
Note: See TracChangeset for help on using the changeset viewer.

Powered by Trac 1.0.9.Copyright © Juha-Pekka Niskanen 2008