]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiDocument.cpp
Label only command for reference dialog.
[lyx.git] / src / frontends / qt4 / GuiDocument.cpp
index 19fce601564ce81835c9c233fb5724f101900385..6ef39dcb4def5ac21e4392e1f1647b87507beca5 100644 (file)
@@ -859,18 +859,9 @@ GuiDocument::GuiDocument(GuiView & lv)
        fontModule->fontsizeCO->addItem(qt_("11"));
        fontModule->fontsizeCO->addItem(qt_("12"));
 
-       fontModule->fontencCO->addItem(qt_("Global Default"), QString("global"));
+       fontModule->fontencCO->addItem(qt_("Default"), QString("global"));
        fontModule->fontencCO->addItem(qt_("Custom"), QString("custom"));
-       fontModule->fontencCO->addItem(qt_("TeX default (OT1, no fontenc)"), QString("default"));
-       fontModule->fontencCO->setToolTip(
-                       qt_("Select LaTeX font encoding(s).\n"
-                           "The standard [Global Default] is "
-                               "\"T1 via 'fontenc' package\" (see Tools>Preferences>Output>LaTeX).\n"
-                               "Notes:\n"
-                               "TeX's default fonts (Computer Modern) are not available "
-                               "in T1 encoding, Latin Modern is the recommended lookalike.\n"
-                               "Font encodings for Greek and Cyrillic are automatically added if required."
-                          ));
+       fontModule->fontencCO->addItem(qt_("None (no fontenc)"), QString("default"));
 
        for (int n = 0; GuiDocument::fontfamilies_gui[n][0]; ++n)
                fontModule->fontsDefaultCO->addItem(
@@ -1055,6 +1046,8 @@ GuiDocument::GuiDocument(GuiView & lv)
                this, SLOT(change_adaptor()));
        connect(langModule->languagePackageCO, SIGNAL(currentIndexChanged(int)),
                this, SLOT(languagePackageChanged(int)));
+       connect(langModule->dynamicQuotesCB, SIGNAL(clicked()),
+               this, SLOT(change_adaptor()));
 
        langModule->languagePackageLE->setValidator(new NoNewLineValidator(
                langModule->languagePackageLE));
@@ -1076,18 +1069,12 @@ GuiDocument::GuiDocument(GuiView & lv)
        encodinglist.sort();
        langModule->encodingCO->addItems(encodinglist);
 
-       langModule->quoteStyleCO->addItem(
-               qt_("``text''"),InsetQuotes::EnglishQuotes);
-       langModule->quoteStyleCO->addItem(
-               qt_("''text''"), InsetQuotes::SwedishQuotes);
-       langModule->quoteStyleCO->addItem
-               (qt_(",,text``"), InsetQuotes::GermanQuotes);
-       langModule->quoteStyleCO->addItem(
-               qt_(",,text''"), InsetQuotes::PolishQuotes);
-       langModule->quoteStyleCO->addItem(
-               qt_("<<text>>"), InsetQuotes::FrenchQuotes);
-       langModule->quoteStyleCO->addItem(
-               qt_(">>text<<"), InsetQuotes::DanishQuotes);
+       for (int i = 0; i < quoteparams.stylescount(); ++i) {
+               InsetQuotesParams::QuoteStyle qs = InsetQuotesParams::QuoteStyle(i);
+               if (qs == InsetQuotesParams::DynamicQuotes)
+                       continue;
+               langModule->quoteStyleCO->addItem(toqstr(quoteparams.getGuiLabel(qs)), qs);
+       }
 
        langModule->languagePackageCO->addItem(
                qt_("Default"), toqstr("default"));
@@ -1466,7 +1453,7 @@ GuiDocument::GuiDocument(GuiView & lv)
 }
 
 
-void GuiDocument::on_bufferViewChanged()
+void GuiDocument::onBufferViewChanged()
 {
        if (isVisibleView())
                initialiseParams("");
@@ -2667,8 +2654,9 @@ void GuiDocument::applyView()
                }
        }
 
-       bp_.quotes_language = (InsetQuotes::QuoteLanguage) langModule->quoteStyleCO->itemData(
+       bp_.quotes_style = (InsetQuotesParams::QuoteStyle) langModule->quoteStyleCO->itemData(
                langModule->quoteStyleCO->currentIndex()).toInt();
+       bp_.dynamic_quotes = langModule->dynamicQuotesCB->isChecked();
 
        QString const langname = langModule->languageCO->itemData(
                langModule->languageCO->currentIndex()).toString();
@@ -3069,7 +3057,7 @@ void GuiDocument::paramsToDialog()
        biblioChanged_ = false;
 
        // indices
-       // We may be called when there is no Buffer, e.g., when
+       // We may be called when there is no Buffer, e.g., when 
        // the last view has just been closed.
        bool const isReadOnly = isBufferAvailable() ? buffer().isReadonly() : false;
        indicesModule->update(bp_, isReadOnly);
@@ -3080,7 +3068,8 @@ void GuiDocument::paramsToDialog()
        langModule->languageCO->setCurrentIndex(pos);
 
        langModule->quoteStyleCO->setCurrentIndex(
-               bp_.quotes_language);
+               bp_.quotes_style);
+       langModule->dynamicQuotesCB->setChecked(bp_.dynamic_quotes);
 
        bool default_enc = true;
        if (bp_.inputenc != "auto") {
@@ -3401,7 +3390,7 @@ void GuiDocument::paramsToDialog()
                        toqstr(bp_.fonts_cjk));
        else
                fontModule->cjkFontLE->setText(QString());
-
+       
        fontModule->microtypeCB->setChecked(bp_.use_microtype);
 
        fontModule->fontScCB->setChecked(bp_.fonts_expert_sc);