#include "support/FileName.h"
#include "support/filetools.h"
#include "support/lstrings.h"
#include "support/FileName.h"
#include "support/filetools.h"
#include "support/lstrings.h"
-using support::compare_ascii_no_case;
-using support::os::external_path;
-using support::os::external_path_list;
-using support::os::internal_path;
-using support::os::internal_path_list;
-using support::FileName;
-using support::FileFilterList;
-using support::addPath;
-using support::addName;
-using support::mkdir;
-using support::package;
-
}
static void parseFontName(QString const & mangled0,
string & name, string & foundry)
{
}
static void parseFontName(QString const & mangled0,
string & name, string & foundry)
{
-PrefKeyboard::PrefKeyboard(GuiPreferences * form, QWidget * parent)
- : PrefModule(_("Keyboard"), form, parent)
+PrefInput::PrefInput(GuiPreferences * form, QWidget * parent)
+ : PrefModule(_("Keyboard/Mouse"), form, parent)
this, SIGNAL(changed()));
connect(secondKeymapED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
this, SIGNAL(changed()));
connect(secondKeymapED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
{
// FIXME: can derive CB from the two EDs
rc.use_kbmap = keymapCB->isChecked();
rc.primary_kbmap = internal_path(fromqstr(firstKeymapED->text()));
rc.secondary_kbmap = internal_path(fromqstr(secondKeymapED->text()));
{
// FIXME: can derive CB from the two EDs
rc.use_kbmap = keymapCB->isChecked();
rc.primary_kbmap = internal_path(fromqstr(firstKeymapED->text()));
rc.secondary_kbmap = internal_path(fromqstr(secondKeymapED->text()));
{
// FIXME: can derive CB from the two EDs
keymapCB->setChecked(rc.use_kbmap);
firstKeymapED->setText(toqstr(external_path(rc.primary_kbmap)));
secondKeymapED->setText(toqstr(external_path(rc.secondary_kbmap)));
{
// FIXME: can derive CB from the two EDs
keymapCB->setChecked(rc.use_kbmap);
firstKeymapED->setText(toqstr(external_path(rc.primary_kbmap)));
secondKeymapED->setText(toqstr(external_path(rc.secondary_kbmap)));
this, SIGNAL(changed()));
connect(screenHugerED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
this, SIGNAL(changed()));
connect(screenHugerED, SIGNAL(textChanged(QString)),
this, SIGNAL(changed()));
screenTinyED->setValidator(new QDoubleValidator(screenTinyED));
screenSmallestED->setValidator(new QDoubleValidator(screenSmallestED));
screenTinyED->setValidator(new QDoubleValidator(screenTinyED));
screenSmallestED->setValidator(new QDoubleValidator(screenSmallestED));
rc.font_sizes[FONT_SIZE_LARGEST] = fromqstr(screenLargestED->text());
rc.font_sizes[FONT_SIZE_HUGE] = fromqstr(screenHugeED->text());
rc.font_sizes[FONT_SIZE_HUGER] = fromqstr(screenHugerED->text());
rc.font_sizes[FONT_SIZE_LARGEST] = fromqstr(screenLargestED->text());
rc.font_sizes[FONT_SIZE_HUGE] = fromqstr(screenHugeED->text());
rc.font_sizes[FONT_SIZE_HUGER] = fromqstr(screenHugerED->text());
screenLargestED->setText(toqstr(rc.font_sizes[FONT_SIZE_LARGEST]));
screenHugeED->setText(toqstr(rc.font_sizes[FONT_SIZE_HUGE]));
screenHugerED->setText(toqstr(rc.font_sizes[FONT_SIZE_HUGER]));
screenLargestED->setText(toqstr(rc.font_sizes[FONT_SIZE_LARGEST]));
screenHugeED->setText(toqstr(rc.font_sizes[FONT_SIZE_HUGE]));
screenHugerED->setText(toqstr(rc.font_sizes[FONT_SIZE_HUGER]));
vector<ColorCode>::const_iterator cit = lcolors_.begin();
vector<ColorCode>::const_iterator const end = lcolors_.end();
for (; cit != end; ++cit) {
vector<ColorCode>::const_iterator cit = lcolors_.begin();
vector<ColorCode>::const_iterator const end = lcolors_.end();
for (; cit != end; ++cit) {
Converters::const_iterator ccit = form_->converters().begin();
Converters::const_iterator cend = form_->converters().end();
for (; ccit != cend; ++ccit) {
Converters::const_iterator ccit = form_->converters().begin();
Converters::const_iterator cend = form_->converters().end();
for (; ccit != cend; ++ccit) {
ccit->From->prettyname() + " -> " + ccit->To->prettyname();
int type = form_->converters().getNumber(ccit->From->name(), ccit->To->name());
new QListWidgetItem(toqstr(name), convertersLW, type);
ccit->From->prettyname() + " -> " + ccit->To->prettyname();
int type = form_->converters().getNumber(ccit->From->name(), ccit->To->name());
new QListWidgetItem(toqstr(name), convertersLW, type);
- connect(rtlCB, SIGNAL(clicked()),
+ connect(rtlGB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
+ connect(visualCursorRB, SIGNAL(clicked()),
+ this, SIGNAL(changed()));
+ connect(logicalCursorRB, SIGNAL(clicked()),
this, SIGNAL(changed()));
connect(markForeignCB, SIGNAL(clicked()),
this, SIGNAL(changed()));
this, SIGNAL(changed()));
connect(markForeignCB, SIGNAL(clicked()),
this, SIGNAL(changed()));
- std::vector<LanguagePair> const langs = getLanguageData(false);
- std::vector<LanguagePair>::const_iterator lit = langs.begin();
- std::vector<LanguagePair>::const_iterator lend = langs.end();
+ vector<LanguagePair> const langs = getLanguageData(false);
+ vector<LanguagePair>::const_iterator lit = langs.begin();
+ vector<LanguagePair>::const_iterator lend = langs.end();
rc.mark_foreign_language = markForeignCB->isChecked();
rc.language_auto_begin = autoBeginCB->isChecked();
rc.language_auto_end = autoEndCB->isChecked();
rc.mark_foreign_language = markForeignCB->isChecked();
rc.language_auto_begin = autoBeginCB->isChecked();
rc.language_auto_end = autoEndCB->isChecked();
markForeignCB->setChecked(rc.mark_foreign_language);
autoBeginCB->setChecked(rc.language_auto_begin);
autoEndCB->setChecked(rc.language_auto_end);
markForeignCB->setChecked(rc.mark_foreign_language);
autoBeginCB->setChecked(rc.language_auto_begin);
autoEndCB->setChecked(rc.language_auto_end);
this, SIGNAL(changed()));
connect(sortEnvironmentsCB, SIGNAL(clicked()),
this, SIGNAL(changed()));
this, SIGNAL(changed()));
connect(sortEnvironmentsCB, SIGNAL(clicked()),
this, SIGNAL(changed()));
connect(autoSaveSB, SIGNAL(valueChanged(int)),
this, SIGNAL(changed()));
connect(autoSaveCB, SIGNAL(clicked()),
this, SIGNAL(changed()));
connect(lastfilesSB, SIGNAL(valueChanged(int)),
this, SIGNAL(changed()));
connect(autoSaveSB, SIGNAL(valueChanged(int)),
this, SIGNAL(changed()));
connect(autoSaveCB, SIGNAL(clicked()),
this, SIGNAL(changed()));
connect(lastfilesSB, SIGNAL(valueChanged(int)),
this, SIGNAL(changed()));
this, SIGNAL(changed()));
lastfilesSB->setMaximum(maxlastfiles);
}
this, SIGNAL(changed()));
lastfilesSB->setMaximum(maxlastfiles);
}
rc.allow_geometry_session = allowGeometrySessionCB->isChecked();
rc.cursor_follows_scrollbar = cursorFollowsCB->isChecked();
rc.sort_layouts = sortEnvironmentsCB->isChecked();
rc.allow_geometry_session = allowGeometrySessionCB->isChecked();
rc.cursor_follows_scrollbar = cursorFollowsCB->isChecked();
rc.sort_layouts = sortEnvironmentsCB->isChecked();
+ switch (macroEditStyleCO->currentIndex()) {
+ case 0: rc.macro_edit_style = LyXRC::MACRO_EDIT_INLINE_BOX; break;
+ case 1: rc.macro_edit_style = LyXRC::MACRO_EDIT_INLINE; break;
+ case 2: rc.macro_edit_style = LyXRC::MACRO_EDIT_LIST; break;
+ }
rc.autosave = autoSaveSB->value() * 60;
rc.make_backup = autoSaveCB->isChecked();
rc.num_lastfiles = lastfilesSB->value();
rc.autosave = autoSaveSB->value() * 60;
rc.make_backup = autoSaveCB->isChecked();
rc.num_lastfiles = lastfilesSB->value();
allowGeometrySessionCB->setChecked(rc.allow_geometry_session);
cursorFollowsCB->setChecked(rc.cursor_follows_scrollbar);
sortEnvironmentsCB->setChecked(rc.sort_layouts);
allowGeometrySessionCB->setChecked(rc.allow_geometry_session);
cursorFollowsCB->setChecked(rc.cursor_follows_scrollbar);
sortEnvironmentsCB->setChecked(rc.sort_layouts);
autoSaveSB->setValue(mins);
autoSaveCB->setChecked(rc.make_backup);
lastfilesSB->setValue(rc.num_lastfiles);
autoSaveSB->setValue(mins);
autoSaveCB->setChecked(rc.make_backup);
lastfilesSB->setValue(rc.num_lastfiles);
{
rc.bind_file = internal_path(fromqstr(bindFileED->text()));
// write user_bind and user_unbind to .lyx/bind/user.bind
{
rc.bind_file = internal_path(fromqstr(bindFileED->text()));
// write user_bind and user_unbind to .lyx/bind/user.bind
- string bind_dir = addPath(package().user_support().absFilename(), "bind");
- if (!FileName(bind_dir).exists() && mkdir(FileName(bind_dir), 0777)) {
+ FileName bind_dir(addPath(package().user_support().absFilename(), "bind"));
+ if (!bind_dir.exists() && !bind_dir.createDirectory(0777)) {
lyxerr << "LyX could not create the user bind directory '"
<< bind_dir << "'. All user-defined key bindings will be lost." << endl;
return;
}
lyxerr << "LyX could not create the user bind directory '"
<< bind_dir << "'. All user-defined key bindings will be lost." << endl;
return;
}
lyxerr << "LyX could not write to the user bind directory '"
<< bind_dir << "'. All user-defined key bindings will be lost." << endl;
return;
}
lyxerr << "LyX could not write to the user bind directory '"
<< bind_dir << "'. All user-defined key bindings will be lost." << endl;
return;
}
user_bind_.write(user_bind_file.toFilesystemEncoding(), false, false);
user_unbind_.write(user_bind_file.toFilesystemEncoding(), true, true);
// immediately apply the keybindings. Why this is not done before?
user_bind_.write(user_bind_file.toFilesystemEncoding(), false, false);
user_unbind_.write(user_bind_file.toFilesystemEncoding(), true, true);
// immediately apply the keybindings. Why this is not done before?
/////////////////////////////////////////////////////////////////////
GuiPreferences::GuiPreferences(GuiView & lv)
/////////////////////////////////////////////////////////////////////
GuiPreferences::GuiPreferences(GuiView & lv)
- : GuiDialog(lv, "prefs"), update_screen_font_(false)
+ : GuiDialog(lv, "prefs", qt_("Preferences")), update_screen_font_(false)