changeset 13570:7828e1bf5b0d

Default settings are now loaded it there is no user-defined settings.
author Jacob Dawid <jacob.dawid@googlemail.com>
date Mon, 01 Aug 2011 16:45:38 +0200
parents 640190448fdf
children a7c923ab980f
files gui/default-settings/.octave-gui gui/default-settings/settings.ini gui/src/MainWindow.cpp gui/src/ResourceManager.cpp
diffstat 4 files changed, 27 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gui/default-settings/.octave-gui	Mon Aug 01 16:45:38 2011 +0200
@@ -0,0 +1,23 @@
+[General]
+connectOnStartup=true
+showMessageOfTheDay=false
+showTopic=true
+autoIdentification=false
+nickServPassword=
+useCustomFileEditor=false
+customFileEditor=emacs
+showFilenames=true
+showFileSize=true
+showFileType=false
+showLastModified=false
+showHiddenFiles=false
+useAlternatingRowColors=true
+IRCNick=User
+language=en-en
+
+[MainWindow]
+geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\0\0\0\0\0\x18\0\0\x4\xff\0\0\x3\a\0\0\0\0\0\0\0\0\xff\xff\xff\xfe\xff\xff\xff\xfe\0\0\0\0\x2\0)
+windowState="@ByteArray(\0\0\0\xff\0\0\0\0\xfd\0\0\0\x2\0\0\0\0\0\0\x1;\0\0\x2\xa3\xfc\x2\0\0\0\x2\xfb\0\0\0&\0V\0\x61\0r\0i\0\x61\0\x62\0l\0\x65\0s\0\x44\0o\0\x63\0k\0W\0i\0\x64\0g\0\x65\0t\x1\0\0\0\x19\0\0\x1\xe\0\0\0k\0\xff\xff\xff\xfb\0\0\0\"\0H\0i\0s\0t\0o\0r\0y\0\x44\0o\0\x63\0k\0W\0i\0\x64\0g\0\x65\0t\x1\0\0\x1-\0\0\x1\x8f\0\0\0\x8c\0\xff\xff\xff\0\0\0\x1\0\0\x1,\0\0\x2\xa3\xfc\x2\0\0\0\x1\xfb\0\0\0\x1e\0\x46\0i\0l\0\x65\0s\0\x44\0o\0\x63\0k\0W\0i\0\x64\0g\0\x65\0t\x1\0\0\0\x19\0\0\x2\xa3\0\0\0\x9d\0\xff\xff\xff\0\0\x2\x8d\0\0\x2\xa3\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\0)"
+
+[MdiArea]
+geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\x1\x41\0\0\0\x19\0\0\x3\xcd\0\0\x2\xbb\0\0\0\0\0\0\0\0\xff\xff\xff\xff\xff\xff\xff\xff\0\0\0\0\0\0)
--- a/gui/default-settings/settings.ini	Mon Aug 01 13:34:13 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-[General]
-IRCNick=OctaveUser
-connectOnStartup=true
-autoIdentification=false
-nickServPassword=
-showMessageOfTheDay=false
-showTopic=true
-
--- a/gui/src/MainWindow.cpp	Mon Aug 01 13:34:13 2011 +0200
+++ b/gui/src/MainWindow.cpp	Mon Aug 01 16:45:38 2011 +0200
@@ -28,7 +28,7 @@
 #include "SettingsDialog.h"
 #include "cmd-edit.h"
 
-#define VERSION_STRING "Octave GUI (0.7.1)"
+#define VERSION_STRING "Octave GUI (0.7.2)"
 
 MainWindow::MainWindow (QWidget * parent):QMainWindow (parent)
 {
--- a/gui/src/ResourceManager.cpp	Mon Aug 01 13:34:13 2011 +0200
+++ b/gui/src/ResourceManager.cpp	Mon Aug 01 16:45:38 2011 +0200
@@ -17,6 +17,7 @@
  */
 
 #include "ResourceManager.h"
+#include <QFile>
 
 ResourceManager ResourceManager::m_singleton;
 
@@ -49,6 +50,8 @@
 ResourceManager::setSettings (QString file)
 {
   delete m_settings;
+  if (!QFile::exists (file))
+    file = "../default-settings/.octave-gui";
   m_settings = new QSettings (file, QSettings::IniFormat);
 }