images/math/dots.svgz \
images/math/font.svgz
-skbinddir = $(pkgdatadir)/bind/sk
-dist_skbind_DATA = \
- bind/sk/menus.bind
-
debinddir = $(pkgdatadir)/bind/de
dist_debind_DATA = \
bind/de/menus.bind
+hebinddir = $(pkgdatadir)/bind/he
+dist_hebind_DATA = \
+ bind/he/cua.bind
+
rubinddir = $(pkgdatadir)/bind/ru
dist_rubind_DATA = \
bind/ru/menus.bind
+skbinddir = $(pkgdatadir)/bind/sk
+dist_skbind_DATA = \
+ bind/sk/menus.bind
+
binddir = $(pkgdatadir)/bind
dist_bind_DATA = \
bind/broadway.bind \
--- /dev/null
+# -*- text -*-
+
+# file he/cua.bind
+# This file is part of LyX, the document processor.
+# Licence details can be found in the file COPYING.
+
+# author Iddo Samet
+# author Jürgen Spitzmüller
+
+# Full author contact details are available in file CREDITS.
+
+# This is the CUA (Common User Access) flavour bind file, based on
+# bindings found in the Windows, Mac and Motif world, extended for Hebrew.
+
+# DO NOT CHANGE THIS DEFAULT BINDING FILE! It will be replaced
+# with every new install of LyX and your changes will be lost.
+# Instead, customize a copy of this file placed in
+# ~/.lyx/bind/he/cua.bind
+#
+# Happy tuning!
+
+# Load the default cua.bind
+# ../ just means that no localized bindfile
+# should be loaded here
+\bind_file ../cua.bind
+
+# Add binding to switch to Hebrew
+\bind "F12" "language hebrew"
}
-bool KeyMap::read(string const & bind_file, KeyMap * unbind_map, BindReadType rt)
+bool KeyMap::read(string const & bind_file, KeyMap * unbind_map, BindReadType rt, bool i18n)
{
- FileName bf = i18nLibFileSearch("bind", bind_file, "bind");
+ FileName bf = i18n ? i18nLibFileSearch("bind", bind_file, "bind")
+ : libFileSearch("bind", bind_file, "bind");
if (bf.empty()) {
if (rt == MissingOK)
return true;
error = true;
break;
}
- string const tmp = lexrc.getString();
- error |= !read(tmp, unbind_map);
+ string tmp = lexrc.getString();
+ if (prefixIs(tmp, "../")) {
+ tmp = split(tmp, '/');
+ // look in top dir
+ error |= !read(tmp, unbind_map, Default, false);
+ } else
+ // i18n search
+ error |= !read(tmp, unbind_map);
break;
}
* @param bind_file bind file
* @param unbind_map pointer to a KeyMap that holds \unbind bindings
* @param rt how to respond if the file can't be found
+ * @param i18n whether to search in localized folders
*/
bool read(std::string const & bind_file, KeyMap * unbind_map = 0,
- BindReadType rt = Default);
+ BindReadType rt = Default, bool i18n = true);
/** write to a bind file.
* @param append append to the bind_file instead of overwrite it