3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
14 #include "support/lstrings.h"
15 #include "support/tostr.h"
16 #include "support/std_sstream.h"
19 #include "ControlPrefs.h"
20 #include "QPrefsDialog.h"
21 #include "ui/QPrefAsciiModule.h"
22 #include "ui/QPrefDateModule.h"
23 #include "ui/QPrefKeyboardModule.h"
24 #include "ui/QPrefLatexModule.h"
25 #include "ui/QPrefScreenFontsModule.h"
26 #include "ui/QPrefColorsModule.h"
27 #include "ui/QPrefDisplayModule.h"
28 #include "ui/QPrefPathsModule.h"
29 #include "ui/QPrefSpellcheckerModule.h"
30 #include "ui/QPrefLanguageModule.h"
31 #include "ui/QPrefPrinterModule.h"
32 #include "ui/QPrefUIModule.h"
33 #include "ui/QPrefIdentityModule.h"
38 #include "frnt_lang.h"
39 #include "helper_funcs.h"
40 #include "qt_helpers.h"
41 #include "lcolorcache.h"
43 #include <boost/tuple/tuple.hpp>
45 #include <qpushbutton.h>
46 #include <qcheckbox.h>
47 #include <qlineedit.h>
49 #include <qcombobox.h>
51 #include "qcoloritem.h"
55 using lyx::support::compare_no_case;
56 using lyx::support::strToDbl;
63 using std::ostringstream;
68 typedef Qt2CB<ControlPrefs, Qt2DB<QPrefsDialog> > base_class;
71 : base_class(_("LyX: Preferences"))
76 Converters & QPrefs::converters()
78 return controller().converters();
82 Formats & QPrefs::formats()
84 return controller().formats();
88 void QPrefs::build_dialog()
90 dialog_.reset(new QPrefsDialog(this));
92 bcview().setOK(dialog_->savePB);
93 bcview().setApply(dialog_->applyPB);
94 bcview().setCancel(dialog_->closePB);
95 bcview().setRestore(dialog_->restorePB);
97 QPrefLanguageModule * langmod(dialog_->languageModule);
99 langmod->defaultLanguageCO->clear();
100 // store the lang identifiers for later
101 vector<frnt::LanguagePair> const langs = frnt::getLanguageData(false);
102 lang_ = getSecond(langs);
104 vector<frnt::LanguagePair>::const_iterator lit = langs.begin();
105 vector<frnt::LanguagePair>::const_iterator lend = langs.end();
106 for (; lit != lend; ++lit) {
107 langmod->defaultLanguageCO->insertItem(toqstr(lit->first));
110 QPrefSpellcheckerModule * spellmod(dialog_->spellcheckerModule);
111 spellmod->spellCommandCO->insertItem(qt_("ispell"));
112 spellmod->spellCommandCO->insertItem(qt_("aspell"));
113 spellmod->spellCommandCO->insertItem(qt_("hspell"));
115 spellmod->spellCommandCO->insertItem(qt_("pspell (library)"));
118 spellmod->spellCommandCO->insertItem(qt_("aspell (library)"));
126 LyXRC & rc(controller().rc());
128 QPrefLanguageModule * langmod(dialog_->languageModule);
130 // FIXME: remove rtl_support bool
131 rc.rtl_support = langmod->rtlCB->isChecked();
132 rc.mark_foreign_language = langmod->markForeignCB->isChecked();
133 rc.language_auto_begin = langmod->autoBeginCB->isChecked();
134 rc.language_auto_end = langmod->autoEndCB->isChecked();
135 rc.language_use_babel = langmod->useBabelCB->isChecked();
136 rc.language_global_options = langmod->globalCB->isChecked();
137 rc.language_package = fromqstr(langmod->languagePackageED->text());
138 rc.language_command_begin = fromqstr(langmod->startCommandED->text());
139 rc.language_command_end = fromqstr(langmod->endCommandED->text());
140 rc.default_language = lang_[langmod->defaultLanguageCO->currentItem()];
142 QPrefUIModule * uimod(dialog_->uiModule);
144 rc.ui_file = fromqstr(uimod->uiFileED->text());
145 rc.bind_file = fromqstr(uimod->bindFileED->text());
146 rc.cursor_follows_scrollbar = uimod->cursorFollowsCB->isChecked();
147 rc.wheel_jump = uimod->wheelMouseSB->value();
148 rc.autosave = uimod->autoSaveSB->value() * 60;
149 rc.make_backup = uimod->autoSaveCB->isChecked();
150 rc.num_lastfiles = uimod->lastfilesSB->value();
153 QPrefKeyboardModule * keymod(dialog_->keyboardModule);
155 // FIXME: can derive CB from the two EDs
156 rc.use_kbmap = keymod->keymapCB->isChecked();
157 rc.primary_kbmap = fromqstr(keymod->firstKeymapED->text());
158 rc.secondary_kbmap = fromqstr(keymod->secondKeymapED->text());
161 QPrefAsciiModule * ascmod(dialog_->asciiModule);
163 rc.ascii_linelen = ascmod->asciiLinelengthSB->value();
164 rc.ascii_roff_command = fromqstr(ascmod->asciiRoffED->text());
167 QPrefDateModule * datemod(dialog_->dateModule);
169 rc.date_insert_format = fromqstr(datemod->DateED->text());
172 QPrefLatexModule * latexmod(dialog_->latexModule);
174 rc.fontenc = fromqstr(latexmod->latexEncodingED->text());
175 rc.chktex_command = fromqstr(latexmod->latexChecktexED->text());
176 rc.bibtex_command = fromqstr(latexmod->latexBibtexED->text());
177 rc.auto_reset_options = latexmod->latexAutoresetCB->isChecked();
178 rc.view_dvi_paper_option = fromqstr(latexmod->latexDviPaperED->text());
179 rc.default_papersize =
180 static_cast<PAPER_SIZE>(latexmod->latexPaperSizeCO->currentItem());
182 QPrefDisplayModule * displaymod(dialog_->displayModule);
184 rc.preview = displaymod->previewCB->isChecked();
186 lyx::graphics::DisplayType dtype(lyx::graphics::ColorDisplay);
188 switch (displaymod->displayGraphicsCO->currentItem()) {
189 case 3: dtype = lyx::graphics::NoDisplay; break;
190 case 2: dtype = lyx::graphics::ColorDisplay; break;
191 case 1: dtype = lyx::graphics::GrayscaleDisplay; break;
192 case 0: dtype = lyx::graphics::MonochromeDisplay; break;
194 rc.display_graphics = dtype;
197 #warning FIXME!! The graphics cache no longer has a changeDisplay method.
200 if (old_value != rc.display_graphics) {
201 lyx::graphics::GCache & gc = lyx::graphics::GCache::get();
206 QPrefPathsModule * pathsmod(dialog_->pathsModule);
208 rc.document_path = fromqstr(pathsmod->workingDirED->text());
209 rc.template_path = fromqstr(pathsmod->templateDirED->text());
210 rc.backupdir_path = fromqstr(pathsmod->backupDirED->text());
211 rc.tempdir_path = fromqstr(pathsmod->tempDirED->text());
212 // FIXME: should be a checkbox only
213 rc.lyxpipes = fromqstr(pathsmod->lyxserverDirED->text());
216 QPrefSpellcheckerModule * spellmod(dialog_->spellcheckerModule);
218 switch (spellmod->spellCommandCO->currentItem()) {
222 rc.use_spell_lib = false;
223 rc.isp_command = fromqstr(spellmod->spellCommandCO->currentText());
226 rc.use_spell_lib = true;
230 // FIXME: remove isp_use_alt_lang
231 rc.isp_alt_lang = fromqstr(spellmod->altLanguageED->text());
232 rc.isp_use_alt_lang = !rc.isp_alt_lang.empty();
233 // FIXME: remove isp_use_esc_chars
234 rc.isp_esc_chars = fromqstr(spellmod->escapeCharactersED->text());
235 rc.isp_use_esc_chars = !rc.isp_esc_chars.empty();
236 // FIXME: remove isp_use_pers_dict
237 rc.isp_pers_dict = fromqstr(spellmod->persDictionaryED->text());
238 rc.isp_use_pers_dict = !rc.isp_pers_dict.empty();
239 rc.isp_accept_compound = spellmod->compoundWordCB->isChecked();
240 rc.isp_use_input_encoding = spellmod->inputEncodingCB->isChecked();
243 QPrefPrinterModule * printmod(dialog_->printerModule);
245 rc.print_adapt_output = printmod->printerAdaptCB->isChecked();
246 rc.print_command = fromqstr(printmod->printerCommandED->text());
247 rc.printer = fromqstr(printmod->printerNameED->text());
249 rc.print_pagerange_flag = fromqstr(printmod->printerPageRangeED->text());
250 rc.print_copies_flag = fromqstr(printmod->printerCopiesED->text());
251 rc.print_reverse_flag = fromqstr(printmod->printerReverseED->text());
252 rc.print_to_printer = fromqstr(printmod->printerToPrinterED->text());
253 rc.print_file_extension = fromqstr(printmod->printerExtensionED->text());
254 rc.print_spool_command = fromqstr(printmod->printerSpoolCommandED->text());
255 rc.print_paper_flag = fromqstr(printmod->printerPaperTypeED->text());
256 rc.print_evenpage_flag = fromqstr(printmod->printerEvenED->text());
257 rc.print_oddpage_flag = fromqstr(printmod->printerOddED->text());
258 rc.print_collcopies_flag = fromqstr(printmod->printerCollatedED->text());
259 rc.print_landscape_flag = fromqstr(printmod->printerLandscapeED->text());
260 rc.print_to_file = fromqstr(printmod->printerToFileED->text());
261 rc.print_extra_options = fromqstr(printmod->printerExtraED->text());
262 rc.print_spool_printerprefix = fromqstr(printmod->printerSpoolPrefixED->text());
263 rc.print_paper_dimension_flag = fromqstr(printmod->printerPaperSizeED->text());
266 QPrefIdentityModule * idmod(dialog_->identityModule);
267 rc.user_name = fromqstr(idmod->nameED->text());
268 rc.user_email = fromqstr(idmod->emailED->text());
270 QPrefScreenFontsModule * fontmod(dialog_->screenfontsModule);
272 LyXRC const oldrc(rc);
274 boost::tie(rc.roman_font_name, rc.roman_font_foundry)
275 = parseFontName(fromqstr(fontmod->screenRomanCO->currentText()));
276 boost::tie(rc.sans_font_name, rc.sans_font_foundry) =
277 parseFontName(fromqstr(fontmod->screenSansCO->currentText()));
278 boost::tie(rc.typewriter_font_name, rc.typewriter_font_foundry) =
279 parseFontName(fromqstr(fontmod->screenTypewriterCO->currentText()));
281 rc.zoom = fontmod->screenZoomSB->value();
282 rc.dpi = fontmod->screenDpiSB->value();
283 rc.font_sizes[LyXFont::SIZE_TINY] = strToDbl(fromqstr(fontmod->screenTinyED->text()));
284 rc.font_sizes[LyXFont::SIZE_SCRIPT] = strToDbl(fromqstr(fontmod->screenSmallestED->text()));
285 rc.font_sizes[LyXFont::SIZE_FOOTNOTE] = strToDbl(fromqstr(fontmod->screenSmallerED->text()));
286 rc.font_sizes[LyXFont::SIZE_SMALL] = strToDbl(fromqstr(fontmod->screenSmallED->text()));
287 rc.font_sizes[LyXFont::SIZE_NORMAL] = strToDbl(fromqstr(fontmod->screenNormalED->text()));
288 rc.font_sizes[LyXFont::SIZE_LARGE] = strToDbl(fromqstr(fontmod->screenLargeED->text()));
289 rc.font_sizes[LyXFont::SIZE_LARGER] = strToDbl(fromqstr(fontmod->screenLargerED->text()));
290 rc.font_sizes[LyXFont::SIZE_LARGEST] = strToDbl(fromqstr(fontmod->screenLargestED->text()));
291 rc.font_sizes[LyXFont::SIZE_HUGE] = strToDbl(fromqstr(fontmod->screenHugeED->text()));
292 rc.font_sizes[LyXFont::SIZE_HUGER] = strToDbl(fromqstr(fontmod->screenHugerED->text()));
294 if (rc.font_sizes != oldrc.font_sizes
295 || rc.roman_font_name != oldrc.roman_font_name
296 || rc.sans_font_name != oldrc.sans_font_name
297 || rc.typewriter_font_name != oldrc.typewriter_font_name
298 || rc.zoom != oldrc.zoom || rc.dpi != oldrc.dpi) {
299 controller().updateScreenFonts();
302 QPrefColorsModule * colmod(dialog_->colorsModule);
306 for (i = 0; i < colmod->lyxObjectsLB->count(); ++i) {
307 QListBoxItem * ib(colmod->lyxObjectsLB->item(i));
308 QColorItem * ci(static_cast<QColorItem*>(ib));
310 LColor::color const col(dialog_->colors_[i]);
311 QColor const & qcol(lcolorcache.get(col));
313 // FIXME: dubious, but it's what xforms does
314 if (qcol != ci->color()) {
317 ostr << '#' << std::setbase(16) << setfill('0')
318 << setw(2) << ci->color().red()
319 << setw(2) << ci->color().green()
320 << setw(2) << ci->color().blue();
322 string newhex(ostr.str());
323 controller().setColor(col, newhex);
329 // FIXME: move to helper_funcs.h
333 typename std::vector<A>::size_type
334 findPos(std::vector<A> const & vec, A const & val)
336 typedef typename std::vector<A>::const_iterator Cit;
338 Cit it = std::find(vec.begin(), vec.end(), val);
341 return distance(vec.begin(), it);
344 void setComboxFont(QComboBox * cb, string const & family, string const & foundry)
346 string const name = makeFontName(family, foundry);
347 for (int i = 0; i < cb->count(); ++i) {
348 if (fromqstr(cb->text(i)) == name) {
349 cb->setCurrentItem(i);
354 // Try matching without foundry name
356 // We count in reverse in order to prefer the Xft foundry
357 for (int i = cb->count() - 1; i >= 0; --i) {
358 pair<string, string> tmp = parseFontName(fromqstr(cb->text(i)));
359 if (compare_no_case(tmp.first, family) == 0) {
360 cb->setCurrentItem(i);
365 // family alone can contain e.g. "Helvetica [Adobe]"
366 pair<string, string> tmpfam = parseFontName(family);
368 // We count in reverse in order to prefer the Xft foundry
369 for (int i = cb->count() - 1; i >= 0; --i) {
370 pair<string, string> tmp = parseFontName(fromqstr(cb->text(i)));
371 if (compare_no_case(tmp.first, tmpfam.first) == 0) {
372 cb->setCurrentItem(i);
377 // Bleh, default fonts, and the names couldn't be found. Hack
378 // for bug 1063. Qt makes baby Jesus cry.
382 if (family == lyx_gui::roman_font_name()) {
383 font.setStyleHint(QFont::Serif);
384 font.setFamily(lyx_gui::roman_font_name().c_str());
385 } else if (family == lyx_gui::sans_font_name()) {
386 font.setStyleHint(QFont::SansSerif);
387 font.setFamily(lyx_gui::sans_font_name().c_str());
388 } else if (family == lyx_gui::typewriter_font_name()) {
389 font.setStyleHint(QFont::TypeWriter);
390 font.setFamily(lyx_gui::typewriter_font_name().c_str());
392 lyxerr << "FAILED to find the default font !"
393 << foundry << ", " << family << endl;
397 QFontInfo info(font);
398 lyxerr << "Apparent font is " << info.family() << endl;
400 for (int i = 0; i < cb->count(); ++i) {
401 lyxerr << "Looking at " << fromqstr(cb->text(i)) << endl;
402 if (compare_no_case(cb->text(i).latin1(), info.family().latin1()) == 0) {
403 cb->setCurrentItem(i);
408 lyxerr << "FAILED to find the font !"
409 << foundry << ", " << family << endl;
412 } // end namespace anon
415 void QPrefs::update_contents()
417 LyXRC const & rc(controller().rc());
419 QPrefLanguageModule * langmod(dialog_->languageModule);
421 // FIXME: remove rtl_support bool
422 langmod->rtlCB->setChecked(rc.rtl_support);
423 langmod->markForeignCB->setChecked(rc.mark_foreign_language);
424 langmod->autoBeginCB->setChecked(rc.language_auto_begin);
425 langmod->autoEndCB->setChecked(rc.language_auto_end);
426 langmod->useBabelCB->setChecked(rc.language_use_babel);
427 langmod->globalCB->setChecked(rc.language_global_options);
428 langmod->languagePackageED->setText(toqstr(rc.language_package));
429 langmod->startCommandED->setText(toqstr(rc.language_command_begin));
430 langmod->endCommandED->setText(toqstr(rc.language_command_end));
432 int const pos = int(findPos(lang_, rc.default_language));
433 langmod->defaultLanguageCO->setCurrentItem(pos);
435 QPrefUIModule * uimod(dialog_->uiModule);
437 uimod->uiFileED->setText(toqstr(rc.ui_file));
438 uimod->bindFileED->setText(toqstr(rc.bind_file));
439 uimod->cursorFollowsCB->setChecked(rc.cursor_follows_scrollbar);
440 uimod->wheelMouseSB->setValue(rc.wheel_jump);
441 // convert to minutes
442 int mins(rc.autosave / 60);
443 if (rc.autosave && !mins)
445 uimod->autoSaveSB->setValue(mins);
446 uimod->autoSaveCB->setChecked(rc.make_backup);
447 uimod->lastfilesSB->setValue(rc.num_lastfiles);
450 QPrefIdentityModule * idmod(dialog_->identityModule);
451 idmod->nameED->setText(toqstr(rc.user_name));
452 idmod->emailED->setText(toqstr(rc.user_email));
455 QPrefKeyboardModule * keymod(dialog_->keyboardModule);
457 // FIXME: can derive CB from the two EDs
458 keymod->keymapCB->setChecked(rc.use_kbmap);
459 // no idea why we need these. Fscking Qt.
460 keymod->firstKeymapED->setEnabled(rc.use_kbmap);
461 keymod->firstKeymapPB->setEnabled(rc.use_kbmap);
462 keymod->firstKeymapLA->setEnabled(rc.use_kbmap);
463 keymod->secondKeymapED->setEnabled(rc.use_kbmap);
464 keymod->secondKeymapPB->setEnabled(rc.use_kbmap);
465 keymod->secondKeymapLA->setEnabled(rc.use_kbmap);
466 keymod->firstKeymapED->setText(toqstr(rc.primary_kbmap));
467 keymod->secondKeymapED->setText(toqstr(rc.secondary_kbmap));
470 QPrefAsciiModule * ascmod(dialog_->asciiModule);
472 ascmod->asciiLinelengthSB->setValue(rc.ascii_linelen);
473 ascmod->asciiRoffED->setText(toqstr(rc.ascii_roff_command));
476 QPrefDateModule * datemod(dialog_->dateModule);
478 datemod->DateED->setText(toqstr(rc.date_insert_format));
481 QPrefLatexModule * latexmod(dialog_->latexModule);
483 latexmod->latexEncodingED->setText(toqstr(rc.fontenc));
484 latexmod->latexChecktexED->setText(toqstr(rc.chktex_command));
485 latexmod->latexBibtexED->setText(toqstr(rc.bibtex_command));
486 latexmod->latexAutoresetCB->setChecked(rc.auto_reset_options);
487 latexmod->latexDviPaperED->setText(toqstr(rc.view_dvi_paper_option));
488 latexmod->latexPaperSizeCO->setCurrentItem(rc.default_papersize);
491 QPrefDisplayModule * displaymod(dialog_->displayModule);
493 displaymod->previewCB->setChecked(rc.preview);
497 switch (rc.display_graphics) {
498 case lyx::graphics::NoDisplay: item = 3; break;
499 case lyx::graphics::ColorDisplay: item = 2; break;
500 case lyx::graphics::GrayscaleDisplay: item = 1; break;
501 case lyx::graphics::MonochromeDisplay: item = 0; break;
504 displaymod->displayGraphicsCO->setCurrentItem(item);
507 QPrefPathsModule * pathsmod(dialog_->pathsModule);
509 pathsmod->workingDirED->setText(toqstr(rc.document_path));
510 pathsmod->templateDirED->setText(toqstr(rc.template_path));
511 pathsmod->backupDirED->setText(toqstr(rc.backupdir_path));
512 pathsmod->tempDirED->setText(toqstr(rc.tempdir_path));
513 // FIXME: should be a checkbox only
514 pathsmod->lyxserverDirED->setText(toqstr(rc.lyxpipes));
517 QPrefSpellcheckerModule * spellmod(dialog_->spellcheckerModule);
519 spellmod->spellCommandCO->setCurrentItem(0);
521 if (rc.isp_command == "ispell") {
522 spellmod->spellCommandCO->setCurrentItem(0);
523 } else if (rc.isp_command == "aspell") {
524 spellmod->spellCommandCO->setCurrentItem(1);
525 } else if (rc.isp_command == "hspell") {
526 spellmod->spellCommandCO->setCurrentItem(2);
529 if (rc.use_spell_lib) {
530 #if defined(USE_ASPELL) || defined(USE_PSPELL)
531 spellmod->spellCommandCO->setCurrentItem(3);
535 // FIXME: remove isp_use_alt_lang
536 spellmod->altLanguageED->setText(toqstr(rc.isp_alt_lang));
537 // FIXME: remove isp_use_esc_chars
538 spellmod->escapeCharactersED->setText(toqstr(rc.isp_esc_chars));
539 // FIXME: remove isp_use_pers_dict
540 spellmod->persDictionaryED->setText(toqstr(rc.isp_pers_dict));
541 spellmod->compoundWordCB->setChecked(rc.isp_accept_compound);
542 spellmod->inputEncodingCB->setChecked(rc.isp_use_input_encoding);
545 QPrefPrinterModule * printmod(dialog_->printerModule);
547 printmod->printerAdaptCB->setChecked(rc.print_adapt_output);
548 printmod->printerCommandED->setText(toqstr(rc.print_command));
549 printmod->printerNameED->setText(toqstr(rc.printer));
551 printmod->printerPageRangeED->setText(toqstr(rc.print_pagerange_flag));
552 printmod->printerCopiesED->setText(toqstr(rc.print_copies_flag));
553 printmod->printerReverseED->setText(toqstr(rc.print_reverse_flag));
554 printmod->printerToPrinterED->setText(toqstr(rc.print_to_printer));
555 printmod->printerExtensionED->setText(toqstr(rc.print_file_extension));
556 printmod->printerSpoolCommandED->setText(toqstr(rc.print_spool_command));
557 printmod->printerPaperTypeED->setText(toqstr(rc.print_paper_flag));
558 printmod->printerEvenED->setText(toqstr(rc.print_evenpage_flag));
559 printmod->printerOddED->setText(toqstr(rc.print_oddpage_flag));
560 printmod->printerCollatedED->setText(toqstr(rc.print_collcopies_flag));
561 printmod->printerLandscapeED->setText(toqstr(rc.print_landscape_flag));
562 printmod->printerToFileED->setText(toqstr(rc.print_to_file));
563 printmod->printerExtraED->setText(toqstr(rc.print_extra_options));
564 printmod->printerSpoolPrefixED->setText(toqstr(rc.print_spool_printerprefix));
565 printmod->printerPaperSizeED->setText(toqstr(rc.print_paper_dimension_flag));
568 QPrefScreenFontsModule * fontmod(dialog_->screenfontsModule);
570 setComboxFont(fontmod->screenRomanCO, rc.roman_font_name,
571 rc.roman_font_foundry);
572 setComboxFont(fontmod->screenSansCO, rc.sans_font_name,
573 rc.sans_font_foundry);
574 setComboxFont(fontmod->screenTypewriterCO, rc.typewriter_font_name,
575 rc.typewriter_font_foundry);
577 dialog_->select_roman(fontmod->screenRomanCO->currentText());
578 dialog_->select_sans(fontmod->screenSansCO->currentText());
579 dialog_->select_typewriter(fontmod->screenTypewriterCO->currentText());
581 fontmod->screenZoomSB->setValue(rc.zoom);
582 fontmod->screenDpiSB->setValue(int(rc.dpi));
583 fontmod->screenTinyED->setText(toqstr(tostr(rc.font_sizes[LyXFont::SIZE_TINY])));
584 fontmod->screenSmallestED->setText(toqstr(tostr(rc.font_sizes[LyXFont::SIZE_SCRIPT])));
585 fontmod->screenSmallerED->setText(toqstr(tostr(rc.font_sizes[LyXFont::SIZE_FOOTNOTE])));
586 fontmod->screenSmallED->setText(toqstr(tostr(rc.font_sizes[LyXFont::SIZE_SMALL])));
587 fontmod->screenNormalED->setText(toqstr(tostr(rc.font_sizes[LyXFont::SIZE_NORMAL])));
588 fontmod->screenLargeED->setText(toqstr(tostr(rc.font_sizes[LyXFont::SIZE_LARGE])));
589 fontmod->screenLargerED->setText(toqstr(tostr(rc.font_sizes[LyXFont::SIZE_LARGER])));
590 fontmod->screenLargestED->setText(toqstr(tostr(rc.font_sizes[LyXFont::SIZE_LARGEST])));
591 fontmod->screenHugeED->setText(toqstr(tostr(rc.font_sizes[LyXFont::SIZE_HUGE])));
592 fontmod->screenHugerED->setText(toqstr(tostr(rc.font_sizes[LyXFont::SIZE_HUGER])));
594 dialog_->updateFormats();
596 dialog_->updateConverters();