]> git.lyx.org Git - features.git/blob - src/frontends/qt2/QPrefs.C
dont use pragma impementation and interface anymore
[features.git] / src / frontends / qt2 / QPrefs.C
1 /**
2  * \file QPrefs.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author John Levon
7  *
8  * Full author contact details are available in file CREDITS
9  */
10
11 #include <config.h>
12
13
14 #include "support/lstrings.h"
15 #include "Lsstream.h"
16 #include <iomanip>
17
18 #include "ControlPrefs.h"
19 #include "QPrefsDialog.h"
20 #include "ui/QPrefAsciiModule.h"
21 #include "ui/QPrefDateModule.h"
22 #include "ui/QPrefKeyboardModule.h"
23 #include "ui/QPrefLatexModule.h"
24 #include "ui/QPrefScreenFontsModule.h"
25 #include "ui/QPrefColorsModule.h"
26 #include "ui/QPrefDisplayModule.h"
27 #include "ui/QPrefPathsModule.h"
28 #include "ui/QPrefSpellcheckerModule.h"
29 #include "ui/QPrefConvertersModule.h"
30 #include "ui/QPrefFileformatsModule.h"
31 #include "ui/QPrefLanguageModule.h"
32 #include "ui/QPrefPrinterModule.h"
33 #include "ui/QPrefUIModule.h"
34 #include "ui/QPrefIdentityModule.h"
35 #include "QPrefs.h"
36 #include "Qt2BC.h"
37 #include "lyxrc.h"
38 #include "frnt_lang.h"
39 #include "helper_funcs.h"
40 #include "qt_helpers.h"
41 #include "debug.h"
42
43 #include <boost/tuple/tuple.hpp>
44
45 #include <qpushbutton.h>
46 #include <qcheckbox.h>
47 #include <qlineedit.h>
48 #include <qspinbox.h>
49 #include <qcombobox.h>
50 #include <qlistbox.h>
51 #include <qlabel.h>
52 #include "qcoloritem.h"
53
54 using std::vector;
55 using std::pair;
56 using std::ostringstream;
57 using std::setfill;
58 using std::setw;
59 using std::endl;
60
61 typedef Qt2CB<ControlPrefs, Qt2DB<QPrefsDialog> > base_class;
62
63
64 QPrefs::QPrefs()
65         : base_class(qt_("LyX: Preferences"))
66 {
67 }
68
69
70 void QPrefs::build_dialog()
71 {
72         dialog_.reset(new QPrefsDialog(this));
73
74         bc().setOK(dialog_->savePB);
75         bc().setApply(dialog_->applyPB);
76         bc().setCancel(dialog_->closePB);
77         bc().setRestore(dialog_->restorePB);
78
79         QPrefLanguageModule * langmod(dialog_->languageModule);
80
81         langmod->defaultLanguageCO->clear();
82         // store the lang identifiers for later
83         vector<frnt::LanguagePair> const langs = frnt::getLanguageData(false);
84         lang_ = getSecond(langs);
85
86         vector<frnt::LanguagePair>::const_iterator lit  = langs.begin();
87         vector<frnt::LanguagePair>::const_iterator lend = langs.end();
88         for (; lit != lend; ++lit) {
89                 langmod->defaultLanguageCO->insertItem(toqstr(lit->first));
90         }
91 }
92
93
94 void QPrefs::apply()
95 {
96         LyXRC & rc(controller().rc());
97
98         QPrefLanguageModule * langmod(dialog_->languageModule);
99
100         // FIXME: remove rtl_support bool
101         rc.rtl_support = langmod->rtlCB->isChecked();
102         rc.mark_foreign_language = langmod->markForeignCB->isChecked();
103         rc.language_auto_begin = langmod->autoBeginCB->isChecked();
104         rc.language_auto_end = langmod->autoEndCB->isChecked();
105         rc.language_use_babel = langmod->useBabelCB->isChecked();
106         rc.language_global_options = langmod->globalCB->isChecked();
107         rc.language_package = fromqstr(langmod->languagePackageED->text());
108         rc.language_command_begin = fromqstr(langmod->startCommandED->text());
109         rc.language_command_end = fromqstr(langmod->endCommandED->text());
110         rc.default_language = lang_[langmod->defaultLanguageCO->currentItem()];
111
112         QPrefUIModule * uimod(dialog_->uiModule);
113
114         rc.ui_file = fromqstr(uimod->uiFileED->text());
115         rc.bind_file = fromqstr(uimod->bindFileED->text());
116         rc.cursor_follows_scrollbar = uimod->cursorFollowsCB->isChecked();
117         rc.wheel_jump = uimod->wheelMouseSB->value();
118         rc.autosave = uimod->autoSaveSB->value() * 60;
119         rc.make_backup = uimod->autoSaveCB->isChecked();
120         rc.num_lastfiles = uimod->lastfilesSB->value();
121
122
123         QPrefKeyboardModule * keymod(dialog_->keyboardModule);
124
125         // FIXME: can derive CB from the two EDs
126         rc.use_kbmap = keymod->keymapCB->isChecked();
127         rc.primary_kbmap = fromqstr(keymod->firstKeymapED->text());
128         rc.secondary_kbmap = fromqstr(keymod->secondKeymapED->text());
129
130
131         QPrefAsciiModule * ascmod(dialog_->asciiModule);
132
133         rc.ascii_linelen = ascmod->asciiLinelengthSB->value();
134         rc.ascii_roff_command = fromqstr(ascmod->asciiRoffED->text());
135
136
137         QPrefDateModule * datemod(dialog_->dateModule);
138
139         rc.date_insert_format = fromqstr(datemod->DateED->text());
140
141
142         QPrefLatexModule * latexmod(dialog_->latexModule);
143
144         rc.fontenc = fromqstr(latexmod->latexEncodingED->text());
145         rc.chktex_command = fromqstr(latexmod->latexChecktexED->text());
146         rc.auto_reset_options = latexmod->latexAutoresetCB->isChecked();
147         rc.view_dvi_paper_option = fromqstr(latexmod->latexDviPaperED->text());
148         rc.default_papersize =
149                 static_cast<BufferParams::PAPER_SIZE>(latexmod->latexPaperSizeCO->currentItem());
150
151
152         QPrefDisplayModule * displaymod(dialog_->displayModule);
153
154         rc.preview = displaymod->previewCB->isChecked();
155
156         grfx::DisplayType dtype(grfx::ColorDisplay);
157
158         switch (displaymod->displayGraphicsCO->currentItem()) {
159                 case 3: dtype = grfx::NoDisplay; break;
160                 case 2: dtype = grfx::ColorDisplay; break;
161                 case 1: dtype = grfx::GrayscaleDisplay; break;
162                 case 0: dtype = grfx::MonochromeDisplay; break;
163         }
164         rc.display_graphics = dtype;
165
166 #ifdef WITH_WARNINGS
167 #warning FIXME!! The graphics cache no longer has a changeDisplay method.
168 #endif
169 #if 0
170         if (old_value != rc.display_graphics) {
171                 grfx::GCache & gc = grfx::GCache::get();
172                 gc.changeDisplay();
173         }
174 #endif
175
176         QPrefPathsModule * pathsmod(dialog_->pathsModule);
177
178         rc.document_path = fromqstr(pathsmod->workingDirED->text());
179         rc.template_path = fromqstr(pathsmod->templateDirED->text());
180         rc.backupdir_path = fromqstr(pathsmod->backupDirED->text());
181         rc.use_tempdir = pathsmod->tempDirCB->isChecked();
182         rc.tempdir_path = fromqstr(pathsmod->tempDirED->text());
183         // FIXME: should be a checkbox only
184         rc.lyxpipes = fromqstr(pathsmod->lyxserverDirED->text());
185
186
187         QPrefSpellcheckerModule * spellmod(dialog_->spellcheckerModule);
188
189         if (spellmod->spellCommandCO->currentItem() == 0)
190                 rc.isp_command = "ispell";
191         else
192                 rc.isp_command = "aspell";
193
194         // FIXME: remove isp_use_alt_lang
195         rc.isp_alt_lang = fromqstr(spellmod->altLanguageED->text());
196         rc.isp_use_alt_lang = !rc.isp_alt_lang.empty();
197         // FIXME: remove isp_use_esc_chars
198         rc.isp_esc_chars = fromqstr(spellmod->escapeCharactersED->text());
199         rc.isp_use_esc_chars = !rc.isp_esc_chars.empty();
200         // FIXME: remove isp_use_pers_dict
201         rc.isp_pers_dict = fromqstr(spellmod->persDictionaryED->text());
202         rc.isp_use_pers_dict = !rc.isp_pers_dict.empty();
203         rc.isp_accept_compound = spellmod->compoundWordCB->isChecked();
204         rc.isp_use_input_encoding = spellmod->inputEncodingCB->isChecked();
205
206
207         QPrefPrinterModule * printmod(dialog_->printerModule);
208
209         rc.print_adapt_output = printmod->printerAdaptCB->isChecked();
210         rc.print_command = fromqstr(printmod->printerCommandED->text());
211         rc.printer = fromqstr(printmod->printerNameED->text());
212
213         rc.print_pagerange_flag = fromqstr(printmod->printerPageRangeED->text());
214         rc.print_copies_flag = fromqstr(printmod->printerCopiesED->text());
215         rc.print_reverse_flag = fromqstr(printmod->printerReverseED->text());
216         rc.print_to_printer = fromqstr(printmod->printerToPrinterED->text());
217         rc.print_file_extension = fromqstr(printmod->printerExtensionED->text());
218         rc.print_file_extension = fromqstr(printmod->printerSpoolCommandED->text());
219         rc.print_paper_flag = fromqstr(printmod->printerPaperTypeED->text());
220         rc.print_evenpage_flag = fromqstr(printmod->printerEvenED->text());
221         rc.print_oddpage_flag = fromqstr(printmod->printerOddED->text());
222         rc.print_collcopies_flag = fromqstr(printmod->printerCollatedED->text());
223         rc.print_landscape_flag = fromqstr(printmod->printerLandscapeED->text());
224         rc.print_to_file = fromqstr(printmod->printerToFileED->text());
225         rc.print_extra_options = fromqstr(printmod->printerExtraED->text());
226         rc.print_spool_printerprefix = fromqstr(printmod->printerSpoolPrefixED->text());
227         rc.print_paper_dimension_flag = fromqstr(printmod->printerPaperSizeED->text());
228
229
230         QPrefIdentityModule * idmod(dialog_->identityModule);
231         rc.user_name = fromqstr(idmod->nameED->text());
232         rc.user_email = fromqstr(idmod->emailED->text());
233
234         QPrefScreenFontsModule * fontmod(dialog_->screenfontsModule);
235
236         LyXRC const oldrc(rc);
237
238         boost::tie(rc.roman_font_name, rc.roman_font_foundry)
239                 = parseFontName(fromqstr(fontmod->screenRomanCO->currentText()));
240         boost::tie(rc.sans_font_name, rc.sans_font_foundry) =
241                 parseFontName(fromqstr(fontmod->screenSansCO->currentText()));
242         boost::tie(rc.typewriter_font_name, rc.typewriter_font_foundry) =
243                 parseFontName(fromqstr(fontmod->screenTypewriterCO->currentText()));
244
245         rc.zoom = fontmod->screenZoomSB->value();
246         rc.dpi = fontmod->screenDpiSB->value();
247         rc.font_sizes[LyXFont::SIZE_TINY] = strToDbl(fromqstr(fontmod->screenTinyED->text()));
248         rc.font_sizes[LyXFont::SIZE_SCRIPT] = strToDbl(fromqstr(fontmod->screenSmallestED->text()));
249         rc.font_sizes[LyXFont::SIZE_FOOTNOTE] = strToDbl(fromqstr(fontmod->screenSmallerED->text()));
250         rc.font_sizes[LyXFont::SIZE_SMALL] = strToDbl(fromqstr(fontmod->screenSmallED->text()));
251         rc.font_sizes[LyXFont::SIZE_NORMAL] = strToDbl(fromqstr(fontmod->screenNormalED->text()));
252         rc.font_sizes[LyXFont::SIZE_LARGE] = strToDbl(fromqstr(fontmod->screenLargeED->text()));
253         rc.font_sizes[LyXFont::SIZE_LARGER] = strToDbl(fromqstr(fontmod->screenLargerED->text()));
254         rc.font_sizes[LyXFont::SIZE_LARGEST] = strToDbl(fromqstr(fontmod->screenLargestED->text()));
255         rc.font_sizes[LyXFont::SIZE_HUGE] = strToDbl(fromqstr(fontmod->screenHugeED->text()));
256         rc.font_sizes[LyXFont::SIZE_HUGER] = strToDbl(fromqstr(fontmod->screenHugerED->text()));
257
258         if (rc.font_sizes != oldrc.font_sizes
259                 || rc.roman_font_name != oldrc.roman_font_name
260                 || rc.sans_font_name != oldrc.sans_font_name
261                 || rc.typewriter_font_name != oldrc.typewriter_font_name
262                 || rc.zoom != oldrc.zoom || rc.dpi != oldrc.dpi) {
263                 controller().updateScreenFonts();
264         }
265
266         controller().setFormats(formats_);
267         controller().setConverters(converters_);
268
269         QPrefColorsModule * colmod(dialog_->colorsModule);
270
271         unsigned int i;
272
273         for (i = 0; i < colmod->lyxObjectsLB->count(); ++i) {
274                 QListBoxItem * ib(colmod->lyxObjectsLB->item(i));
275                 QColorItem * ci(static_cast<QColorItem*>(ib));
276
277                 ostringstream ostr;
278
279                 ostr << '#' << std::setbase(16) << setfill('0')
280                         << setw(2) << ci->color().red()
281                         << setw(2) << ci->color().green()
282                         << setw(2) << ci->color().blue();
283
284                 string newhex(STRCONV(ostr.str()));
285
286                 LColor::color col(dialog_->colors_[i]);
287
288                 // FIXME: dubious, but it's what xforms does
289                 if (lcolor.getX11Name(col) != newhex) {
290                         controller().setColor(col, newhex);
291                 }
292         }
293 }
294
295
296 // FIXME: move to helper_funcs.h
297 namespace {
298
299 template<class A>
300 typename std::vector<A>::size_type
301 findPos(std::vector<A> const & vec, A const & val)
302 {
303         typename std::vector<A>::const_iterator it =
304                 std::find(vec.begin(), vec.end(), val);
305         if (it == vec.end())
306                 return 0;
307         return std::distance(vec.begin(), it);
308 }
309
310 void setComboxFont(QComboBox * cb, string const & family,
311                 string const & foundry, QFont::StyleHint hint)
312 {
313         string const name = makeFontName(family, foundry);
314         for (int i = 0; i < cb->count(); ++i) {
315                 if (fromqstr(cb->text(i)) == name) {
316                         cb->setCurrentItem(i);
317                         return;
318                 }
319         }
320
321         // Try matching without foundary name
322
323         // We count in reverse in order to prefer the Xft foundry
324         for (int i = cb->count() - 1; i >= 0; --i) {
325                 pair<string, string> tmp = parseFontName(fromqstr(cb->text(i)));
326                 if (compare_no_case(tmp.first, family) == 0) {
327                         cb->setCurrentItem(i);
328                         return;
329                 }
330         }
331
332         // Try the hint
333         QFont font;
334         font.setStyleHint(hint);
335         QFontInfo fi(font);
336
337         for (int i = cb->count() - 1; i >= 0; --i) {
338                 if (cb->text(i) == fi.family()) {
339                         cb->setCurrentItem(i);
340                         return;
341                 }
342         }
343 }
344
345 }
346
347 void QPrefs::update_contents()
348 {
349         LyXRC const & rc(controller().rc());
350
351         QPrefLanguageModule * langmod(dialog_->languageModule);
352
353         // FIXME: remove rtl_support bool
354         langmod->rtlCB->setChecked(rc.rtl_support);
355         langmod->markForeignCB->setChecked(rc.mark_foreign_language);
356         langmod->autoBeginCB->setChecked(rc.language_auto_begin);
357         langmod->autoEndCB->setChecked(rc.language_auto_end);
358         langmod->useBabelCB->setChecked(rc.language_use_babel);
359         langmod->globalCB->setChecked(rc.language_global_options);
360         langmod->languagePackageED->setText(toqstr(rc.language_package));
361         langmod->startCommandED->setText(toqstr(rc.language_command_begin));
362         langmod->endCommandED->setText(toqstr(rc.language_command_end));
363
364         int const pos = int(findPos(lang_, rc.default_language));
365         langmod->defaultLanguageCO->setCurrentItem(pos);
366
367         QPrefUIModule * uimod(dialog_->uiModule);
368
369         uimod->uiFileED->setText(toqstr(rc.ui_file));
370         uimod->bindFileED->setText(toqstr(rc.bind_file));
371         uimod->cursorFollowsCB->setChecked(rc.cursor_follows_scrollbar);
372         uimod->wheelMouseSB->setValue(rc.wheel_jump);
373         // convert to minutes
374         int mins(rc.autosave / 60);
375         if (rc.autosave && !mins)
376                 mins = 1;
377         uimod->autoSaveSB->setValue(mins);
378         uimod->autoSaveCB->setChecked(rc.make_backup);
379         uimod->lastfilesSB->setValue(rc.num_lastfiles);
380
381
382         QPrefIdentityModule * idmod(dialog_->identityModule);
383         idmod->nameED->setText(toqstr(rc.user_name));
384         idmod->emailED->setText(toqstr(rc.user_email));
385         
386
387         QPrefKeyboardModule * keymod(dialog_->keyboardModule);
388
389         // FIXME: can derive CB from the two EDs
390         keymod->keymapCB->setChecked(rc.use_kbmap);
391         // no idea why we need these. Fscking Qt.
392         keymod->firstKeymapED->setEnabled(rc.use_kbmap);
393         keymod->firstKeymapPB->setEnabled(rc.use_kbmap);
394         keymod->firstKeymapLA->setEnabled(rc.use_kbmap);
395         keymod->secondKeymapED->setEnabled(rc.use_kbmap);
396         keymod->secondKeymapPB->setEnabled(rc.use_kbmap);
397         keymod->secondKeymapLA->setEnabled(rc.use_kbmap);
398         keymod->firstKeymapED->setText(toqstr(rc.primary_kbmap));
399         keymod->secondKeymapED->setText(toqstr(rc.secondary_kbmap));
400
401
402         QPrefAsciiModule * ascmod(dialog_->asciiModule);
403
404         ascmod->asciiLinelengthSB->setValue(rc.ascii_linelen);
405         ascmod->asciiRoffED->setText(toqstr(rc.ascii_roff_command));
406
407
408         QPrefDateModule * datemod(dialog_->dateModule);
409
410         datemod->DateED->setText(toqstr(rc.date_insert_format));
411
412
413         QPrefLatexModule * latexmod(dialog_->latexModule);
414
415         latexmod->latexEncodingED->setText(toqstr(rc.fontenc));
416         latexmod->latexChecktexED->setText(toqstr(rc.chktex_command));
417         latexmod->latexAutoresetCB->setChecked(rc.auto_reset_options);
418         latexmod->latexDviPaperED->setText(toqstr(rc.view_dvi_paper_option));
419         latexmod->latexPaperSizeCO->setCurrentItem(rc.default_papersize);
420
421
422         QPrefDisplayModule * displaymod(dialog_->displayModule);
423
424         displaymod->previewCB->setChecked(rc.preview);
425
426         int item = 2;
427
428         switch (rc.display_graphics) {
429                 case grfx::NoDisplay:           item = 3; break;
430                 case grfx::ColorDisplay:        item = 2; break;
431                 case grfx::GrayscaleDisplay:    item = 1; break;
432                 case grfx::MonochromeDisplay:   item = 0; break;
433                 default: break;
434         }
435         displaymod->displayGraphicsCO->setCurrentItem(item);
436
437
438         QPrefPathsModule * pathsmod(dialog_->pathsModule);
439
440         pathsmod->workingDirED->setText(toqstr(rc.document_path));
441         pathsmod->templateDirED->setText(toqstr(rc.template_path));
442         pathsmod->backupDirED->setText(toqstr(rc.backupdir_path));
443         pathsmod->tempDirCB->setChecked(rc.use_tempdir);
444         pathsmod->tempDirED->setText(toqstr(rc.tempdir_path));
445         // FIXME: should be a checkbox only
446         pathsmod->lyxserverDirED->setText(toqstr(rc.lyxpipes));
447
448
449         QPrefSpellcheckerModule * spellmod(dialog_->spellcheckerModule);
450
451         item = (rc.isp_command == "ispell") ? 0 : 1;
452         spellmod->spellCommandCO->setCurrentItem(item);
453         // FIXME: remove isp_use_alt_lang
454         spellmod->altLanguageED->setText(toqstr(rc.isp_alt_lang));
455         // FIXME: remove isp_use_esc_chars
456         spellmod->escapeCharactersED->setText(toqstr(rc.isp_esc_chars));
457         // FIXME: remove isp_use_pers_dict
458         spellmod->persDictionaryED->setText(toqstr(rc.isp_pers_dict));
459         spellmod->compoundWordCB->setChecked(rc.isp_accept_compound);
460         spellmod->inputEncodingCB->setChecked(rc.isp_use_input_encoding);
461
462
463         QPrefPrinterModule * printmod(dialog_->printerModule);
464
465         printmod->printerAdaptCB->setChecked(rc.print_adapt_output);
466         printmod->printerCommandED->setText(toqstr(rc.print_command));
467         printmod->printerNameED->setText(toqstr(rc.printer));
468
469         printmod->printerPageRangeED->setText(toqstr(rc.print_pagerange_flag));
470         printmod->printerCopiesED->setText(toqstr(rc.print_copies_flag));
471         printmod->printerReverseED->setText(toqstr(rc.print_reverse_flag));
472         printmod->printerToPrinterED->setText(toqstr(rc.print_to_printer));
473         printmod->printerExtensionED->setText(toqstr(rc.print_file_extension));
474         printmod->printerSpoolCommandED->setText(toqstr(rc.print_file_extension));
475         printmod->printerPaperTypeED->setText(toqstr(rc.print_paper_flag));
476         printmod->printerEvenED->setText(toqstr(rc.print_evenpage_flag));
477         printmod->printerOddED->setText(toqstr(rc.print_oddpage_flag));
478         printmod->printerCollatedED->setText(toqstr(rc.print_collcopies_flag));
479         printmod->printerLandscapeED->setText(toqstr(rc.print_landscape_flag));
480         printmod->printerToFileED->setText(toqstr(rc.print_to_file));
481         printmod->printerExtraED->setText(toqstr(rc.print_extra_options));
482         printmod->printerSpoolPrefixED->setText(toqstr(rc.print_spool_printerprefix));
483         printmod->printerPaperSizeED->setText(toqstr(rc.print_paper_dimension_flag));
484
485
486         QPrefScreenFontsModule * fontmod(dialog_->screenfontsModule);
487
488         setComboxFont(fontmod->screenRomanCO, rc.roman_font_name,
489                         rc.roman_font_foundry, QFont::Serif);
490         setComboxFont(fontmod->screenSansCO, rc.sans_font_name,
491                         rc.sans_font_foundry, QFont::SansSerif);
492         setComboxFont(fontmod->screenTypewriterCO, rc.typewriter_font_name,
493                         rc.typewriter_font_foundry, QFont::TypeWriter);
494
495         dialog_->select_roman(fontmod->screenRomanCO->currentText());
496         dialog_->select_sans(fontmod->screenSansCO->currentText());
497         dialog_->select_typewriter(fontmod->screenTypewriterCO->currentText());
498
499         fontmod->screenZoomSB->setValue(rc.zoom);
500         fontmod->screenDpiSB->setValue(int(rc.dpi));
501         fontmod->screenTinyED->setText(toqstr(tostr(rc.font_sizes[LyXFont::SIZE_TINY])));
502         fontmod->screenSmallestED->setText(toqstr(tostr(rc.font_sizes[LyXFont::SIZE_SCRIPT])));
503         fontmod->screenSmallerED->setText(toqstr(tostr(rc.font_sizes[LyXFont::SIZE_FOOTNOTE])));
504         fontmod->screenSmallED->setText(toqstr(tostr(rc.font_sizes[LyXFont::SIZE_SMALL])));
505         fontmod->screenNormalED->setText(toqstr(tostr(rc.font_sizes[LyXFont::SIZE_NORMAL])));
506         fontmod->screenLargeED->setText(toqstr(tostr(rc.font_sizes[LyXFont::SIZE_LARGE])));
507         fontmod->screenLargerED->setText(toqstr(tostr(rc.font_sizes[LyXFont::SIZE_LARGER])));
508         fontmod->screenLargestED->setText(toqstr(tostr(rc.font_sizes[LyXFont::SIZE_LARGEST])));
509         fontmod->screenHugeED->setText(toqstr(tostr(rc.font_sizes[LyXFont::SIZE_HUGE])));
510         fontmod->screenHugerED->setText(toqstr(tostr(rc.font_sizes[LyXFont::SIZE_HUGER])));
511
512         formats_ = formats;
513
514         dialog_->updateFormats();
515
516         converters_ = converters;
517
518         dialog_->updateConverters();
519 }