@@ -70,7 +70,7 @@ function figure_configs_OpeningFcn(hObject, eventdata, handles, varargin)
7070 ' JPEG image (.jpg)' ,...
7171 ' Portable Network Graphics (.png)' ,...
7272 ' Encapsulated PostScript (.eps)' ,...
73- ' Scalable Vector Graphics) (.svg)' ,...
73+ ' Scalable Vector Graphics (.svg)' ,...
7474 ' Portable Document Format (.pdf)' ,...
7575 ' Windows bitmap (.bmp)' ,...
7676 ' TIFF image, compressed (.tif)' };
@@ -160,13 +160,15 @@ function export_style_CreateFcn(hObject, eventdata, handles)
160160function ok_Callback(hObject , eventdata , handles )
161161 % Read the configs.txt
162162 fmt = repmat(' %s ' ,[1 ,3 ]);
163- if ~isdeployed
164- fileID = fopen(' configs.txt' );
165- contents = textscan(fileID ,fmt ,' CollectOutput' ,1 ,' Delimiter' ,' ,' );
166- else
167- fileID = fopen(fullfile(ctfroot ,' configs' ,' configs.txt' ));
168- contents = textscan(fileID ,fmt ,' CollectOutput' ,1 ,' Delimiter' ,' ,' );
169- end
163+ % if ~isdeployed
164+ % fileID = fopen('configs.txt');
165+ % contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
166+ % else
167+ % fileID = fopen(fullfile(ctfroot,'configs','configs.txt'));
168+ % contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
169+ % end
170+ fileID = fopen(' configs.txt' );
171+ contents = textscan(fileID ,fmt ,' CollectOutput' ,1 ,' Delimiter' ,' ,' );
170172 contents = contents{1 ,1 };
171173 fclose(fileID );
172174 % Get the gui data
@@ -196,26 +198,29 @@ function ok_Callback(hObject, eventdata, handles)
196198 end
197199 end
198200 new = cell2table(contents );
199- if ~isdeployed
200- path = fullfile(pwd ,' configs' ,' configs.txt' );
201- writetable(new ,path ,' WriteVariableNames' ,0 );
202- else
203- path = fullfile(ctfroot ,' configs' ,' configs.txt' );
204- writetable(new ,path ,' WriteVariableNames' ,0 );
205- end
201+ % if ~isdeployed
202+ % path = fullfile(pwd,'configs','configs.txt');
203+ % writetable(new,path,'WriteVariableNames',0);
204+ % else
205+ % path = fullfile(ctfroot,'configs','configs.txt');
206+ % writetable(new,path,'WriteVariableNames',0);
207+ % end
208+ writetable(new ,' configs.txt' ,' WriteVariableNames' ,0 );
206209 close(gcf );
207210
208211
209212function cancel_Callback(hObject , eventdata , handles )
210213 % Read the configs.txt
211214 fmt = repmat(' %s ' ,[1 ,3 ]);
212- if ~isdeployed
213- fileID = fopen(' configs.txt' );
214- contents = textscan(fileID ,fmt ,' CollectOutput' ,1 ,' Delimiter' ,' ,' );
215- else
216- fileID = fopen(fullfile(ctfroot ,' configs' ,' configs.txt' ));
217- contents = textscan(fileID ,fmt ,' CollectOutput' ,1 ,' Delimiter' ,' ,' );
218- end
215+ % if ~isdeployed
216+ % fileID = fopen('configs.txt');
217+ % contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
218+ % else
219+ % fileID = fopen(fullfile(ctfroot,'configs','configs.txt'));
220+ % contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
221+ % end
222+ fileID = fopen(' configs.txt' );
223+ contents = textscan(fileID ,fmt ,' CollectOutput' ,1 ,' Delimiter' ,' ,' );
219224 contents = contents{1 ,1 };
220225 fclose(fileID );
221226 % Get the backup
@@ -235,13 +240,14 @@ function cancel_Callback(hObject, eventdata, handles)
235240 end
236241 end
237242 new = cell2table(contents );
238- if ~isdeployed
239- path = fullfile(pwd ,' configs' ,' configs.txt' );
240- writetable(new ,path ,' WriteVariableNames' ,0 );
241- else
242- path = fullfile(ctfroot ,' configs' ,' configs.txt' );
243- writetable(new ,path ,' WriteVariableNames' ,0 );
244- end
243+ % if ~isdeployed
244+ % path = fullfile(pwd,'configs','configs.txt');
245+ % writetable(new,path,'WriteVariableNames',0);
246+ % else
247+ % path = fullfile(ctfroot,'configs','configs.txt');
248+ % writetable(new,path,'WriteVariableNames',0);
249+ % end
250+ writetable(new ,' configs.txt' ,' WriteVariableNames' ,0 );
245251 close(gcf );
246252
247253function axes1_CreateFcn(hObject , eventdata , handles )
@@ -251,24 +257,27 @@ function axes1_CreateFcn(hObject, eventdata, handles)
251257function default_Callback(hObject , eventdata , handles )
252258 % Read the configs_default.txt
253259 fmt = repmat(' %s ' ,[1 ,3 ]);
254- if ~isdeployed
255- fileID = fopen(' configs_default.txt' );
256- contents = textscan(fileID ,fmt ,' CollectOutput' ,1 ,' Delimiter' ,' ,' );
257- else
258- fileID = fopen(fullfile(ctfroot ,' configs' ,' configs_default.txt' ));
259- contents = textscan(fileID ,fmt ,' CollectOutput' ,1 ,' Delimiter' ,' ,' );
260- end
260+ % if ~isdeployed
261+ % fileID = fopen('configs_default.txt');
262+ % contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
263+ % else
264+ % fileID = fopen(fullfile(ctfroot,'configs','configs_default.txt'));
265+ % contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
266+ % end
267+ fileID = fopen(' configs_default.txt' );
268+ contents = textscan(fileID ,fmt ,' CollectOutput' ,1 ,' Delimiter' ,' ,' );
261269 contents = contents{1 ,1 };
262270 fclose(fileID );
263271 % Write to the configs.txt
264272 new = cell2table(contents );
265- if ~isdeployed
266- path = fullfile(pwd ,' configs' ,' configs.txt' );
267- writetable(new ,path ,' WriteVariableNames' ,0 );
268- else
269- path = fullfile(ctfroot ,' configs' ,' configs.txt' );
270- writetable(new ,path ,' WriteVariableNames' ,0 );
271- end
273+ % if ~isdeployed
274+ % path = fullfile(pwd,'configs','configs.txt');
275+ % writetable(new,path,'WriteVariableNames',0);
276+ % else
277+ % path = fullfile(ctfroot,'configs','configs.txt');
278+ % writetable(new,path,'WriteVariableNames',0);
279+ % end
280+ writetable(new ,' configs.txt' ,' WriteVariableNames' ,0 );
272281 % Update the gui
273282 [FontName , FontSize , LineWidth , Export , ExportStyle ] = parse_configs ;
274283 fonts = get(handles .fname ,' String' );
0 commit comments