diff --git a/src/+gui_tools/save_project.m b/src/+gui_tools/save_project.m index 8acd387bdc7782ad547750008f304ba5d404f6dc..3da24fa22410768fb91b43df3ad5493ac89b80d0 100644 --- a/src/+gui_tools/save_project.m +++ b/src/+gui_tools/save_project.m @@ -37,7 +37,7 @@ if ~exist(project_info.project_folder, 'dir') end fullFileName = [ project_info.project_folder, filesep, project_info.project_name,'.dproj']; -project_info.modified = 0; +project_info.modified = false; save(fullFileName, 'project_info'); % If project folder has been changed diff --git a/src/gui_calib_smoother.m b/src/gui_calib_smoother.m index a03326db96dd86584713161c8b8bff3247d559c1..31cff0c8fc1a623f693eaa0a5d2c47d2cb93ed0e 100644 --- a/src/gui_calib_smoother.m +++ b/src/gui_calib_smoother.m @@ -332,8 +332,9 @@ handles.pushbuttonCloseAll = uicontrol( ... jObj.stop; jObj.setBusyText('All done!'); handles.pushbuttonResults.Enable = 'on'; - project_info.modified = 1; + project_info.modified = true; project_info.mod_file_already_run = true; + project_info.calibrated_smoother_run = true; gui_set_menus(true); catch ME jObj.stop; diff --git a/src/gui_cond_forecast.m b/src/gui_cond_forecast.m index 993b7ebc592d517d0e7bd00c20bb1d474bb55a32..5be71325376e4b02b7f7a60f97542169eabb4843 100644 --- a/src/gui_cond_forecast.m +++ b/src/gui_cond_forecast.m @@ -203,7 +203,8 @@ handles.pushbuttonCommandDefinition = uicontrol( ... jObj.stop; jObj.setBusyText('All done!'); - project_info.modified = 1; + project_info.modified = true; + project_info.conditional_forecast_run = true; catch ME jObj.stop; jObj.setBusyText('Done with errors'); diff --git a/src/gui_create_model_settings.m b/src/gui_create_model_settings.m index 973571e0d2886942a6a7aa3d36c96ac0c2a02eaa..b22c18713e00b7c8d118d4ed2db6d7b9a8da2d4d 100644 --- a/src/gui_create_model_settings.m +++ b/src/gui_create_model_settings.m @@ -40,7 +40,7 @@ try create_shocks_cell_array(); model_settings.shocks_corr = M_.Correlation_matrix; gui_tools.project_log_entry('Creating model settings', '...'); - project_info.modified = 1; + project_info.modified = true; jsonfile = [M_.fname filesep() 'model' filesep() 'json' filesep() 'modfile.json']; if exist(jsonfile, 'file') ~= 2 error('Could not find %s. Please rerun the .mod file with the json=compute commandline argument', jsonfile); diff --git a/src/gui_define_model_settings.m b/src/gui_define_model_settings.m index d104f6adae9293e2f6ba3a2fb6346930ae588195..78bf45380504afb75e335b7ada2333dcab736202 100644 --- a/src/gui_define_model_settings.m +++ b/src/gui_define_model_settings.m @@ -113,7 +113,7 @@ uicontrol(tabId, 'Style','pushbutton','String','Close this tab','Units','normali oo_.steady_state = cell2mat(model_settings.variables(:, 8)); gui_tools.project_log_entry('Saving model settings', '...'); - project_info.modified = 1; + project_info.modified = true; catch ME gui_tools.show_error('Error saving model settings', ME, 'basic'); end diff --git a/src/gui_determ_simulation.m b/src/gui_determ_simulation.m index d70fe6a854960255f808df748fdc3f158e9a1887..deb703528b4cb10965645acf77a4d1f544028c9a 100644 --- a/src/gui_determ_simulation.m +++ b/src/gui_determ_simulation.m @@ -342,7 +342,8 @@ handles.pushbuttonCommandDefinition = uicontrol( ... jObj.stop; jObj.setBusyText('Done'); - project_info.modified = 1; + project_info.modified = true; + project_info.deterministic_simulation_run = true; catch ME jObj.stop; jObj.setBusyText('Done with errors'); diff --git a/src/gui_estim_params.m b/src/gui_estim_params.m index dfe8e597343f3c2bce49ac5fe97c281f04f64822..34e3ff91ff5849f67dcc473095de74f58ad0f668 100644 --- a/src/gui_estim_params.m +++ b/src/gui_estim_params.m @@ -106,7 +106,7 @@ uicontrol(tabId, 'Style','pushbutton','String','Close this tab','Units','normali msgbox('Changes saved successfully', 'Dynare_GUI'); gui_tools.project_log_entry('Saving estim_params','...'); - project_info.modified = 1; + project_info.modified = true; end catch ME gui_tools.show_error('Error while saving estimated parameters & shocks', ME, 'extended'); diff --git a/src/gui_estimation.m b/src/gui_estimation.m index 70813925fd1ca3452e7b12c3a917c37dfaec130a..b80fff5c805878b74a58c62ac911f6085f59c40a 100644 --- a/src/gui_estimation.m +++ b/src/gui_estimation.m @@ -378,7 +378,8 @@ handles.pushbuttonCommandDefinition = uicontrol( ... gui_tools.menu_options('output','On'); handles.pushbuttonResults.Enable = 'on'; - project_info.modified = 1; + project_info.modified = true; + project_info.estimation_run = true; gui_set_menus(true); catch ME jObj.stop; diff --git a/src/gui_forecast.m b/src/gui_forecast.m index 03f5d307cbb67ca5a604d087bad59ab282e3336a..9d106cf6845a56019d7ff9f9532e6b59412ddbd8 100644 --- a/src/gui_forecast.m +++ b/src/gui_forecast.m @@ -109,8 +109,9 @@ handles.pushbuttonForecast = uicontrol( ... jObj.stop; jObj.setBusyText('All done!'); - set(handles.pushbuttonResults, 'Enable', 'on'); - project_info.modified = 1; + handles.pushbuttonResults.Enable = on; + project_info.modified = true; + project_info.forecast_run = true; catch ME jObj.stop; jObj.setBusyText('Done with errors'); diff --git a/src/gui_load_mod_file.m b/src/gui_load_mod_file.m index 7319f0d5b58293f9105dbe016573a5dc97483b4d..126ce985acdeca76c9330de990994dc3b3d62ba2 100644 --- a/src/gui_load_mod_file.m +++ b/src/gui_load_mod_file.m @@ -197,7 +197,7 @@ end evalin('base', 'global dynare_gui_ project_info model_settings'); dynare_gui_ = glob_dynare_gui_; project_info = glob_project_info; - project_info.modified = 1; + project_info.modified = true; project_info.mod_file_already_run = true; % recreate model_settings diff --git a/src/gui_observed_vars.m b/src/gui_observed_vars.m index 6cce1d1003e70f3df53fda5d8a3ff9d20a7ff3c7..a3039a0b0f7dd16adabb8222f27765e12ec094fa 100644 --- a/src/gui_observed_vars.m +++ b/src/gui_observed_vars.m @@ -33,7 +33,7 @@ global project_info model_settings options_ if ~isfield(model_settings, 'varobs') try model_settings.varobs = create_varobs_cell_array(evalin('base','options_.varobs'), evalin('base','M_.endo_names_tex'), evalin('base','M_.endo_names_long'), evalin('base','options_.varobs_id')); - project_info.modified = 1; + project_info.modified = true; catch ME model_settings.varobs = []; end @@ -89,7 +89,7 @@ uicontrol(tabId, 'Style','pushbutton','String','Close this tab','Units','normali project_info.freq = handles.frequency.Value; project_info.nobs = handles.num_obs.String; project_info.data_file = handles.data_file.String; - project_info.modified = 1; + project_info.modified = true; if project_info.new_data_format %new data interface options_.dataset.file = handles.data_file.String; @@ -105,6 +105,7 @@ uicontrol(tabId, 'Style','pushbutton','String','Close this tab','Units','normali if ~isempty(varobs) options_.varobs = varobs(:, 1); end + project_info.observed_variables_set = true; end catch ME gui_tools.show_error('Error saving observed variables and data file information', ME, 'extended'); diff --git a/src/gui_open_project.m b/src/gui_open_project.m index b89ecaccdcb1807c7e1caf54d19e9facf9403f35..7f75bc997a7336b68fa85b20afd1b3e9474e3eae 100644 --- a/src/gui_open_project.m +++ b/src/gui_open_project.m @@ -73,7 +73,7 @@ try gui_set_menus(true); end end - project_info.modified = 0; + project_info.modified = false; gui_tools.project_log_entry('Project Open', ... ['project_name=' project_info.project_name '; project_folder=' project_info.project_folder]); end diff --git a/src/gui_realtime_shock_decomposition.m b/src/gui_realtime_shock_decomposition.m index 3ea3e49aefc8fed8a6beac94ca786c32f2f9699d..66505b5e06e1d04adb5d97f28162688cb622d1a3 100644 --- a/src/gui_realtime_shock_decomposition.m +++ b/src/gui_realtime_shock_decomposition.m @@ -346,8 +346,8 @@ handles.pushbuttonClose = uicontrol( ... jObj.stop; jObj.setBusyText('All done!'); uiwait(msgbox('Realtime shock decomposition command executed successfully!', 'DynareGUI','modal')); - project_info.modified = 1; - + project_info.modified = true; + project_info.realtime_shock_decomposition_run = true; catch ME jObj.stop; jObj.setBusyText('Done with errors!'); diff --git a/src/gui_sensitivity_analysis.m b/src/gui_sensitivity_analysis.m index cd020b48f9392335875f888b8ca1dbc7e5f59c94..3eb53da9243850da12b9294225236c9972466360 100644 --- a/src/gui_sensitivity_analysis.m +++ b/src/gui_sensitivity_analysis.m @@ -28,7 +28,7 @@ function gui_sensitivity_analysis(tabId) % You should have received a copy of the GNU General Public License % along with Dynare. If not, see <http://www.gnu.org/licenses/>. -global project_info model_settings options_ dynare_gui_ oo_ M_ +global project_info model_settings options_ dynare_gui_ oo_ bg_color = char(getappdata(0, 'bg_color')); @@ -91,7 +91,8 @@ handles.pushbuttonSensitivity = uicontrol( ... jObj.setBusyText('Done'); gui_tools.menu_options('output','On'); handles.pushbuttonResults.Enable = 'on'; - project_info.modified = 1; + project_info.modified = true; + project_info.sensitivity_analysis_run = true; catch ME jObj.stop; jObj.setBusyText('Done with errors'); diff --git a/src/gui_set_project_info.m b/src/gui_set_project_info.m index 2342adb93f5a6c71a7afe83ead122741d0c8b0cb..216a9877b63bcc578e14e9007bd191fc0abbfd02 100644 --- a/src/gui_set_project_info.m +++ b/src/gui_set_project_info.m @@ -38,7 +38,7 @@ project_info.project_folder = ''; project_info.project_model_stochastic = 1; project_info.project_description = ''; project_info.default_forecast_periods = 20; -project_info.modified = 1; +project_info.modified = true; project_info.mod_file_already_run = false; project_info.first_obs = ''; @@ -48,6 +48,14 @@ project_info.data_file = ''; project_info.new_data_format = 0; +project_info.shock_decomposition_run = false; +project_info.realtime_shock_decomposition_run = false; +project_info.conditional_forecast_run = false; +project_info.stochastic_simulation_run = false; +project_info.deterministic_simulation_run = false; +project_info.estimation_run = false; +project_info.observed_variables_set = false; + gui_auxiliary.create_dynare_gui_structure; end diff --git a/src/gui_shock_decomposition.m b/src/gui_shock_decomposition.m index 68445410c5b4dd8931f4cdd5d99fb0c35a869fc6..6f8ca0547799f49c0ce7eb707c7491172858ea5f 100644 --- a/src/gui_shock_decomposition.m +++ b/src/gui_shock_decomposition.m @@ -305,7 +305,8 @@ handles.pushbuttonClose = uicontrol( ... end jObj.stop; jObj.setBusyText('All done!'); - project_info.modified = 1; + project_info.modified = true; + project_info.shock_decomposition_run = true; catch ME jObj.stop; jObj.setBusyText('Done with errors!'); diff --git a/src/gui_stoch_simulation.m b/src/gui_stoch_simulation.m index acd84c3b2c3f0b10280bff8f7e53c6ee3f00a5d2..e12eedd396f8c7c2c002ce2052e526c011bff809 100644 --- a/src/gui_stoch_simulation.m +++ b/src/gui_stoch_simulation.m @@ -200,7 +200,8 @@ handles.pushbuttonCommandDefinition = uicontrol( ... %enable menu options gui_tools.menu_options('output','On'); set(handles.pushbuttonResults, 'Enable', 'on'); - project_info.modified = 1; + project_info.modified = true; + project_info.stochastic_simulation_run = true; catch ME jObj.stop; jObj.setBusyText('Done with errors');