lyx_check_config = True
lyx_kpsewhich = True
outfile = 'lyxrc.defaults'
- lyxrc_fileformat = 29
+ lyxrc_fileformat = 30
rc_entries = ''
lyx_keep_temps = False
version_suffix = ''
# This file houses conversion information for the preferences file.
-# The converter functions take a line as argument and return a list:
-# (Bool, NewLine),
-# where the Bool says if we've modified anything and the NewLine is
+# The converter functions take a line as argument and return a list:
+# (Bool, NewLine),
+# where the Bool says if we've modified anything and the NewLine is
# the new line, if so, which will be used to replace the old line.
# Incremented to format 2, r39670 by jrioux
# Incremented to format 29, by lasgouttes
# Remove use_pixmap_cache
+# Incremented to format 30, by lasgouttes
+# Add respect_os_kbd_language.
+# No convergence necessary.
+
# NOTE: The format should also be updated in LYXRC.cpp and
# in configure.py.
[ 26, [remove_font_encoding]],
[ 27, []],
[ 28, [remove_date_insert_format]],
- [ 29, [remove_use_pixmap_cache]]
+ [ 29, [remove_use_pixmap_cache]],
+ [ 30, []]
]
void Cursor::setLanguageFromInput()
{
+ if (!lyxrc.respect_os_kbd_language)
+ return;
string const & code = theApp()->inputLanguageCode();
Language const * lang = languages.getFromCode(code, buffer()->getLanguages());
if (lang) {
// The format should also be updated in configure.py, and conversion code
// should be added to prefs2prefs_prefs.py.
-static unsigned int const LYXRC_FILEFORMAT = 29; // spitz: remove \\date_insert_format
+static unsigned int const LYXRC_FILEFORMAT = 30; // lasgouttes: add \respect_os_kbd_language
// when adding something to this array keep it sorted!
LexerKeyword lyxrcTags[] = {
{ "\\accept_compound", LyXRC::RC_ACCEPT_COMPOUND },
{ "\\print_paper_dimension_flag", LyXRC::RC_PRINTPAPERDIMENSIONFLAG },
{ "\\print_paper_flag", LyXRC::RC_PRINTPAPERFLAG },
{ "\\pygmentize_command", LyXRC::RC_PYGMENTIZE_COMMAND },
+ { "\\respect_os_kbd_language", LyXRC::RC_RESPECT_OS_KBD_LANGUAGE },
{ "\\save_compressed", LyXRC::RC_SAVE_COMPRESSED },
{ "\\save_origin", LyXRC::RC_SAVE_ORIGIN },
{ "\\screen_dpi", LyXRC::RC_SCREEN_DPI },
case RC_LANGUAGE_COMMAND_LOCAL:
lexrc >> language_command_local;
break;
+ case RC_RESPECT_OS_KBD_LANGUAGE:
+ lexrc >> respect_os_kbd_language;
+ break;
case RC_VISUAL_CURSOR:
lexrc >> visual_cursor;
break;
os << "\\mark_foreign_language " <<
convert<string>(mark_foreign_language) << '\n';
}
+ // fall through
+ case RC_RESPECT_OS_KBD_LANGUAGE:
+ if (ignore_system_lyxrc ||
+ respect_os_kbd_language
+ != system_lyxrc.respect_os_kbd_language) {
+ os << "\\respect_os_kbd_language " <<
+ convert<string>(respect_os_kbd_language) << '\n';
+ }
+ //fall through
if (tag != RC_LAST)
break;
case LyXRC::RC_MACRO_EDIT_STYLE:
case LyXRC::RC_MAKE_BACKUP:
case LyXRC::RC_MARK_FOREIGN_LANGUAGE:
+ case LyXRC::RC_RESPECT_OS_KBD_LANGUAGE:
case LyXRC::RC_MOUSE_WHEEL_SPEED:
case LyXRC::RC_MOUSE_MIDDLEBUTTON_PASTE:
case LyXRC::RC_NUMLASTFILES:
str = _("Select to control the highlighting of words with a language foreign to that of the document.");
break;
+ case RC_RESPECT_OS_KBD_LANGUAGE:
+ str = _("Select to use the current keyboard language, as set from the operating system, as default input language.");
+ break;
+
case RC_MOUSE_WHEEL_SPEED:
str = _("The scrolling speed of the mouse wheel.");
break;
RC_PRINTPAPERDIMENSIONFLAG,
RC_PRINTPAPERFLAG,
RC_PYGMENTIZE_COMMAND,
+ RC_RESPECT_OS_KBD_LANGUAGE,
RC_SAVE_COMPRESSED,
RC_SAVE_ORIGIN,
RC_SCREEN_DPI,
///
std::string gui_language = "auto";
///
+ bool respect_os_kbd_language = false;
+ ///
std::string default_otf_view_format = "pdf4";
///
std::string default_platex_view_format = "pdf3";
this, SIGNAL(changed()));
connect(markForeignCB, SIGNAL(clicked()),
this, SIGNAL(changed()));
+ connect(respectOSkbdCB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
connect(autoBeginCB, SIGNAL(clicked()),
this, SIGNAL(changed()));
connect(autoEndCB, SIGNAL(clicked()),
{
rc.visual_cursor = visualCursorRB->isChecked();
rc.mark_foreign_language = markForeignCB->isChecked();
+ rc.respect_os_kbd_language = respectOSkbdCB->isChecked();
rc.language_auto_begin = autoBeginCB->isChecked();
rc.language_auto_end = autoEndCB->isChecked();
int const p = languagePackageCO->currentIndex();
else
logicalCursorRB->setChecked(true);
markForeignCB->setChecked(rc.mark_foreign_language);
+ respectOSkbdCB->setChecked(rc.respect_os_kbd_language);
autoBeginCB->setChecked(rc.language_auto_begin);
autoEndCB->setChecked(rc.language_auto_end);
languagePackageCO->setCurrentIndex(rc.language_package_selection);
</property>
</widget>
</item>
- <item row="10" column="0" colspan="3">
+ <item row="10" column="0" colspan="2">
+ <widget class="QCheckBox" name="respectOSkbdCB">
+ <property name="toolTip">
+ <string>Select to use the current keyboard language, as set from the operating system, as default input language.</string>
+ </property>
+ <property name="text">
+ <string>Respect &OS keyboard language</string>
+ </property>
+ </widget>
+ </item>
+ <item row="11" column="0" colspan="3">
<widget class="QGroupBox" name="rtlGB2">
<property name="toolTip">
<string/>
</layout>
</widget>
</item>
- <item row="11" column="0">
+ <item row="12" column="0">
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
<tabstop>startCommandED</tabstop>
<tabstop>endCommandED</tabstop>
<tabstop>defaultDecimalPointLE</tabstop>
+ <tabstop>defaultLengthUnitCO</tabstop>
<tabstop>globalCB</tabstop>
<tabstop>autoBeginCB</tabstop>
<tabstop>autoEndCB</tabstop>
<tabstop>markForeignCB</tabstop>
+ <tabstop>respectOSkbdCB</tabstop>
<tabstop>logicalCursorRB</tabstop>
<tabstop>visualCursorRB</tabstop>
</tabstops>