]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiBibtex.cpp
Fix handling of the add branch textfield in GuiBranches
[lyx.git] / src / frontends / qt4 / GuiBibtex.cpp
index 29a86aefca7b93515d30cfe314f89dcc750ff5f9..6dd8d8f650b56b2ba492037f61829a8caae8c974 100644 (file)
@@ -419,7 +419,7 @@ void GuiBibtex::applyView()
                        // use \nocite{*}
                        params_["btprint"] = from_ascii("btPrintAll");
                        break;
-               }               
+               }
        }
 }
 
@@ -435,7 +435,7 @@ QString GuiBibtex::browseBib(QString const & in_name) const
        QString const label1 = qt_("Documents|#o#O");
        QString const dir1 = toqstr(lyxrc.document_path);
        QStringList const filter(qt_("BibTeX Databases (*.bib)"));
-       return browseRelFile(in_name, bufferFilePath(),
+       return browseRelToParent(in_name, bufferFilePath(),
                qt_("Select a BibTeX database to add"), filter, false, label1, dir1);
 }
 
@@ -445,7 +445,7 @@ QString GuiBibtex::browseBst(QString const & in_name) const
        QString const label1 = qt_("Documents|#o#O");
        QString const dir1 = toqstr(lyxrc.document_path);
        QStringList const filter(qt_("BibTeX Styles (*.bst)"));
-       return browseRelFile(in_name, bufferFilePath(),
+       return browseRelToParent(in_name, bufferFilePath(),
                qt_("Select a BibTeX style"), filter, false, label1, dir1);
 }
 
@@ -504,22 +504,7 @@ QString GuiBibtex::styleFile() const
 {
        // the different bibtex packages have (and need) their
        // own "plain" stylefiles
-       CiteEngine const engine = buffer().params().citeEngine();
-       QString defaultstyle;
-       switch (engine) {
-       case ENGINE_BASIC:
-               defaultstyle = "plain";
-               break;
-       case ENGINE_NATBIB_AUTHORYEAR:
-               defaultstyle = "plainnat";
-               break;
-       case ENGINE_NATBIB_NUMERICAL:
-               defaultstyle = "plainnat";
-               break;
-       case ENGINE_JURABIB:
-               defaultstyle = "jurabib";
-               break;
-       }
+       QString defaultstyle = toqstr(buffer().params().defaultBiblioStyle());
 
        QString bst = toqstr(params_["options"]);
        if (bibtotoc()){