#include "support/filetools.h"
#include "support/gettext.h"
#include "support/lstrings.h"
+#include "support/TempFile.h"
#include "frontends/alert.h"
KeyModifier const mod2 = seq->modifiers[r].second;
// check if key is already there
+ // FIXME perf: Profiling shows that this is responsible of 99% of the
+ // cost of GuiPrefs::applyView()
Table::iterator end = table.end();
for (Table::iterator it = table.begin(); it != end; ++it) {
if (code == it->code
return retval == ReadOK;
LYXERR(Debug::FILES, "Converting bind file to " << LFUN_FORMAT);
- FileName const tempfile = FileName::tempName("convert_bind");
+ TempFile tmp("convert_bind");
+ FileName const tempfile = tmp.name();
bool const success = prefs2prefs(bind_file, tempfile, true);
if (!success) {
LYXERR0 ("Unable to convert " << bind_file <<
return false;
}
retval = readWithoutConv(tempfile, unbind_map);
- tempfile.removeFile();
return retval == ReadOK;
}
if (cit->prefixes) {
// this is a prefix key - set new map
seq->curmap = cit->prefixes.get();
- static FuncRequest prefix(LFUN_COMMAND_PREFIX);
+ static const FuncRequest prefix(LFUN_COMMAND_PREFIX);
return prefix;
} else {
// final key - reset map
Bindings bindings = findBindings(func);
if (bindings.empty())
return docstring();
-
+
odocstringstream res;
Bindings::const_iterator cit = bindings.begin();
Bindings::const_iterator cit_end = bindings.end();
}
if (!has_action)
list.push_back(Binding(FuncRequest(action), KeySequence(0, 0), tag));
- }
+ }
}
return list;
}