+
+QString GuiInclude::browse(QString const & in_name, Type in_type) const
+{
+ QString const title = qt_("Select document to include");
+
+ // input TeX, verbatim, or LyX file ?
+ QStringList filters;
+ switch (in_type) {
+ case INCLUDE:
+ case INPUT:
+ filters = fileFilters(qt_("LaTeX/LyX Documents (*.tex *.lyx)"));
+ break;
+ case VERBATIM:
+ case LISTINGS:
+ break;
+ }
+
+ QString const docpath = toqstr(support::onlyPath(buffer().absFileName()));
+
+ return browseRelFile(in_name, docpath, title, filters, false,
+ qt_("Documents|#o#O"), toqstr(lyxrc.document_path));
+}
+
+
+bool GuiInclude::initialiseParams(std::string const & data)
+{
+ InsetCommand::string2params(data, params_);
+ paramsToDialog(params_);
+ return true;
+}
+
+
+void GuiInclude::dispatchParams()
+{
+ std::string const lfun = InsetCommand::params2string(params_);
+ dispatch(FuncRequest(getLfun(), lfun));
+}
+
+
+Dialog * createGuiInclude(GuiView & lv) { return new GuiInclude(lv); }
+
+