]> git.lyx.org Git - lyx.git/blobdiff - src/lyxrc.C
remove unused code
[lyx.git] / src / lyxrc.C
index 7ad40b5f08d40bba5050fd4e70844d5fc0ac2439..809f71ee64d007d2a676e2ca3233df6ce5bbcf15 100644 (file)
 #include <fstream>
 #include <iomanip>
 #include <iostream>
+#include <boost/scoped_ptr.hpp>
 
 #include "debug.h"
 
 #include "lyxrc.h"
 #include "kbmap.h"
 #include "LyXAction.h"
-#include "lyx_main.h"
 #include "intl.h"
 #include "support/path.h"
 #include "support/filetools.h"
-#include "lyxtext.h"
 #include "converter.h"
 #include "gettext.h"
+#include "lyxlex.h"
 
 using std::ostream;
 using std::ofstream;
@@ -38,7 +38,8 @@ using std::ios;
 using std::endl;
 using std::vector;
 
-extern LyXAction lyxaction;
+class kb_keymap;
+
 extern boost::scoped_ptr<kb_keymap> toplevel_keymap;
 
 namespace {
@@ -69,7 +70,6 @@ keyword_item lyxrcTags[] = {
        { "\\display_graphics", LyXRC::RC_DISPLAY_GRAPHICS },
        { "\\document_path", LyXRC::RC_DOCUMENTPATH },
        { "\\escape_chars", LyXRC::RC_ESC_CHARS },
-       { "\\exit_confirmation", LyXRC::RC_EXIT_CONFIRMATION },
        { "\\font_encoding", LyXRC::RC_FONT_ENCODING },
        { "\\format", LyXRC::RC_FORMAT },
        { "\\input", LyXRC::RC_INPUT },
@@ -225,7 +225,6 @@ void LyXRC::setDefaults() {
        check_lastfiles = true;
        make_backup = true;
        backupdir_path.erase();
-       exit_confirmation = true;
        display_graphics = "color";
        // Spellchecker settings:
 #ifdef USE_PSPELL
@@ -249,6 +248,7 @@ void LyXRC::setDefaults() {
        language_command_begin = "\\selectlanguage{$$lang}";
        language_command_local = "\\foreignlanguage{$$lang}{";
        default_language = "english";
+       show_banner = true;
 
        //
        date_insert_format = "%A, %e %B %Y";
@@ -347,11 +347,6 @@ int LyXRC::read(string const & filename)
                        }
                        break;
 
-               case RC_EXIT_CONFIRMATION:
-                       if (lexrc.next())
-                               exit_confirmation = lexrc.getBool();
-                       break;
-
                case RC_AUTORESET_OPTIONS:
                        if (lexrc.next())
                                auto_reset_options = lexrc.getBool();
@@ -501,7 +496,7 @@ int LyXRC::read(string const & filename)
                case RC_DEFAULT_PAPERSIZE:
                        if (lexrc.next()) {
                                string const size =
-                                       lowercase(lexrc.getString());
+                                       ascii_lowercase(lexrc.getString());
                                if (size == "usletter")
                                        default_papersize =
                                                BufferParams::PAPER_USLETTER;
@@ -730,7 +725,7 @@ int LyXRC::read(string const & filename)
                                break;
                        }
 
-                       if ((action = lyxaction.LookupFunc(cmd))>= 0) {
+                       if ((action = lyxaction.LookupFunc(cmd)) >= 0) {
                                if (lyxerr.debugging(Debug::LYXRC)) {
                                        lyxerr << "RC_BIND: Sequence `"
                                               << seq << "' Command `"
@@ -1047,13 +1042,6 @@ void LyXRC::output(ostream & os) const
                        os << "# The time interval between auto-saves in seconds.\n"
                           << "\\autosave " << autosave << "\n";
                }
-       case RC_EXIT_CONFIRMATION:
-               if (exit_confirmation != system_lyxrc.exit_confirmation) {
-                       os << "# Ask for confirmation before exit if there are\n"
-                          << "# unsaved changed documents.\n"
-                          << "\\exit_confirmation " << tostr(exit_confirmation)
-                          << "\n";
-               }
        case RC_DISPLAY_GRAPHICS:
                if (display_graphics != system_lyxrc.display_graphics) {
                        os << "# Display graphics within LyX\n"
@@ -1925,10 +1913,6 @@ string const LyXRC::getDescription(LyXRCTags tag)
                str = _("Iconify the dialogs when the main window is iconified. (Affects only dialogs shown after the change has been made.)");
                break;
 
-       case RC_EXIT_CONFIRMATION:
-               str = _("Sets whether LyX asks for a second confirmation to exit when you have changed documents. (LyX will still ask to save changed documents.)");
-               break;
-
        case RC_DISPLAY_GRAPHICS:
                str = _("Select how LyX will display any graphics.");
                break;
@@ -2003,10 +1987,6 @@ string const LyXRC::getDescription(LyXRCTags tag)
        case RC_FORMAT:
                break;
 
-       case RC_NEW_ASK_FILENAME:
-               str = _("This sets the behaviour if you want to be asked for a filename when creating a new document or wait until you save it and be asked then.");
-               break;
-
        case RC_DEFAULT_LANGUAGE:
                str = _("New documents will be assigned this language.");
                break;