Changeset 38 for trunk/src/series.m


Ignore:
Timestamp:
Mar 7, 2010, 6:30:11 PM (15 years ago)
Author:
sommeria
Message:

field transforms put in subdir transform_field. cleaning of obsolete functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series.m

    r36 r38  
    5555%--------------------------------------------------------------------------
    5656function series_OpeningFcn(hObject, eventdata, handles,param)
    57 global nb_builtin
     57global nb_builtin nb_transform
    5858% Choose default command line output for series
    5959handles.output = hObject;
     
    133133
    134134%loads the information stored in prefdir to initiate the browser and the list of functions
    135 menu_str={'check_files';'aver_stat';'time_series';'merge_proj';'clean_civ_cmx'};
    136 nb_builtin=numel(menu_str); %number of functions
     135fct_menu={'check_files';'aver_stat';'time_series';'merge_proj';'clean_civ_cmx'};
     136transform_menu={'';'phys';'px';'phys_polar'};
     137nb_builtin=numel(fct_menu); %number of functions
     138nb_transform=numel(transform_menu);
    137139[path_series,name,ext]=fileparts(which('series'));
    138140path_series=fullfile(path_series,'series');%path of the function 'series'
    139 
    140 for ilist=1:length(menu_str)
     141path_transform=fullfile(path_series,'transform_field');%path of the function 'series'
     142for ilist=1:length(fct_menu)
    141143    fct_path{ilist,1}=path_series;%paths of the fuctions buil-in in 'series.m'
     144end
     145for ilist=1:length(transform_menu)
     146    transform_path{ilist,1}=path_transform;
    142147end
    143148% read the list of functions stored in the personal file 'uvmat_perso.mat' in prefdir
     
    150155             [path,file]=fileparts(h.series_fct{ilist});
    151156             fct_path=[fct_path; {path}];%concatene the list of paths
    152              menu_str=[menu_str; {file}];
     157             transform_menu=[transform_menu; {file}];
    153158         end
    154159    end
    155 end
    156 
    157 menu_str=[menu_str;{'more...'}];
    158 set(handles.ACTION,'String',menu_str)
     160    if isfield(h,'transform_fct') && iscell(h.transform_fct)
     161         for ilist=1:length(h.transform_fct)
     162             [path,file]=fileparts(h.transform_fct{ilist});
     163             transform_path=[transform_path; {path}];%concatene the list of paths
     164             transform_menu=[transform_menu;{file}];
     165         end
     166    end
     167end
     168fct_menu=[fct_menu;{'more...'}];
     169set(handles.ACTION,'String',fct_menu)
    159170set(handles.ACTION,'UserData',fct_path)% store the list of path in UserData of ACTION
     171transform_menu=[transform_menu;{'more...'}];
     172set(handles.CoordType,'String',transform_menu)
     173set(handles.CoordType,'UserData',transform_path)% store the list of path in UserData of ACTION
    160174
    161175% display the GUI for the default action 'check_files'
Note: See TracChangeset for help on using the changeset viewer.