2 * \file ControlInclude.C
3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
6 * \author Alejandro Aguilar Sierra
7 * \author John Levon, moz@compsoc.man.ac.uk
8 * \author Angus Leeming, a.leeming@.ac.uk
15 #pragma implementation
18 #include "ControlInclude.h"
24 #include "helper_funcs.h"
31 ControlInclude::ControlInclude(LyXView & lv, Dialogs & d)
32 : ControlInset<InsetInclude, InsetInclude::Params>(lv, d)
34 d_.showInclude.connect(slot(this, &ControlInclude::showInset));
38 void ControlInclude::applyParamsToInset()
40 inset()->set(params());
41 lv_.view()->updateInset(inset(), true);
45 string const ControlInclude::Browse(string const & in_name, Type in_type)
47 string const title = N_("Select document to include");
51 // input TeX, verbatim, or LyX file ?
54 pattern = _("*.tex| LaTeX Documents (*.tex)");
58 pattern = _("*| All files ");
62 pattern = _("*.lyx| LyX Documents (*.lyx)");
66 pair<string, string> dir1(N_("Documents"), string(lyxrc.document_path));
68 return browseFile(&lv_, in_name, title, pattern, dir1,
69 make_pair(string(), string()));