From 00d24ec87650e4ac7db77ad54cb4aa2f688100f3 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Mon, 20 Aug 2001 13:39:29 +0000 Subject: [PATCH] Herbert's patch, part 1 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2556 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/controllers/ChangeLog | 5 +++++ src/frontends/controllers/ControlBibtex.C | 16 ++++++++++++++++ src/frontends/controllers/ControlBibtex.h | 4 +++- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index 307a4d462e..6f79fa8d7c 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,8 @@ +2001-08-20 Herbert Voss + + * ControlBibtex.[Ch]: enhanced bibtex-data gui to browse for databases + and styles. Added an option for "bibliography into toc" + 2001-08-15 Angus Leeming * character.[Ch]: remove LATEX_TOGGLE from the FONT_STATE enum as diff --git a/src/frontends/controllers/ControlBibtex.C b/src/frontends/controllers/ControlBibtex.C index 7da42cd5f8..03b6dba6be 100644 --- a/src/frontends/controllers/ControlBibtex.C +++ b/src/frontends/controllers/ControlBibtex.C @@ -10,6 +10,7 @@ * \file ControlBibtex.C * \author John Levon, moz@compsoc.man.ac.uk * \author Angus Leeming + * \author Herbert Voss */ #include @@ -26,8 +27,13 @@ #include "LyXView.h" #include "buffer.h" #include "BufferView.h" +#include "lyxrc.h" +#include "helper_funcs.h" +#include "gettext.h" using SigC::slot; +using std::pair; +using std::make_pair; ControlBibtex::ControlBibtex(LyXView & lv, Dialogs & d) : ControlCommand(lv, d) @@ -53,3 +59,13 @@ void ControlBibtex::applyParamsToInset() void ControlBibtex::applyParamsNoInset() {} + + +string const ControlBibtex::Browse(string const & in_name, + string const & title, + string const & pattern) +{ + pair dir1(N_("Documents"), string(lyxrc.document_path)); + return browseFile(&lv_, in_name, title, pattern, + dir1,make_pair(string(), string())); +} diff --git a/src/frontends/controllers/ControlBibtex.h b/src/frontends/controllers/ControlBibtex.h index d64fad5c55..d107098e89 100644 --- a/src/frontends/controllers/ControlBibtex.h +++ b/src/frontends/controllers/ControlBibtex.h @@ -29,7 +29,9 @@ class ControlBibtex : public ControlCommand public: /// ControlBibtex(LyXView &, Dialogs &); - + /// Browse for a file + string const Browse(string const &, string const &, string const &); + private: /// Dispatch the changed parameters to the kernel. virtual void applyParamsToInset();