dialog_->langModule->quoteStyleCO->insertItem(_("»text«"));
// packages
- char const * items[] = {"default","auto","latin1","latin2",
- "latin3","latin4","latin5","latin9",
- "koi8-r","koi8-u","cp866","cp1251",
- "iso88595","pt154",0};
+ char const * items[] = {"default", "auto", "latin1", "latin2",
+ "latin3", "latin4", "latin5", "latin9",
+ "koi8-r", "koi8-u", "cp866", "cp1251",
+ "iso88595", "pt154", 0};
dialog_->packagesModule->encodingCO->insertStrList(items);
dialog_->packagesModule->lspacingCO->insertItem(
}
// paper
- QStringList papersize_;
- papersize_ << _("Default") << _("Custom") << _("US letter") << _("US legal")
- << _("US executive") << _("A3") << _("A4") << _("A5")
- << _("B3") << _("B4") << _("B5");
- dialog_->paperModule->papersizeCO->insertStringList(papersize_);
+ char const * sizes[] = {
+ _("Default") , _("Custom") , _("US letter") , _("US legal")
+ , _("US executive") , _("A3") , _("A4") , _("A5")
+ , _("B3") , _("B4") , _("B5"), 0 };
+ dialog_->paperModule->papersizeCO->insertStrList(sizes);
// layout
for (LyXTextClassList::const_iterator cit = textclasslist.begin();
// Manage the restore, ok, apply, restore and cancel/close buttons
bc().setOK(dialog_->okPB);
bc().setApply(dialog_->applyPB);
- bc().setCancel(dialog_->cancelPB);
+ bc().setCancel(dialog_->closePB);
bc().setRestore(dialog_->restorePB);
}
params.user_defined_bullets[1].setText(dialog_->bulletsModule->bullet2LE->text().latin1());
params.user_defined_bullets[2].setText(dialog_->bulletsModule->bullet3LE->text().latin1());
params.user_defined_bullets[3].setText(dialog_->bulletsModule->bullet4LE->text().latin1());
-
+
params.user_defined_bullets[0].setSize(dialog_->bulletsModule->bulletsize1CO->currentItem()-1);
params.user_defined_bullets[1].setSize(dialog_->bulletsModule->bulletsize2CO->currentItem()-1);
params.user_defined_bullets[2].setSize(dialog_->bulletsModule->bulletsize3CO->currentItem()-1);
params.paperpackage = char(margin);
MarginsModuleBase const * m(dialog_->marginsModule);
-
+
params.leftmargin =
LyXLength(m->innerLE->text().toDouble(),
m->innerUnit->currentLengthItem()
dialog_->bulletsModule->bullet3LE->setText(s);
s = params.user_defined_bullets[3].getText().c_str();
dialog_->bulletsModule->bullet4LE->setText(s);
-
+
dialog_->bulletsModule->bulletsize1CO->setCurrentItem(
params.user_defined_bullets[0].getSize() + 1);
dialog_->bulletsModule->bulletsize2CO->setCurrentItem(
params.user_defined_bullets[2].getSize() + 1);
dialog_->bulletsModule->bulletsize4CO->setCurrentItem(
params.user_defined_bullets[3].getSize() + 1);
-
+
// packages
- QStringList enc;
- enc << "default" << "auto" << "latin1" << "latin2" << "latin3" <<
- "latin4" << "latin5" << "latin9" << "koi8-r" << "koi8-u" <<
- "cp866" << "cp1251" << "iso88595" << "pt154";
- int pos2 = 0;
- for (QStringList::Iterator it = enc.begin();
- it!=enc.end(); ++it) {
- if (*it == params.inputenc.c_str()) {
- dialog_->packagesModule->encodingCO->setCurrentItem(pos2);
- }
- ++pos2;
+ char const * enc[] = {
+ "default" , "auto" , "latin1" , "latin2" , "latin3" ,
+ "latin4" , "latin5" , "latin9" , "koi8-r" , "koi8-u" ,
+ "cp866" , "cp1251" , "iso88595" , "pt154" };
+ for (size_t i = 0; i < sizeof(enc)/sizeof(char *); ++i) {
+ if (params.inputenc == enc[i])
+ dialog_->packagesModule->encodingCO->setCurrentItem(i);
}
-
QString text = params.graphicsDriver.c_str();
int nitem = dialog_->packagesModule->psdriverCO->count();
for (int n = 0; n < nitem ; ++n) {
dialog_->packagesModule->amsCB->setChecked(
params.use_amsmath);
- // FIXME: this is wrong
- // QComboBox::setCurrentItem: (lspacingCO) Index 4 out of range
-
- dialog_->packagesModule->lspacingCO->
- setCurrentItem(params.spacing.getSpace());
+ switch (params.spacing.getSpace()) {
+ case Spacing::Other: nitem = 3; break;
+ case Spacing::Double: nitem = 2; break;
+ case Spacing::Onehalf: nitem = 1; break;
+ case Spacing::Default: case Spacing::Single: nitem = 0; break;
+ }
+
+ dialog_->packagesModule->lspacingCO->setCurrentItem(nitem);
if (params.spacing.getSpace() == Spacing::Other) {
dialog_->packagesModule->lspacingLE->setText(
tostr(params.spacing.getValue()).c_str());
tostr(LyXLength(params.paperheight).value()).c_str());
// margins
-
+
MarginsModuleBase * m(dialog_->marginsModule);
-
+
int item = params.paperpackage;
if (params.use_geometry) {
item = 1;