diff gui/src/octave-gui.cc @ 14804:a565c560e654 gui

Replaced a lot of terminal interaction with events: Clearing, loading and saving workspace, running a file. Default location for saving a new file is now the current working directory. Fixed bad settings with a fresh installation of the GUI by providing a file with default settings and installing it when appropriate. * default-settings: New file containing the default settings. * file-editor-tab: Subclassed event observer and added code to send a run event. * main-window: Sending workspace events instead of using the terminal. * octave-event: Added new event types. * octave-link: Added getter for the current working directory. * octave-gui: Adjusted code, so the default settings can be loaded. * resource-manager: Added code to handle the logic with a default settings file.
author Jacob Dawid <jacob.dawid@googlemail.com>
date Tue, 26 Jun 2012 15:27:10 +0200
parents 5cb54cca8a06
children a6c44c28dabe
line wrap: on
line diff
--- a/gui/src/octave-gui.cc	Tue Jun 26 10:54:39 2012 +0200
+++ b/gui/src/octave-gui.cc	Tue Jun 26 15:27:10 2012 +0200
@@ -31,42 +31,8 @@
       if (resource_manager::instance ()->is_first_run ())
         {
           welcome_wizard welcomeWizard;
-          int returnCode = welcomeWizard.exec ();
-
-          QSettings *settings = resource_manager::instance ()->get_settings ();
-          settings->setValue ("connectOnStartup", true);
-          settings->setValue ("showMessageOfTheDay", true);
-          settings->setValue ("showTopic", true);
-          settings->setValue ("autoIdentification", false);
-          settings->setValue ("nickServPassword", "");
-          settings->setValue ("useCustomFileEditor", false);
-          settings->setValue ("customFileEditor", "emacs");
-          settings->setValue ("editor/showLineNumbers", true);
-          settings->setValue ("editor/highlightCurrentLine", true);
-          settings->setValue ("editor/codeCompletion", true);
-          settings->setValue ("editor/fontName", "Monospace");
-          settings->setValue ("editor/fontSize", 10);
-          settings->setValue ("editor/shortWindowTitle", true);
-          settings->setValue ("showFilenames", true);
-          settings->setValue ("showFileSize", false);
-          settings->setValue ("showFileType", false);
-          settings->setValue ("showLastModified", false);
-          settings->setValue ("showHiddenFiles", false);
-          settings->setValue ("useAlternatingRowColors", true);
-          settings->setValue ("useProxyServer", false);
-          settings->setValue ("proxyType", "Sock5Proxy");
-          settings->setValue ("proxyHostName", "none");
-          settings->setValue ("proxyPort", 8080);
-          settings->setValue ("proxyUserName", "");
-          settings->setValue ("proxyPassword", "");
-          settings->sync ();
+          welcomeWizard.exec ();
           resource_manager::instance ()->reload_settings ();
-
-          application.quit ();
-          // We are in an infinite loop, so everything else than a return
-          // will cause the application to restart from the very beginning.
-          if (returnCode == QDialog::Rejected)
-            return 0;
         }
       else
         {
@@ -83,7 +49,6 @@
 
           main_window w;
           w.show ();
-          //w.activateWindow();
           return application.exec ();
         }
     }