]> git.lyx.org Git - features.git/blob - src/frontends/qt2/QDocumentDialog.C
Fix bug 886 and others not reported related with the document paper size.
[features.git] / src / frontends / qt2 / QDocumentDialog.C
1 /**
2  * \file QDocumentDialog.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Edwin Leuven
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "QDocument.h"
14 #include "QDocumentDialog.h"
15
16 #include "floatplacement.h"
17 #include "lengthcombo.h"
18 #include "validators.h"
19 #include "panelstack.h"
20 #include "qt_helpers.h"
21
22 #include "bufferparams.h"
23 #include "gettext.h"
24 #include "lyxrc.h"
25
26 #include "controllers/ControlDocument.h"
27
28 #include "support/lstrings.h"
29
30 #include <qlabel.h>
31 #include <qmultilineedit.h>
32 #include <qlineedit.h>
33 #include <qlistview.h>
34 #include <qpushbutton.h>
35 #include <qradiobutton.h>
36 #include <qcheckbox.h>
37 #include <qslider.h>
38 #include <qpixmap.h>
39 #include <qcolor.h>
40 #include <qcolordialog.h>
41 #include <qvalidator.h>
42
43 using lyx::support::token;
44
45 using std::string;
46
47 namespace lyx {
48 namespace frontend {
49
50
51 QDocumentDialog::QDocumentDialog(QDocument * form)
52         : QDocumentDialogBase(0, 0, false, 0), form_(form)
53 {
54         connect(okPB, SIGNAL(clicked()),
55                 form, SLOT(slotOK()));
56         connect(applyPB, SIGNAL(clicked()),
57                 form, SLOT(slotApply()));
58         connect(closePB, SIGNAL(clicked()),
59                 form, SLOT(slotClose()));
60         connect(restorePB, SIGNAL(clicked()),
61                 form, SLOT(slotRestore()));
62
63         textLayoutModule = new TextLayoutModuleBase(this);
64         pageLayoutModule = new PageLayoutModuleBase(this);
65         marginsModule = new MarginsModuleBase(this);
66         langModule = new LanguageModuleBase(this);
67         bulletsModule = new BulletsModule(this);
68         numberingModule = new NumberingModuleBase(this);
69         biblioModule = new BiblioModuleBase(this);
70         mathsModule = new MathsModuleBase(this);
71         floatModule = new FloatPlacement(this, "floatplacement");
72         latexModule = new LaTeXModuleBase(this);
73         branchesModule = new BranchesModuleBase(this);
74         preambleModule = new PreambleModuleBase(this);
75
76         docPS->addPanel(latexModule, _("Document Class"));
77         docPS->addPanel(textLayoutModule, _("Text Layout"));
78         docPS->addPanel(pageLayoutModule, _("Page Layout"));
79         docPS->addPanel(marginsModule, _("Page Margins"));
80         docPS->addPanel(langModule, _("Language"));
81         docPS->addPanel(numberingModule, _("Numbering & TOC"));
82         docPS->addPanel(biblioModule, _("Bibliography"));
83         docPS->addPanel(mathsModule, _("Math Options"));
84         docPS->addPanel(floatModule, _("Float Placement"));
85         docPS->addPanel(bulletsModule, _("Bullets"));
86         docPS->addPanel(branchesModule, _("Branches"));
87         docPS->addPanel(preambleModule, _("LaTeX Preamble"));
88         docPS->setCurrentPanel(_("Document Class"));
89
90         // preamble
91         connect(preambleModule->preambleMLE, SIGNAL(textChanged()), this, SLOT(change_adaptor()));
92         // biblio
93         connect(biblioModule->citeDefaultRB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
94         connect(biblioModule->citeNatbibRB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
95         connect(biblioModule->citeStyleCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
96         connect(biblioModule->citeJurabibRB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
97         connect(biblioModule->bibtopicCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
98         // language & quote
99         connect(langModule->languageCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
100         connect(langModule->defaultencodingCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
101         connect(langModule->encodingCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
102         connect(langModule->quoteStyleCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
103         // numbering
104         connect(numberingModule->depthSL, SIGNAL(valueChanged(int)), this, SLOT(change_adaptor()));
105         connect(numberingModule->tocSL, SIGNAL(valueChanged(int)), this, SLOT(change_adaptor()));
106         connect(numberingModule->depthSL, SIGNAL(valueChanged(int)), this, SLOT(updateNumbering()));
107         connect(numberingModule->tocSL, SIGNAL(valueChanged(int)), this, SLOT(updateNumbering()));
108         numberingModule->tocLV->setSorting(-1);
109         // maths
110         connect(mathsModule->amsCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
111         connect(mathsModule->amsautoCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
112         // float
113         connect(floatModule, SIGNAL(changed()), this, SLOT(change_adaptor()));
114         // latex class
115         connect(latexModule->classCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
116         connect(latexModule->optionsLE, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
117         connect(latexModule->psdriverCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
118         connect(latexModule->classCO, SIGNAL(activated(int)), this, SLOT(classChanged()));
119         // text layout
120         connect(textLayoutModule->fontsCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
121         connect(textLayoutModule->fontsizeCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
122         connect(textLayoutModule->lspacingCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
123         connect(textLayoutModule->lspacingCO, SIGNAL(activated(int)), this, SLOT(setLSpacing(int)));
124         connect(textLayoutModule->lspacingLE, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
125         connect(textLayoutModule->skipRB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
126         connect(textLayoutModule->indentRB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
127         connect(textLayoutModule->skipCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
128         connect(textLayoutModule->skipLE, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
129         connect(textLayoutModule->skipLengthCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
130         connect(textLayoutModule->skipCO, SIGNAL(activated(int)), this, SLOT(setSkip(int)));
131         connect(textLayoutModule->skipRB, SIGNAL(toggled(bool)), this, SLOT(enableSkip(bool)));
132         connect(textLayoutModule->twoColumnCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
133
134         // margins
135         connect(marginsModule->marginCO, SIGNAL(activated(int)), this, SLOT(setCustomMargins(int)));
136         connect(marginsModule->marginCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
137         connect(marginsModule->topLE, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
138         connect(marginsModule->topUnit, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
139         connect(marginsModule->bottomLE, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
140         connect(marginsModule->bottomUnit, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
141         connect(marginsModule->innerLE, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
142         connect(marginsModule->innerUnit, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
143         connect(marginsModule->outerLE, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
144         connect(marginsModule->outerUnit, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
145         connect(marginsModule->headheightLE, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
146         connect(marginsModule->headheightUnit, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
147         connect(marginsModule->headsepLE, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
148         connect(marginsModule->headsepUnit, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
149         connect(marginsModule->footskipLE, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
150         connect(marginsModule->footskipUnit, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
151
152         // page layout
153         connect(pageLayoutModule->papersizeCO, SIGNAL(activated(int)), this, SLOT(setMargins(int)));
154         connect(pageLayoutModule->papersizeCO, SIGNAL(activated(int)), this, SLOT(setCustomPapersize(int)));
155         connect(pageLayoutModule->papersizeCO, SIGNAL(activated(int)), this, SLOT(setCustomPapersize(int)));
156         connect(pageLayoutModule->portraitRB, SIGNAL(toggled(bool)), this, SLOT(portraitChanged()));
157         connect(pageLayoutModule->papersizeCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
158         connect(pageLayoutModule->paperheightLE, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
159         connect(pageLayoutModule->paperwidthLE, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
160         connect(pageLayoutModule->paperwidthUnitCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
161         connect(pageLayoutModule->paperheightUnitCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
162         connect(pageLayoutModule->portraitRB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
163         connect(pageLayoutModule->landscapeRB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
164         connect(pageLayoutModule->facingPagesCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
165         connect(pageLayoutModule->pagestyleCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
166
167         // bullets
168         connect(bulletsModule, SIGNAL(changed()), this, SLOT(change_adaptor()));
169
170         // branches
171         connect(branchesModule->addBranchPB, SIGNAL(pressed()), this, SLOT(addBranchPressed()));
172         connect(branchesModule->removePB, SIGNAL(pressed()), this, SLOT(deleteBranchPressed()));
173         connect(branchesModule->activatePB, SIGNAL(pressed()), this, SLOT(toggleBranchPressed()));
174         connect(branchesModule->branchesLV, SIGNAL(doubleClicked(QListViewItem *)), this,
175                 SLOT(branchDoubleClicked(QListViewItem *)));
176         connect(branchesModule->colorPB, SIGNAL(clicked()), this, SLOT(toggleBranchColor()));
177         branchesModule->branchesLV->setSorting(0);
178
179         textLayoutModule->lspacingLE->setValidator(new QDoubleValidator(
180                 textLayoutModule->lspacingLE));
181
182         textLayoutModule->skipLE->setValidator(unsignedLengthValidator(
183                 textLayoutModule->skipLE));
184         pageLayoutModule->paperheightLE->setValidator(unsignedLengthValidator(
185                 pageLayoutModule->paperheightLE));
186         pageLayoutModule->paperwidthLE->setValidator(unsignedLengthValidator(
187                 pageLayoutModule->paperwidthLE));
188         marginsModule->topLE->setValidator(unsignedLengthValidator(
189                 marginsModule->topLE));
190         marginsModule->bottomLE->setValidator(unsignedLengthValidator(
191                 marginsModule->bottomLE));
192         marginsModule->innerLE->setValidator(unsignedLengthValidator(
193                 marginsModule->innerLE));
194         marginsModule->outerLE->setValidator(unsignedLengthValidator(
195                 marginsModule->outerLE));
196         marginsModule->headsepLE->setValidator(unsignedLengthValidator(
197                 marginsModule->headsepLE));
198         marginsModule->headheightLE->setValidator(unsignedLengthValidator(
199                 marginsModule->headheightLE));
200         marginsModule->footskipLE->setValidator(unsignedLengthValidator(
201                 marginsModule->footskipLE));
202 }
203
204
205 QDocumentDialog::~QDocumentDialog()
206 {
207 }
208
209
210 void QDocumentDialog::showPreamble()
211 {
212         docPS->setCurrentPanel(_("LaTeX Preamble"));
213 }
214
215
216 void QDocumentDialog::saveDefaultClicked()
217 {
218         form_->saveDocDefault();
219 }
220
221
222 void QDocumentDialog::useDefaultsClicked()
223 {
224         form_->useClassDefaults();
225 }
226
227
228 void QDocumentDialog::change_adaptor()
229 {
230         form_->changed();
231 }
232
233
234 void QDocumentDialog::closeEvent(QCloseEvent * e)
235 {
236         form_->slotWMHide();
237         e->accept();
238 }
239
240
241 void QDocumentDialog::setLSpacing(int item)
242 {
243         textLayoutModule->lspacingLE->setEnabled(item == 3);
244 }
245
246
247 void QDocumentDialog::setSkip(int item)
248 {
249         bool const enable = (item == 3);
250         textLayoutModule->skipLE->setEnabled(enable);
251         textLayoutModule->skipLengthCO->setEnabled(enable);
252 }
253
254
255 void QDocumentDialog::enableSkip(bool skip)
256 {
257         textLayoutModule->skipCO->setEnabled(skip);
258         textLayoutModule->skipLE->setEnabled(skip);
259         textLayoutModule->skipLengthCO->setEnabled(skip);
260         if (skip)
261                 setSkip(textLayoutModule->skipCO->currentItem());
262 }
263
264 void QDocumentDialog::portraitChanged()
265 {
266         setMargins(pageLayoutModule->papersizeCO->currentItem());
267 }
268
269 void QDocumentDialog::setMargins(int papersize)
270 {
271         int olditem = marginsModule->marginCO->currentItem();
272         marginsModule->marginCO->clear();
273         marginsModule->marginCO->insertItem(qt_("Default"));
274         marginsModule->marginCO->insertItem(qt_("Custom"));
275         bool a4size = (papersize == 6 || papersize == 0
276                         && lyxrc.default_papersize == PAPER_A4);
277         if (a4size && pageLayoutModule->portraitRB->isChecked()) {
278                 marginsModule->marginCO->insertItem(qt_("Small margins"));
279                 marginsModule->marginCO->insertItem(qt_("Very small margins"));
280                 marginsModule->marginCO->insertItem(qt_("Very wide margins"));
281         } else if (olditem > 1) {
282                 olditem = 0;
283         }
284         marginsModule->marginCO->setCurrentItem(olditem);
285         setCustomMargins(olditem);
286 }
287
288
289 void QDocumentDialog::setCustomPapersize(int papersize)
290 {
291         bool const custom = (papersize == 1);
292
293         pageLayoutModule->paperwidthL->setEnabled(custom);
294         pageLayoutModule->paperwidthLE->setEnabled(custom);
295         pageLayoutModule->paperwidthUnitCO->setEnabled(custom);
296         pageLayoutModule->paperheightL->setEnabled(custom);
297         pageLayoutModule->paperheightLE->setEnabled(custom);
298         pageLayoutModule->paperheightLE->setFocus();
299         pageLayoutModule->paperheightUnitCO->setEnabled(custom);
300 }
301
302
303 void QDocumentDialog::setCustomMargins(int margin)
304 {
305         bool const custom = (margin == 1);
306
307         marginsModule->topL->setEnabled(custom);
308         marginsModule->topLE->setEnabled(custom);
309         marginsModule->topUnit->setEnabled(custom);
310
311         marginsModule->bottomL->setEnabled(custom);
312         marginsModule->bottomLE->setEnabled(custom);
313         marginsModule->bottomUnit->setEnabled(custom);
314
315         marginsModule->innerL->setEnabled(custom);
316         marginsModule->innerLE->setEnabled(custom);
317         marginsModule->innerUnit->setEnabled(custom);
318
319         marginsModule->outerL->setEnabled(custom);
320         marginsModule->outerLE->setEnabled(custom);
321         marginsModule->outerUnit->setEnabled(custom);
322
323         marginsModule->headheightL->setEnabled(custom);
324         marginsModule->headheightLE->setEnabled(custom);
325         marginsModule->headheightUnit->setEnabled(custom);
326
327         marginsModule->headsepL->setEnabled(custom);
328         marginsModule->headsepLE->setEnabled(custom);
329         marginsModule->headsepUnit->setEnabled(custom);
330
331         marginsModule->footskipL->setEnabled(custom);
332         marginsModule->footskipLE->setEnabled(custom);
333         marginsModule->footskipUnit->setEnabled(custom);
334 }
335
336
337 void QDocumentDialog::updateFontsize(string const & items, string const & sel)
338 {
339         textLayoutModule->fontsizeCO->clear();
340         textLayoutModule->fontsizeCO->insertItem("default");
341
342         for (int n = 0; !token(items,'|',n).empty(); ++n)
343                 textLayoutModule->fontsizeCO->
344                         insertItem(toqstr(token(items,'|',n)));
345
346         for (int n = 0; n<textLayoutModule->fontsizeCO->count(); ++n) {
347                 if (fromqstr(textLayoutModule->fontsizeCO->text(n)) == sel) {
348                         textLayoutModule->fontsizeCO->setCurrentItem(n);
349                         break;
350                 }
351         }
352 }
353
354
355 void QDocumentDialog::updatePagestyle(string const & items, string const & sel)
356 {
357         pageLayoutModule->pagestyleCO->clear();
358         pageLayoutModule->pagestyleCO->insertItem("default");
359
360         for (int n=0; !token(items,'|',n).empty(); ++n)
361                 pageLayoutModule->pagestyleCO->
362                         insertItem(toqstr(token(items,'|',n)));
363
364         for (int n = 0; n<pageLayoutModule->pagestyleCO->count(); ++n) {
365                 if (fromqstr(pageLayoutModule->pagestyleCO->text(n))==sel) {
366                         pageLayoutModule->pagestyleCO->setCurrentItem(n);
367                         break;
368                 }
369         }
370 }
371
372
373 void QDocumentDialog::classChanged()
374 {
375         ControlDocument & cntrl = form_->controller();
376         BufferParams & params = cntrl.params();
377
378         lyx::textclass_type const tc = latexModule->classCO->currentItem();
379
380         if (form_->controller().loadTextclass(tc)) {
381                 params.textclass = tc;
382                 if (lyxrc.auto_reset_options)
383                         params.useClassDefaults();
384                 form_->update_contents();
385         } else {
386                 latexModule->classCO->setCurrentItem(params.textclass);
387         }
388 }
389
390
391 void QDocumentDialog::updateNumbering()
392 {
393         LyXTextClass const & tclass =
394                 form_->controller().params().getLyXTextClass();
395
396         //numberingModule->tocLV->setUpdatesEnabled(false);
397
398         // Update the example QListView
399         int const depth = numberingModule->depthSL->value();
400         int const toc = numberingModule->tocSL->value();
401         QString const no = qt_("No");
402         QString const yes = qt_("Yes");
403         LyXTextClass::const_iterator end = tclass.end();
404         LyXTextClass::const_iterator cit = tclass.begin();
405         numberingModule->tocLV->clear();
406         QListViewItem * item = 0;
407         for ( ; cit != end ; ++cit) {
408                 int const toclevel = (*cit)->toclevel;
409                 if (toclevel != LyXLayout::NOT_IN_TOC) {
410                         item = new QListViewItem(numberingModule->tocLV,
411                                                  item, qt_((*cit)->name()));
412                         item->setText(1, (toclevel <= depth) ? yes : no);
413                         item->setText(2, (toclevel <= toc) ? yes : no);
414                 }
415         }
416
417         //numberingModule->tocLV->setUpdatesEnabled(true);
418         //numberingModule->tocLV->update();
419 }
420
421
422 void QDocumentDialog::updateBranchView()
423 {
424         // store the selected branch
425         QListViewItem * selItem =
426                 branchesModule->branchesLV->selectedItem();
427         QString sel_branch;
428         if (selItem != 0)
429                 sel_branch = selItem->text(0);
430
431         branchesModule->branchesLV->clear();
432
433         BranchList::const_iterator it = form_->branchlist_.begin();
434         BranchList::const_iterator const end = form_->branchlist_.end();
435         for (; it != end; ++it) {
436                 QString const bname = toqstr(it->getBranch());
437                 QString const sel = it->getSelected() ? qt_("Yes") : qt_("No");
438                 QListViewItem * newItem =
439                         new QListViewItem(branchesModule->branchesLV, bname, sel);
440                 string const x11hexname = it->getColor();
441                 QColor itemcolor;
442                 if (x11hexname[0] == '#')
443                         itemcolor.setNamedColor(toqstr(x11hexname));
444                 if (itemcolor.isValid()) {
445                         QPixmap coloritem(30, 10);
446                         coloritem.fill(itemcolor);
447                         newItem->setPixmap(2, coloritem);
448                 }
449                 // restore selected branch
450                 if (bname == sel_branch)
451                         branchesModule->branchesLV->setSelected(newItem, true);
452         }
453         form_->changed();
454 }
455
456
457 void QDocumentDialog::addBranchPressed()
458 {
459         QString const new_branch = branchesModule->newBranchLE->text();
460         if (!new_branch.isEmpty()) {
461                 form_->branchlist_.add(fromqstr(new_branch));
462                 branchesModule->newBranchLE->clear();
463                 updateBranchView();
464         }
465 }
466
467
468 void QDocumentDialog::deleteBranchPressed()
469 {
470         QListViewItem * selItem =
471                 branchesModule->branchesLV->selectedItem();
472         QString sel_branch;
473         if (selItem != 0)
474                 sel_branch = selItem->text(0);
475         if (sel_branch) {
476                 form_->branchlist_.remove(fromqstr(sel_branch));
477                 branchesModule->newBranchLE->clear();
478                 updateBranchView();
479         }
480 }
481
482
483 void QDocumentDialog::toggleBranchPressed()
484 {
485         QListViewItem * selItem =
486                 branchesModule->branchesLV->selectedItem();
487         toggleBranch(selItem);
488 }
489
490
491 void QDocumentDialog::branchDoubleClicked(QListViewItem * selItem)
492 {
493         toggleBranch(selItem);
494 }
495
496
497 void QDocumentDialog::toggleBranch(QListViewItem * selItem)
498 {
499         if (selItem == 0)
500                 return;
501
502         QString sel_branch = selItem->text(0);
503         if (sel_branch) {
504                 bool const selected = selItem->text(1) == qt_("Yes");
505                 Branch * branch = form_->branchlist_.find(fromqstr(sel_branch));
506                 if (branch && branch->setSelected(!selected)) {
507                         branchesModule->newBranchLE->clear();
508                         updateBranchView();
509                 }
510         }
511 }
512
513
514 void QDocumentDialog::toggleBranchColor()
515 {
516         QListViewItem * selItem =
517                 branchesModule->branchesLV->selectedItem();
518         QString sel_branch;
519         if (selItem != 0)
520                 sel_branch = selItem->text(0);
521         if (sel_branch) {
522                 QColor initial;
523                 string current_branch = fromqstr(sel_branch);
524                 Branch * branch =
525                         form_->branchlist_.find(current_branch);
526                 if (!branch)
527                         return;
528
529                 string x11hexname = branch->getColor();
530                 if (x11hexname[0] == '#')
531                         initial.setNamedColor(toqstr(x11hexname));
532                 QColor ncol(QColorDialog::getColor(initial, qApp->focusWidget() ? qApp->focusWidget() : qApp->mainWidget()));
533                 if (ncol.isValid()){
534                         // add the color to the branchlist
535                         branch->setColor(fromqstr(ncol.name()));
536                         branchesModule->newBranchLE->clear();
537                         updateBranchView();
538                 }
539         }
540 }
541
542 } // namespace frontend
543 } // namespace lyx