From 2dd84b3417ba6e5329dca681dc69059e201b7cf5 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Tue, 7 Aug 2012 08:29:46 +0200 Subject: [PATCH] Remove lyxrc \default_language which has been dropped from the GUI some time ago The default language of new documents is set via the template --- RELEASE-NOTES | 5 +++-- src/Language.cpp | 9 +++------ src/LyXRC.cpp | 18 ------------------ src/LyXRC.h | 3 --- 4 files changed, 6 insertions(+), 29 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 17d998d188..0e0fb8efd1 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -25,10 +25,11 @@ options have been added: The Advanced Find and Replace feature now supports cancel of a long search operation by hitting the ESC key. -The following pref variables were changed in 2.0: +The following pref variables were changed in 2.1: -The following pref variables are obsoleted in 2.0: +The following pref variables are obsoleted in 2.1: +- \\default_language - \\default_papersize The following new LyX functions have been introduced: diff --git a/src/Language.cpp b/src/Language.cpp index 9f8c57e6f4..95e725f3f3 100644 --- a/src/Language.cpp +++ b/src/Language.cpp @@ -247,13 +247,10 @@ void Languages::read(FileName const & filename) languagelist[l.lang()] = l; } - default_language = getLanguage(lyxrc.default_language); + default_language = getLanguage("english"); if (!default_language) { - LYXERR0("Default language \"" << lyxrc.default_language - << "\" not found!"); - default_language = getLanguage("english"); - if (!default_language) - default_language = &(*languagelist.begin()).second; + LYXERR0("Default language \"english\" not found!"); + default_language = &(*languagelist.begin()).second; LYXERR0("Using \"" << default_language->lang() << "\" instead!"); } diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp index e2083ef6e3..d980c22ae5 100644 --- a/src/LyXRC.cpp +++ b/src/LyXRC.cpp @@ -91,7 +91,6 @@ LexerKeyword lyxrcTags[] = { { "\\date_insert_format", LyXRC::RC_DATE_INSERT_FORMAT }, { "\\def_file", LyXRC::RC_DEFFILE }, { "\\default_decimal_point", LyXRC::RC_DEFAULT_DECIMAL_POINT }, - { "\\default_language", LyXRC::RC_DEFAULT_LANGUAGE }, { "\\default_length_unit", LyXRC::RC_DEFAULT_LENGTH_UNIT }, { "\\default_view_format", LyXRC::RC_DEFAULT_VIEW_FORMAT }, { "\\dialogs_iconify_with_main", LyXRC::RC_DIALOGS_ICONIFY_WITH_MAIN }, @@ -319,7 +318,6 @@ void LyXRC::setDefaults() language_command_local = "\\foreignlanguage{$$lang}{"; sort_layouts = false; group_layouts = true; - default_language = "english"; gui_language = "auto"; show_banner = true; windows_style_tex_paths = false; @@ -1161,10 +1159,6 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool check_format) lexrc >> default_view_format; break; - case RC_DEFAULT_LANGUAGE: - lexrc >> default_language; - break; - case RC_GUI_LANGUAGE: lexrc >> gui_language; break; @@ -2639,13 +2633,6 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c } if (tag != RC_LAST) break; - case RC_DEFAULT_LANGUAGE: - if (ignore_system_lyxrc || - default_language != system_lyxrc.default_language) { - os << "\\default_language " << default_language << '\n'; - } - if (tag != RC_LAST) - break; case RC_GUI_LANGUAGE: if (ignore_system_lyxrc || gui_language != system_lyxrc.gui_language) { @@ -2916,7 +2903,6 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new) case LyXRC::RC_CURSOR_FOLLOWS_SCROLLBAR: case LyXRC::RC_SCROLL_BELOW_DOCUMENT: case LyXRC::RC_DATE_INSERT_FORMAT: - case LyXRC::RC_DEFAULT_LANGUAGE: case LyXRC::RC_GUI_LANGUAGE: case LyXRC::RC_DEFAULT_VIEW_FORMAT: case LyXRC::RC_DEFFILE: @@ -3153,10 +3139,6 @@ string const LyXRC::getDescription(LyXRCTags tag) str = _("The default format used with LFUN_BUFFER_[VIEW|UPDATE]."); break; - case RC_DEFAULT_LANGUAGE: - str = _("New documents will be assigned this language."); - break; - case RC_DIALOGS_ICONIFY_WITH_MAIN: str = _("Iconify the dialogs when the main window is iconified. (Affects only dialogs shown after the change has been made.)"); break; diff --git a/src/LyXRC.h b/src/LyXRC.h index 0ddc5da51c..4032e6bebc 100644 --- a/src/LyXRC.h +++ b/src/LyXRC.h @@ -71,7 +71,6 @@ public: RC_DATE_INSERT_FORMAT, RC_DEFAULT_DECIMAL_POINT, RC_DEFAULT_LENGTH_UNIT, - RC_DEFAULT_LANGUAGE, RC_DEFAULT_VIEW_FORMAT, RC_DEFFILE, RC_DIALOGS_ICONIFY_WITH_MAIN, @@ -419,8 +418,6 @@ public: /// bool mark_foreign_language; /// - std::string default_language; - /// std::string gui_language; /// std::string default_view_format;