diff libgui/src/settings-dialog.cc @ 15356:842ab161c10a

GUI: new setting to restore tabs from previous session; allow silent load file * settings-dialog.ui: new settings check box for previous session restore * settings-dialog.cc (settings_dialog::settings_dialog): load/write new settings * file-editor.h (file-editor::request_open_file): allow silent (no error msg) open file * file_editor_interface.h (file_editor_interface::request_open_file) allow silent (no error msg) open file * file-editor.cc (file_editor::~file_editor): store a list of open tabs in settings (file_editor::request_open_file): allow a silent open file with no error message if file doesn't exist; remove added tab and restore focus, if load fails. (file_editor::contruct): read list of previous tabs from settings (if enabled) * file-editor-tab.h (file-editor-tab:load_file): allow silent load file, return success * file-editor-tab.cc (file-editor-tab:load_file): allow silent load file, return success
author Thorsten Liebig <Thorsten.Liebig@gmx.de>
date Tue, 11 Sep 2012 15:24:22 +0200
parents a9fd6821eedf
children 501a9cc2c68f
line wrap: on
line diff
--- a/libgui/src/settings-dialog.cc	Tue Sep 11 10:50:43 2012 +0200
+++ b/libgui/src/settings-dialog.cc	Tue Sep 11 15:24:22 2012 +0200
@@ -46,6 +46,7 @@
   ui->editor_fontName->setCurrentFont (QFont (settings->value ("editor/fontName","Courier").toString()) );
   ui->editor_fontSize->setValue (settings->value ("editor/fontSize",10).toInt ());
   ui->editor_longWindowTitle->setChecked (settings->value ("editor/longWindowTitle",false).toBool ());
+  ui->editor_restoreSession->setChecked (settings->value ("editor/restoreSession",true).toBool ());
   ui->terminal_fontName->setCurrentFont (QFont (settings->value ("terminal/fontName","Courier").toString()) );
   ui->terminal_fontSize->setValue (settings->value ("terminal/fontSize",10).toInt ());
   ui->showFilenames->setChecked (settings->value ("showFilenames").toBool());
@@ -107,6 +108,7 @@
   settings->setValue ("editor/fontName", ui->editor_fontName->currentFont().family());
   settings->setValue ("editor/fontSize", ui->editor_fontSize->value());
   settings->setValue ("editor/longWindowTitle", ui->editor_longWindowTitle->isChecked());
+  settings->setValue ("editor/restoreSession", ui->editor_restoreSession->isChecked ());
   settings->setValue ("terminal/fontSize", ui->terminal_fontSize->value());
   settings->setValue ("terminal/fontName", ui->terminal_fontName->currentFont().family());
   settings->setValue ("showFilenames", ui->showFilenames->isChecked ());