diff libgui/src/resource-manager.h @ 17930:ffdbb82a0c78

allow welcome wizard dialog to be canceled * resource-manager.h, resource-manager.cc (class resource_manager): Cache settings directory and file, but not first_run. (resource_manager::get_gui_translation_dir, resource_manager::do_update_network_settings): Only access settings if it is valid. (resource_manager::do_reload_settings): Don't set first_run. (resource_manager::do_get_home_path): Delete. * welcome-wizard.cc (welcome_wizard::welcome_wizard): Provide cancel button. * octave-gui.cc (octave_start_gui): Don't loop over welcome wizard. Run welcome wizard once if settings file is missing and exit Octave if welcome wizard returns a rejected status. Otherwise, load resources and start Octave.
author John W. Eaton <jwe@octave.org>
date Thu, 14 Nov 2013 16:52:21 -0500
parents d63878346099
children 866d3860724c
line wrap: on
line diff
--- a/libgui/src/resource-manager.h	Thu Nov 14 19:17:01 2013 +0100
+++ b/libgui/src/resource-manager.h	Thu Nov 14 16:52:21 2013 -0500
@@ -49,11 +49,6 @@
     return instance_ok () ? instance->do_get_default_settings () : 0;
   }
 
-  static QString get_home_path (void)
-  {
-    return instance_ok () ? instance->do_get_home_path () : QString ();
-  }
-
   static QString get_settings_file (void)
   {
     return instance_ok () ? instance->do_get_settings_file () : QString ();
@@ -108,23 +103,21 @@
 
   static bool instance_ok (void);
 
+  QString settings_directory;
+
+  QString settings_file;
+
   QSettings *settings;
 
   QSettings *default_settings;
 
-  QString home_path;
-
-  bool first_run;
-
   QSettings *do_get_settings (void) const;
 
   QSettings *do_get_default_settings (void) const;
 
-  QString do_get_home_path (void) const;
-
   QString do_get_settings_file (void);
 
-  QString do_get_settings_path (void);
+  QString do_get_settings_directory (void);
 
   void do_reload_settings (void);