Index: /trunk/src/fill_GUI.m
===================================================================
--- /trunk/src/fill_GUI.m	(revision 663)
+++ /trunk/src/fill_GUI.m	(revision 664)
@@ -7,5 +7,5 @@
 % INPUT:
 % Param: matlab structure containing the information to display in the GUI
-% handles: Matlab structure containing the handles of the GUI elements
+% GUI_handle: handle of the GUI to be filled 
 %
 % see also the reverse function read_GUI.m
@@ -14,10 +14,13 @@
 %------------------------------------------------------------------------
 errormsg='';
-%handles=guidata(GUI_handle); 
-            children=get(GUI_handle,'children');
-             handles=[];
-            for ichild=1:numel(children)
-                handles.(get(children(ichild),'tag'))=children(ichild);
-            end
+if ~isstruct(Param)
+    errormsg='first input parmaeter of fill_GUI must be a structure';
+    return
+end
+children=get(GUI_handle,'children');
+handles=[];
+for ichild=1:numel(children)
+    handles.(get(children(ichild),'tag'))=children(ichild);
+end
 UserData=get(GUI_handle,'UserData');
 fields=fieldnames(Param);%list of fields in Param
@@ -28,12 +31,5 @@
         if isfield(handles,fields{ifield})
             set(handles.(fields{ifield}),'Visible','on')
-            %             children=get(handles.(fields{ifield}),'children');
-            %             for ichild=1:numel(children)
-            %                 hchild.(get(children(ichild),'tag'))=children(ichild);
-            %             end
-            %   errormsg=fill_GUI(Param.(fields{ifield}),hchild);% apply the function to the substructure
             errormsg=fill_GUI(Param.(fields{ifield}),handles.(fields{ifield}));% apply the function to the substructure
-            % if the input sub-structure fits with a tag name of the GUI and a
-            % substructure of UserData
         elseif isfield(UserData,fields{ifield})&& isfield(handles,fields{ifield})&&isfield(Param.(fields{ifield}),'Name')
             UserData.(fields{ifield})=Param.(fields{ifield});
@@ -115,3 +111,2 @@
     end
 end
- 
Index: /trunk/src/get_file_type.m
===================================================================
--- /trunk/src/get_file_type.m	(revision 663)
+++ /trunk/src/get_file_type.m	(revision 664)
@@ -30,62 +30,67 @@
         FileType='xls';
     otherwise
-        if ~isempty(FileExt) && ~isempty(imformats(regexprep(FileExt,'^.','')))
-            try
-                imainfo=imfinfo(fileinput);
-                if length(imainfo) >1 %case of image with multiple frames
-                    FileType='multimage';
-                    FileInfo=imainfo(1);%take info from the first frame
-                    FileInfo.NumberOfFrames=length(imainfo);
+        if ~isempty(FileExt)% exclude empty extension
+            FileExt=regexprep(FileExt,'^.','');% eliminate the dot of the extension
+            if ~isempty(FileExt)
+                if ~isempty(imformats(FileExt))%case of images
+                    try
+                        imainfo=imfinfo(fileinput);
+                        if length(imainfo) >1 %case of image with multiple frames
+                            FileType='multimage';
+                            FileInfo=imainfo(1);%take info from the first frame
+                            FileInfo.NumberOfFrames=length(imainfo);
+                        else
+                            FileType='image';
+                            FileInfo=imainfo;
+                            FileInfo.NumberOfFrames=1;
+                        end
+                    end
                 else
-                    FileType='image';
-                    FileInfo=imainfo;
-                    FileInfo.NumberOfFrames=1;
-                end
-            end
-        else
-            error_nc=0;
-            try
-                Data=nc2struct(fileinput,'ListGlobalAttribute','absolut_time_T0','Conventions',...
-                    'CivStage','patch2','fix2','civ2','patch','fix');
-                if isfield(Data,'Txt') && ~isempty(Data.Txt)
-                    error_nc=1;
-                else
-                    if ~isempty(Data.absolut_time_T0')
-                        FileType='civx'; % test for civx velocity fields
-                        if ~isempty(Data.patch2) && isequal(Data.patch2,1)
-                            FileInfo.CivStage=6;
-                        elseif ~isempty(Data.fix2) && isequal(Data.fix2,1)
-                            FileInfo.CivStage=5;
-                        elseif ~isempty(Data.civ2) && isequal(Data.civ2,1);
-                            FileInfo.CivStage=4;
-                        elseif ~isempty(Data.patch) && isequal(Data.patch,1);
-                            FileInfo.CivStage=3;
-                        elseif ~isempty(Data.fix) && isequal(Data.fix,1);
-                            FileInfo.CivStage=2;
-                        elseif ~isempty(Data.absolut_time_T0) && ~isempty(Data.hart)
-                            FileInfo.CivStage=1;
+                    error_nc=0;
+                    try
+                        Data=nc2struct(fileinput,'ListGlobalAttribute','absolut_time_T0','Conventions',...
+                            'CivStage','patch2','fix2','civ2','patch','fix');
+                        if isfield(Data,'Txt') && ~isempty(Data.Txt)
+                            error_nc=1;
+                        else
+                            if ~isempty(Data.absolut_time_T0')
+                                FileType='civx'; % test for civx velocity fields
+                                if ~isempty(Data.patch2) && isequal(Data.patch2,1)
+                                    FileInfo.CivStage=6;
+                                elseif ~isempty(Data.fix2) && isequal(Data.fix2,1)
+                                    FileInfo.CivStage=5;
+                                elseif ~isempty(Data.civ2) && isequal(Data.civ2,1);
+                                    FileInfo.CivStage=4;
+                                elseif ~isempty(Data.patch) && isequal(Data.patch,1);
+                                    FileInfo.CivStage=3;
+                                elseif ~isempty(Data.fix) && isequal(Data.fix,1);
+                                    FileInfo.CivStage=2;
+                                elseif ~isempty(Data.absolut_time_T0) && ~isempty(Data.hart)
+                                    FileInfo.CivStage=1;
+                                end
+                            elseif strcmp(Data.Conventions,'uvmat/civdata')
+                                FileType='civdata'; % test for civx velocity fields
+                                FileInfo.CivStage=Data.CivStage;
+                            else
+                                FileType='netcdf';
+                            end
                         end
-                    elseif strcmp(Data.Conventions,'uvmat/civdata')
-                        FileType='civdata'; % test for civx velocity fields
-                        FileInfo.CivStage=Data.CivStage;
-                    else
-                        FileType='netcdf';
+                    catch ME
+                        error_nc=1;
                     end
-                end
-            catch ME
-                error_nc=1;
-            end
-            if error_nc
-                try
-                    if exist('VideoReader.m','file')%recent version of Matlab
-                        VideoObject=VideoReader(fileinput);
-                        FileInfo=get(VideoObject);
-                        FileType='video';
-                    elseif exist('mmreader.m','file')% Matlab 2009a
-                        VideoObject=mmreader(fileinput);
-                        FileInfo=get(VideoObject);
-                        FileType='mmreader';
-                    end  
-                    FileInfo.BitDepth=FileInfo.BitsPerPixel/3;
+                    if error_nc
+                        try
+                            if exist('VideoReader.m','file')%recent version of Matlab
+                                VideoObject=VideoReader(fileinput);
+                                FileInfo=get(VideoObject);
+                                FileType='video';
+                            elseif exist('mmreader.m','file')% Matlab 2009a
+                                VideoObject=mmreader(fileinput);
+                                FileInfo=get(VideoObject);
+                                FileType='mmreader';
+                            end
+                            FileInfo.BitDepth=FileInfo.BitsPerPixel/3;
+                        end
+                    end
                 end
             end
Index: /trunk/src/mouse_motion.m
===================================================================
--- /trunk/src/mouse_motion.m	(revision 663)
+++ /trunk/src/mouse_motion.m	(revision 664)
@@ -57,5 +57,5 @@
     test_edit_object=get(hhuvmat.CheckEditObject,'Value');
     test_ruler=isequal(get(hhuvmat.MenuRuler,'checked'),'on');
-    test_transform=~isequal(get(hhuvmat.TransformName,'Value'),1)
+    test_transform=~isequal(get(hhuvmat.TransformName,'Value'),1);
 end
 test_piv=0;
Index: /trunk/src/series.m
===================================================================
--- /trunk/src/series.m	(revision 663)
+++ /trunk/src/series.m	(revision 664)
@@ -2563,13 +2563,27 @@
 
 InputTable=get(handles.InputTable,'Data');
-[FileName, PathName] = uigetfile( ...
-       {'*.xml', ' (*.xml)';
-       '*.xml',  '.xml files '; ...
-        '*.*',  'All Files (*.*)'}, ...
-        'Pick a file',InputTable{1,1});
-filexml=[PathName FileName];%complete file name 
-if isempty(filexml),return;end %abandon if no file is introduced by the browser
-Param=xml2struct(filexml);
-fill_GUI(Param,handles.series)
+filexml=uigetfile_uvmat('pick a xml parameter file',InputTable{1,1},'.xml');
+% [FileName, PathName] = uigetfile( ...
+%        {'*.xml', ' (*.xml)';
+%        '*.xml',  '.xml files '; ...
+%         '*.*',  'All Files (*.*)'}, ...
+%         'Pick a file',InputTable{1,1});
+% filexml=[PathName FileName];%complete file name 
+if ~isempty(filexml)%abandon if no file is introduced by the browser
+    Param=xml2struct(filexml);
+    fill_GUI(Param,handles.series)
+    if isfield(Param,'ActionInput')
+            set(handles.ActionInput,'Visible','on')
+    set(handles.ActionInput_title,'Visible','on')
+    set(handles.ActionInputView,'Visible','on')
+    set(handles.ActionInputView,'Value',0)
+    %set(handles.ActionInput,'String',ActionName)
+%    ParamOut.ActionInput.Program=ActionName; % record the program in ActionInput
+    SeriesData=get(handles.series,'UserData');
+    SeriesData.ActionInput=Param.ActionInput;
+    set(handles.series,'UserData',SeriesData)
+    end
+    ActionName_Callback([],[],handles)
+end
 
 %------------------------------------------------------------------------
Index: /trunk/src/uigetfile_uvmat.m
===================================================================
--- /trunk/src/uigetfile_uvmat.m	(revision 663)
+++ /trunk/src/uigetfile_uvmat.m	(revision 664)
@@ -123,9 +123,4 @@
 function OK_Callback(option,filter_ext,hObject,event)
 hfig=get(hObject,'parent');%handle of the fig
-% if ~strcmp(get(hfig,'SelectionType'),'open')
-%     return %select double click
-% end
-%set(hObject,'BackgroundColor',[1 1 0])% paint list in yellow to indicate action
-%     drawnow
 htitlebox=findobj(hfig,'tag','titlebox');  % display the current dir name  
 DirName=get(htitlebox,'String');
@@ -135,14 +130,14 @@
     list=get(hlist,'String');
     index=get(hlist,'Value');
-    SelectName=regexprep(list{index},'^\+/','');% remove the +/ used to mark dir
+    if ~isempty(regexp(list{index},'^\+/'))
+        return % quit if a dir has been opened
+    end
+    %SelectName=regexprep(list{index},'^\+/','');% remove the +/ used to mark dir
+    SelectName=list{index};
     ind_dot=regexp(SelectName,'\s*\.\.\.');%remove what is beyond  '...'
     if ~isempty(ind_dot)
         SelectName=SelectName(1:ind_dot-1);
     end
-    % if strcmp(SelectName,'..')% the upward dir option has been selected
-    %     FullSelectName=fileparts(DirName);
-    % else
     FullSelectName=fullfile(DirName,SelectName);
-    % end
     if exist(FullSelectName,'file')
         switch option
@@ -164,5 +159,4 @@
     end
 end
-%set(hObject,'BackgroundColor',[0.7 0.7 0.7])% paint list in grey to indicate action end
 
 uiresume(get(hObject,'parent'))
@@ -253,7 +247,4 @@
 %------------------------------------------------------------------------
 hfig=get(hObject,'parent');%handle of the fig
-% if ~strcmp(get(hfig,'SelectionType'),'open')
-%     return %select double click
-% end
 set(hObject,'BackgroundColor',[1 1 0])% paint list in yellow to indicate action
     drawnow
