changeset 24094:1265c7f0119a

consistent defaults values for all preferences (bug #52090) * files-dock-widget.cc (notice_settings): default for syncing octave directory with the current browser directory set to true * main-window.cc (main_window, load_and_display_community_news): set default for allowing a web connection to false * settings-dialog.cc (settings_dialog): fix names of some preferences for the variable editor * variable-editor.cc (notice_settings): use defaults for the used font and set the default for autofitting the row height to true
author Torsten <mttl@mailbox.org>
date Sun, 24 Sep 2017 09:52:41 +0200
parents 7d9ba57201b4
children eadaf557ca09
files libgui/src/files-dock-widget.cc libgui/src/main-window.cc libgui/src/settings-dialog.cc libgui/src/variable-editor.cc
diffstat 4 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/files-dock-widget.cc	Sat Sep 23 13:50:53 2017 -0700
+++ b/libgui/src/files-dock-widget.cc	Sun Sep 24 09:52:41 2017 +0200
@@ -834,7 +834,7 @@
   // enable the buttons to sync octave/browser dir
   // only if this is not done by default
   m_sync_octave_dir
-    = settings->value ("filesdockwidget/sync_octave_directory",false).toBool ();
+    = settings->value ("filesdockwidget/sync_octave_directory",true).toBool ();
   m_sync_octave_directory_action->setEnabled (! m_sync_octave_dir);
   m_sync_browser_directory_action->setEnabled (! m_sync_octave_dir);
 
--- a/libgui/src/main-window.cc	Sat Sep 23 13:50:53 2017 -0700
+++ b/libgui/src/main-window.cc	Sun Sep 24 09:52:41 2017 +0200
@@ -190,7 +190,7 @@
   if (settings)
     {
       connect_to_web
-        = settings->value ("news/allow_web_connection", true).toBool ();
+        = settings->value ("news/allow_web_connection", false).toBool ();
 
       last_checked
         = settings->value ("news/last_time_checked", QDateTime ()).toDateTime ();
@@ -515,7 +515,7 @@
 
   bool connect_to_web
     = (settings
-       ? settings->value ("news/allow_web_connection", true).toBool ()
+       ? settings->value ("news/allow_web_connection", false).toBool ()
        : true);
 
   QString base_url = "http://octave.org";
--- a/libgui/src/settings-dialog.cc	Sat Sep 23 13:50:53 2017 -0700
+++ b/libgui/src/settings-dialog.cc	Sun Sep 24 09:52:41 2017 +0200
@@ -540,7 +540,7 @@
   ui->varedit_autofitType->setCurrentIndex (settings->value ("autofit_type", 0).toInt ());
   ui->varedit_rowHeight->setText (settings->value ("variable_editor/row_height", "2").toString ());
   ui->varedit_rowAutofit->setChecked (settings->value ("variable_editor/autofit_row_height", true).toBool ());
-  ui->varedit_font->setFont (QFont (settings->value ("variable_editor/font", settings->value ("terminal/FontName", "Courier New")).toString ()));
+  ui->varedit_font->setFont (QFont (settings->value ("variable_editor/font_name", settings->value ("terminal/fontName", "Courier New")).toString ()));
   ui->varedit_fontSize->setValue (settings->value ("variable_editor/font_size", QVariant (10)).toInt ());
   ui->varedit_useTerminalFont->setChecked (settings->value ("variable_editor/use_terminal_font", false).toBool ());
   ui->varedit_alternate->setChecked (settings->value ("variable_editor/alternate_rows", QVariant (false)).toBool ());
--- a/libgui/src/variable-editor.cc	Sat Sep 23 13:50:53 2017 -0700
+++ b/libgui/src/variable-editor.cc	Sun Sep 24 09:52:41 2017 +0200
@@ -348,17 +348,17 @@
 
   if (m_use_terminal_font)
     {
-      font_name = settings->value ("terminal/fontName", "").toString ();
+      font_name = settings->value ("terminal/fontName", "Courier New").toString ();
       font_size = settings->value ("terminal/fontSize", 10).toInt ();
     }
   else
     {
-      font_name = settings->value ("variable_editor/font_name", "").toString ();
+      font_name = settings->value ("variable_editor/font_name", settings->value ("terminal/fontName", "Courier New")).toString ();
       font_size = settings->value ("variable_editor/font_size", 10).toInt ();
     }
   m_font = QFont (font_name, font_size);
 
-  if (settings->value ("variable_editor/autofit_row_height", false).toBool ())
+  if (settings->value ("variable_editor/autofit_row_height", true).toBool ())
     {
       QFontMetrics fm (m_font);
       m_add_font_height = fm.height ();