#include "support/os.h"
#include "support/userinfo.h"
+using namespace std;
+using namespace lyx::support;
namespace lyx {
namespace os = support::os;
-using support::ascii_lowercase;
-using support::bformat;
-using support::expandPath;
-using support::FileName;
-using support::getEnv;
-using support::libFileSearch;
-using support::token;
-
-using std::cout;
-using std::endl;
-
-using std::ios;
-using std::ofstream;
-using std::ostream;
-using std::string;
-
-
namespace {
// when adding something to this array keep it sorted!
{ "\\use_spell_lib", LyXRC::RC_USE_SPELL_LIB },
// compatibility with versions older than 1.4.0 only
{ "\\use_tempdir", LyXRC::RC_USETEMPDIR },
+ { "\\use_tooltip", LyXRC::RC_USE_TOOLTIP },
{ "\\user_email", LyXRC::RC_USER_EMAIL },
{ "\\user_name", LyXRC::RC_USER_NAME },
{ "\\view_dvi_paper_option", LyXRC::RC_VIEWDVI_PAPEROPTION },
preview_hashed_labels = false;
preview_scale_factor = "0.9";
use_converter_cache = true;
+ use_tooltip = true;
use_pixmap_cache = false;
converter_cache_maxage = 6 * 30 * 24 * 3600; // 6 months
}
-int LyXRC::read(std::istream & is)
+int LyXRC::read(istream & is)
{
Lexer lexrc(lyxrcTags, lyxrcCount);
if (lyxerr.debugging(Debug::PARSER))
isp_use_pers_dict = lexrc.getBool();
}
break;
+ case RC_USE_TOOLTIP:
+ if (lexrc.next()) {
+ use_tooltip = lexrc.getBool();
+ }
+ break;
case RC_USE_PIXMAP_CACHE:
if (lexrc.next()) {
use_pixmap_cache = lexrc.getBool();
int flgs = Format::none;
while (!flags.empty()) {
string flag;
- flags = support::split(flags, flag, ',');
+ flags = split(flags, flag, ',');
if (flag == "document")
flgs |= Format::document;
else if (flag == "vector")
class SameMover {
public:
- typedef std::pair<std::string, SpecialisedMover> Data;
+ typedef pair<string, SpecialisedMover> Data;
SameMover(Data const & comparison)
: comparison_(comparison) {}
}
if (tag != RC_LAST)
break;
+ case RC_USE_TOOLTIP:
+ if (ignore_system_lyxrc ||
+ use_tooltip != system_lyxrc.use_tooltip) {
+ os << "\\use_tooltip "
+ << convert<string>(use_tooltip)
+ << '\n';
+ }
case RC_USE_PIXMAP_CACHE:
if (ignore_system_lyxrc ||
use_pixmap_cache != system_lyxrc.use_pixmap_cache) {
<< cit->shortcut() << "\" \""
<< cit->viewer() << "\" \""
<< cit->editor() << "\" \"";
- std::vector<string> flags;
+ vector<string> flags;
if (cit->documentFormat())
flags.push_back("document");
if (cit->vectorFormat())
flags.push_back("vector");
- os << support::getStringFromVector(flags);
+ os << getStringFromVector(flags);
os << "\"\n";
}
}
for (; it != end; ++it) {
Movers::const_iterator const sysit =
- std::find_if(sysbegin, sysend, SameMover(*it));
+ find_if(sysbegin, sysend, SameMover(*it));
if (sysit == sysend) {
- std::string const & fmt = it->first;
- std::string const & command =
+ string const & fmt = it->first;
+ string const & command =
it->second.command();
os << "\\copier " << fmt
break;
case RC_DEFFILE:
- //FIXME: fix description.
- str = _("Command definition file.");
+ str = _("Command definition file. Can either specify an absolute path, or LyX will look in its global and local commands/ directories.");
break;
case RC_DEFAULT_LANGUAGE:
str = _("Specify whether to pass the -T input encoding option to ispell. Enable this if you cannot check the spelling of words containing accented letters. This may not work with all dictionaries.");
break;
+ case RC_USE_TOOLTIP:
+ str = _("Enable the automatic appearance of tool tips in the work area.");
+ break;
+
case RC_USE_PIXMAP_CACHE:
str = _("Enable the pixmap cache that might improve performance on Mac and Windows.");
break;