Dear all

I have set up a new dialog for easier and more convenient access to LyX
Templates and Examples. Rather than using the file dialog, this dialog
lists all templates or examples in a categorized tree and lets you
immediately open one by double-click (or "Open"). So each and any
Template/Example is only two clicks away (see attached screenshot). And
it is presented in a transparent (structured) way.

The list consists of all templates/examples in
* the user dir
* the build dir (if non-empty)
* the system dir

If files are duplicated between those trees (have the same relative
subpath), then the preference is user > build > system (as with
libFileSearch), so users can add a modified version of a
template/example. Furthermore, i18n dirs are considered, so in German
UI, examples/de/beamer.lyx is preferred over examples/beamer.lyx (and
translations in other languages are skipped).

This finally addresses the long-standing issues with missing
"Examples"/"Templates" buttons in native file dialogs, and furthermore
the problems with user directories being a pain to navigate to without
symlink trickery.

(To access examples, I propose a new menu entry File > Open Example...)

The dialog also has a Browse button that opens the file dialog (in the
respective system directory) if a user wants to open a file beyond
those dirs. So the current procedure is still there, just one click
farther away.

The tree categorization is determined by the subfolders (files in the
top hierarchy go to "General", but I propose not to use this), and it
can take max two depths (templates/category/subcategory = category >
subcategory).

My next step, if you agree with the proposal, is to re-organize
templates and example folders in the following order:

[<LANG>/]/<LAYOUT CATEGORY>/[<LAYOUT GUI NAME>*/]<file>

* subcategory (layout GUI name) is only used if a template has several
files, such as Uwe's thesis template.

The advantage of this is that it is (1.) in line with the structure of
Documents > Class and (2.) we get translation for free.

So, e.g. we'd have

Articles
   |
   +--AGU.lyx
   |
   +--APA.lyx
   |
   ...
Letters
   |
   +--dinbrief.lyx
   |
   +--letter.lyx
   |
   |
   ...
Theses
   |
   +--Uwe's Template
      |
      +--Acknowledgements.lyx
      |
      +--Appendix.lyx
      |
      ...

Thoughts?
Jürgen
diff --git a/lib/ui/stdmenus.inc b/lib/ui/stdmenus.inc
index b9f16b0404..a0c3bf2631 100644
--- a/lib/ui/stdmenus.inc
+++ b/lib/ui/stdmenus.inc
@@ -43,9 +43,10 @@ Menuset
 
 	Menu "file"
 		Item "New|N" "buffer-new"
-		Item "New from Template...|m" "buffer-new-template"
+		Item "New from Template...|m" "dialog-show lyxfiles templates"
 		Item "Open...|O" "file-open"
 		Submenu "Open Recent|t" "file_lastfiles"
+		Item "Open Example File...|p" "dialog-show lyxfiles examples"
 		Separator
 		Item "Close|C" "buffer-close"
 		Item "Close All" "buffer-close-all"
diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp
index d6c821e55a..082d6080d4 100644
--- a/src/LyXAction.cpp
+++ b/src/LyXAction.cpp
@@ -714,8 +714,11 @@ void LyXAction::init()
  * \li Action: Creates a new buffer (that is, document) from a template.
  * \li Notion: Path for new files and templates can be set in Preferences dialog.
                Template will be asked for via Open-dialog.
- * \li Syntax: buffer-new-template [<FILE>]
- * \li Params: <FILE>: filename of created file with absolute path.
+ * \li Syntax: buffer-new-template [<FILE>] [<TEMPLATE FILE>]
+ * \li Params: <FILE>: filename of created file with absolute path. If empty
+ *                     or "newfile", a file with appropriate name is generated.
+ *             <TEMPLATE FILE>: filename of template with absolute path. If empty,
+ *                              a dialog is opened to select the new file.
  * \endvar
  */
 		{ LFUN_BUFFER_NEW_TEMPLATE,"buffer-new-template", NoBuffer, Buffer },
diff --git a/src/frontends/qt4/GuiApplication.cpp b/src/frontends/qt4/GuiApplication.cpp
index ac3e4e8f97..ea5241cdeb 100644
--- a/src/frontends/qt4/GuiApplication.cpp
+++ b/src/frontends/qt4/GuiApplication.cpp
@@ -1332,6 +1332,7 @@ bool GuiApplication::getStatus(FuncRequest const & cmd, FuncStatus & flag) const
 	case LFUN_DIALOG_SHOW: {
 		string const name = cmd.getArg(0);
 		return name == "aboutlyx"
+			|| name == "lyxfiles"
 			|| name == "prefs"
 			|| name == "texinfo"
 			|| name == "progress"
@@ -1655,26 +1656,29 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
 		if (!current_view_
 		   || (!lyxrc.open_buffers_in_tabs && current_view_->documentBufferView() != 0)) {
 			createView(QString(), false); // keep hidden
-			current_view_->newDocument(to_utf8(cmd.argument()), false);
+			current_view_->newDocument(to_utf8(cmd.argument()));
 			current_view_->show();
 			setActiveWindow(current_view_);
 		} else {
-			current_view_->newDocument(to_utf8(cmd.argument()), false);
+			current_view_->newDocument(to_utf8(cmd.argument()));
 		}
 		break;
 
-	case LFUN_BUFFER_NEW_TEMPLATE:
+	case LFUN_BUFFER_NEW_TEMPLATE: {
+		string const file = (cmd.getArg(0) == "newfile") ? string() : cmd.getArg(0);
+		string const temp = cmd.getArg(1);
 		validateCurrentView();
 		if (!current_view_
 		   || (!lyxrc.open_buffers_in_tabs && current_view_->documentBufferView() != 0)) {
 			createView();
-			current_view_->newDocument(to_utf8(cmd.argument()), true);
+			current_view_->newDocument(file, temp, true);
 			if (!current_view_->documentBufferView())
 				current_view_->close();
 		} else {
-			current_view_->newDocument(to_utf8(cmd.argument()), true);
+			current_view_->newDocument(file, temp, true);
 		}
 		break;
+	}
 
 	case LFUN_FILE_OPEN: {
 		// FIXME: normally the code below is not needed, since getStatus makes sure that
diff --git a/src/frontends/qt4/GuiLyXFiles.cpp b/src/frontends/qt4/GuiLyXFiles.cpp
new file mode 100644
index 0000000000..7f5ed16443
--- /dev/null
+++ b/src/frontends/qt4/GuiLyXFiles.cpp
@@ -0,0 +1,346 @@
+/**
+ * \file GuiLyXFiles.cpp
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Jürgen Spitzmüller
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
+#include <config.h>
+
+#include "GuiLyXFiles.h"
+#include "GuiApplication.h"
+#include "qt_helpers.h"
+
+#include "FileDialog.h"
+#include "Buffer.h"
+#include "BufferParams.h"
+#include "FuncRequest.h"
+#include "Language.h"
+#include "LyXRC.h"
+
+#include "support/environment.h"
+#include "support/filetools.h"
+#include "support/gettext.h"
+#include "support/lstrings.h"
+#include "support/Messages.h"
+#include "support/qstring_helpers.h"
+#include "support/Package.h"
+
+#include <QDirIterator>
+#include <QFileIconProvider>
+#include <QTreeWidget>
+
+using namespace std;
+using namespace lyx::support;
+
+namespace lyx {
+namespace frontend {
+
+namespace {
+
+void getFiles(QMap<QString, QString> & in, QString const type)
+{
+	// We look for lyx files in the subdirectory dir of
+	//   1) user_lyxdir
+	//   2) build_lyxdir (if not empty)
+	//   3) system_lyxdir
+	// in this order. Files with a given sub-hierarchy will
+	// only be listed once.
+	// We also consider i18n subdirectories and prefer them.
+	QStringList dirs;
+	QStringList relpaths;
+	QStringList langcodes;
+
+	// The three locations to look at.
+	string const user = addPath(package().user_support().absFileName(), fromqstr(type));
+	string const build = addPath(package().build_support().absFileName(), fromqstr(type));
+	string const system = addPath(package().system_support().absFileName(), fromqstr(type));
+
+	// If the LANGUAGE variable is set, use it as a fallback for searching for files.
+	string lang = getGuiMessages().language();
+	string const language = getEnv("LANGUAGE");
+	if (!language.empty())
+		lang += ":" + language;
+
+	// Get all supported languages (by code) in order to exclude those
+	// dirs later.
+	QAbstractItemModel * language_model = guiApp->languageModel();
+	for (int i = 0; i != language_model->rowCount(); ++i) {
+		QModelIndex index = language_model->index(i, 0);
+		Language const * lang =
+			languages.getLanguage(fromqstr(index.data(Qt::UserRole).toString()));
+		if (!lang)
+			continue;
+		string const code = lang->code();
+		langcodes << toqstr(code);
+		// Also store code without country code
+		string const shortcode = token(code, '_', 0);
+		if (shortcode != code)
+			langcodes << toqstr(shortcode);
+	}
+
+	for (auto const & l : getVectorFromString(lang, ":")) {
+		FileName tmp;
+		// First try with the full name
+		// `en' files are not in a subdirectory
+		if (l == "en")
+			break;
+		else {
+			dirs << toqstr(addPath(user, l));
+			dirs << toqstr(addPath(build, l));
+			dirs << toqstr(addPath(system, l));
+		}
+		// Then the name without country code
+		string const shortl = token(l, '_', 0);
+		if (shortl != l) {
+			dirs << toqstr(addPath(user, shortl));
+			dirs << toqstr(addPath(build, shortl));
+			dirs << toqstr(addPath(system, shortl));
+		}
+	}
+
+	// Next, search in the base path
+	dirs << toqstr(user)
+	     << toqstr(build)
+	     << toqstr(system);
+
+	for (int i = 0; i < dirs.size(); ++i) {
+		QString const dir = dirs.at(i);
+		QDirIterator it(dir, QDir::Files, QDirIterator::Subdirectories);
+		while (it.hasNext()) {
+			QString fn(QFile(it.next()).fileName());
+			if (!fn.endsWith(".lyx"))
+				continue;
+			QString const relpath = toqstr(makeRelPath(qstring_to_ucs4(fn),
+								   qstring_to_ucs4(dir)));
+			// <cat>/
+			int s = relpath.indexOf('/', 0);
+			QString cat = qt_("General");
+			if (s != -1) {
+				// <cat>/<subcat>/
+				cat = relpath.left(s);
+				int sc = relpath.indexOf('/', s + 1);
+				QString const subcat = (sc == -1) ?
+							QString() : relpath.mid(s + 1, sc - s - 1);
+				if (langcodes.contains(cat)
+				    && !langcodes.contains(dir.right(dir.lastIndexOf('/'))))
+					// Skip i18n dir
+					continue;
+				if (!subcat.isEmpty())
+					cat += '/' + subcat;
+			}
+			if (!relpaths.contains(relpath)) {
+				relpaths.append(relpath);
+				in.insert(fn, cat);
+			}
+		}
+	}
+}
+
+}// namespace anon
+
+
+GuiLyXFiles::GuiLyXFiles(GuiView & lv)
+	: GuiDialog(lv, "lyxfiles", qt_("New File From Template"))
+{
+	setupUi(this);
+
+	connect(buttonBox, SIGNAL(clicked(QAbstractButton *)),
+		this, SLOT(slotButtonBox(QAbstractButton *)));
+
+	connect(filesLW, SIGNAL(itemClicked(QTreeWidgetItem *, int)),
+		this, SLOT(changed_adaptor()));
+	connect(filesLW, SIGNAL(itemSelectionChanged()),
+		this, SLOT(changed_adaptor()));
+
+	bc().setPolicy(ButtonPolicy::OkApplyCancelPolicy);
+	bc().setOK(buttonBox->button(QDialogButtonBox::Open));
+	bc().setCancel(buttonBox->button(QDialogButtonBox::Cancel));
+
+	//filesLW->setViewMode(QListView::ListMode);
+	filesLW->setIconSize(QSize(48, 48));
+
+	fileTypeCO->addItem(qt_("Templates"), toqstr("templates"));
+	fileTypeCO->addItem(qt_("Examples"), toqstr("examples"));
+}
+
+
+void GuiLyXFiles::changed_adaptor()
+{
+	changed();
+}
+
+
+void GuiLyXFiles::on_fileTypeCO_activated(int)
+{
+	updateContents();
+}
+
+
+void GuiLyXFiles::on_filesLW_itemDoubleClicked(QTreeWidgetItem *, int)
+{
+	applyView();
+	dispatchParams();
+	close();
+}
+
+
+void GuiLyXFiles::on_browsePB_pressed()
+{
+	bool const examples = (type_ == "examples");
+	FileDialog dlg(qt_("Select template file"));
+	dlg.setButton1(qt_("D&ocuments"), toqstr(lyxrc.document_path));
+	if (examples)
+		dlg.setButton2(qt_("&Examples"), toqstr(lyxrc.example_path));
+	else
+		dlg.setButton2(qt_("&Templates"), toqstr(lyxrc.template_path));
+
+	FileDialog::Result result = dlg.open(examples ? toqstr(lyxrc.example_path)
+						      : toqstr(lyxrc.template_path),
+				 QStringList(qt_("LyX Documents (*.lyx)")));
+
+	if (result.first != FileDialog::Later && !result.second.isEmpty()) {
+		file_ = toqstr(FileName(fromqstr(result.second)).absFileName());
+		dispatchParams();
+		close();
+	}
+}
+
+
+void GuiLyXFiles::updateContents()
+{
+	QString type = fileTypeCO->itemData(fileTypeCO->currentIndex()).toString();
+	QMap<QString, QString> files;
+	getFiles(files, type);
+
+	filesLW->clear();
+	QFileIconProvider iconprovider;
+	QStringList cats;
+	QMap<QString, QString>::const_iterator it = files.constBegin();
+	QFont capfont;
+	capfont.setBold(true);
+	while (it != files.constEnd()) {
+		QFileInfo const info = QFileInfo(it.key());
+		QString cat = toqstr(translateIfPossible(qstring_to_ucs4(it.value())));
+		QString subcat;
+		QString catsave;
+		if (cat.contains('/')) {
+			catsave = cat;
+			cat = catsave.left(catsave.indexOf('/'));
+			subcat = catsave.mid(catsave.indexOf('/') + 1);
+		}
+		QTreeWidgetItem * catItem = new QTreeWidgetItem();
+		if (!cats.contains(cat)) {
+			catItem->setText(0, cat);
+			catItem->setFont(0, capfont);
+			filesLW->insertTopLevelItem(0, catItem);
+			catItem->setExpanded(true);
+			cats << cat;
+		} else
+			catItem = filesLW->findItems(cat, Qt::MatchExactly).first();
+		QTreeWidgetItem * item = new QTreeWidgetItem();
+		item->setIcon(0, iconprovider.icon(info));
+		item->setData(0, Qt::UserRole, info.filePath());
+		item->setData(0, Qt::DisplayRole, info.fileName());
+		item->setData(0, Qt::ToolTipRole, info.filePath());
+		if (subcat.isEmpty())
+			catItem->addChild(item);
+		else {
+			QTreeWidgetItem * subcatItem = new QTreeWidgetItem();
+			if (cats.contains(catsave)) {
+				QList<QTreeWidgetItem *> subcats = filesLW->findItems(catsave, Qt::MatchExactly);
+				for (int iit = 0; iit < subcats.size(); ++iit) {
+					if (subcats.at(iit)->parent()
+					    && subcats.at(iit)->parent()->text(0) == cat)
+						subcatItem = subcats.at(iit);
+				}
+			} else {
+				subcatItem->setText(0, subcat);
+				cats << catsave;
+			}
+			subcatItem->addChild(item);
+			catItem->addChild(subcatItem);
+		}
+		++it;
+	}
+	filesLW->sortItems(0, Qt::AscendingOrder);
+}
+
+
+void GuiLyXFiles::slotButtonBox(QAbstractButton * button)
+{
+	switch (buttonBox->standardButton(button)) {
+	case QDialogButtonBox::Open:
+		slotOK();
+		break;
+	case QDialogButtonBox::Cancel:
+		slotClose();
+		break;
+	default:
+		break;
+	}
+}
+
+
+void GuiLyXFiles::applyView()
+{
+	file_ = filesLW->currentItem()->data(0, Qt::UserRole).toString();
+}
+
+
+bool GuiLyXFiles::isValid()
+{
+	return filesLW->currentItem() && filesLW->currentItem()->isSelected();
+}
+
+
+bool GuiLyXFiles::initialiseParams(string const & type)
+{
+	type_ = type.empty() ? toqstr("templates") : toqstr(type);
+	paramsToDialog(type_);
+	return true;
+}
+
+
+void GuiLyXFiles::paramsToDialog(QString const & command)
+{
+	if (!command.isEmpty()) {
+		int i = fileTypeCO->findData(command);
+		if (i != -1)
+			fileTypeCO->setCurrentIndex(i);
+	}
+	if (command == "examples")
+		setTitle(qt_("Open Example File"));
+	else {
+		setTitle(qt_("New File From Template"));
+	}
+
+	bc().setValid(isValid());
+}
+
+
+void GuiLyXFiles::dispatchParams()
+{
+	if (file_.isEmpty())
+		return;
+
+	string arg;
+	if (type_ == "templates")
+		arg = "newfile ";
+	arg += fromqstr(file_);
+	FuncCode const lfun = (type_ == toqstr("examples")) ?
+		LFUN_FILE_OPEN : getLfun();
+
+	dispatch(FuncRequest(lfun, arg));
+}
+
+Dialog * createGuiLyXFiles(GuiView & lv) { return new GuiLyXFiles(lv); }
+
+
+} // namespace frontend
+} // namespace lyx
+
+#include "moc_GuiLyXFiles.cpp"
diff --git a/src/frontends/qt4/GuiLyXFiles.h b/src/frontends/qt4/GuiLyXFiles.h
new file mode 100644
index 0000000000..0d47185e25
--- /dev/null
+++ b/src/frontends/qt4/GuiLyXFiles.h
@@ -0,0 +1,71 @@
+// -*- C++ -*-
+/**
+ * \file GuiLyXFiles.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Jürgen Spitzmüller
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
+#ifndef GUILYXFILES_H
+#define GUILYXFILES_H
+
+#include "GuiDialog.h"
+#include "ui_LyXFilesUi.h"
+
+class QListWidgetItem;
+
+namespace lyx {
+
+class Format;
+
+namespace frontend {
+
+class GuiLyXFiles : public GuiDialog, public Ui::LyXFilesUi
+{
+	Q_OBJECT
+
+public:
+	GuiLyXFiles(GuiView & lv);
+
+private Q_SLOTS:
+	void changed_adaptor();
+	void on_fileTypeCO_activated(int);
+	void on_filesLW_itemDoubleClicked(QTreeWidgetItem *, int);
+	void on_browsePB_pressed();
+	void slotButtonBox(QAbstractButton *);
+
+private:
+	///
+	bool isValid();
+	/// Apply from dialog
+	void applyView();
+	/// Update the dialog
+	void updateContents();
+
+	///
+	bool initialiseParams(std::string const & data);
+	///
+	void paramsToDialog(QString const & command);
+	///
+	void clearParams() {}
+	///
+	void dispatchParams();
+	///
+	bool isBufferDependent() const { return false; }
+	///
+	FuncCode getLfun() const { return LFUN_BUFFER_NEW_TEMPLATE; }
+
+private:
+	///
+	QString type_;
+	///
+	QString file_;
+};
+
+} // namespace frontend
+} // namespace lyx
+
+#endif // GUILYXFILES_H
diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp
index dcfba88c53..6624d81362 100644
--- a/src/frontends/qt4/GuiView.cpp
+++ b/src/frontends/qt4/GuiView.cpp
@@ -2098,6 +2098,7 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
 		if (!doc_buffer)
 			enable = name == "aboutlyx"
 				|| name == "file" //FIXME: should be removed.
+				|| name == "lyxfiles"
 				|| name == "prefs"
 				|| name == "texinfo"
 				|| name == "progress"
@@ -2566,7 +2567,8 @@ void GuiView::importDocument(string const & argument)
 }
 
 
-void GuiView::newDocument(string const & filename, bool from_template)
+void GuiView::newDocument(string const & filename, string templatefile,
+			  bool from_template)
 {
 	FileName initpath(lyxrc.document_path);
 	if (documentBufferView()) {
@@ -2576,9 +2578,9 @@ void GuiView::newDocument(string const & filename, bool from_template)
 			initpath = trypath;
 	}
 
-	string templatefile;
 	if (from_template) {
-		templatefile = selectTemplateFile().absFileName();
+		if (templatefile.empty())
+			templatefile =  selectTemplateFile().absFileName();
 		if (templatefile.empty())
 			return;
 	}
@@ -4545,7 +4547,7 @@ char const * const dialognames[] = {
 "citation", "compare", "comparehistory", "document", "errorlist", "ert",
 "external", "file", "findreplace", "findreplaceadv", "float", "graphics",
 "href", "include", "index", "index_print", "info", "listings", "label", "line",
-"log", "mathdelimiter", "mathmatrix", "mathspace", "nomenclature",
+"log", "lyxfiles", "mathdelimiter", "mathmatrix", "mathspace", "nomenclature",
 "nomencl_print", "note", "paragraph", "phantom", "prefs", "ref",
 "sendto", "space", "spellchecker", "symbols", "tabular", "tabularcreate",
 "thesaurus", "texinfo", "toc", "view-source", "vspace", "wrap", "progress"};
@@ -4741,6 +4743,7 @@ Dialog * createGuiInclude(GuiView & lv);
 Dialog * createGuiIndex(GuiView & lv);
 Dialog * createGuiListings(GuiView & lv);
 Dialog * createGuiLog(GuiView & lv);
+Dialog * createGuiLyXFiles(GuiView & lv);
 Dialog * createGuiMathMatrix(GuiView & lv);
 Dialog * createGuiNote(GuiView & lv);
 Dialog * createGuiParagraph(GuiView & lv);
@@ -4811,6 +4814,8 @@ Dialog * GuiView::build(string const & name)
 		return createGuiListings(*this);
 	if (name == "log")
 		return createGuiLog(*this);
+	if (name == "lyxfiles")
+		return createGuiLyXFiles(*this);
 	if (name == "mathdelimiter")
 		return createGuiDelimiter(*this);
 	if (name == "mathmatrix")
diff --git a/src/frontends/qt4/GuiView.h b/src/frontends/qt4/GuiView.h
index 2d0ad0097a..3c5041662f 100644
--- a/src/frontends/qt4/GuiView.h
+++ b/src/frontends/qt4/GuiView.h
@@ -105,7 +105,8 @@ public:
 	BufferView const * documentBufferView() const;
 
 	void newDocument(std::string const & filename,
-		bool fromTemplate);
+			 std::string templatefile = std::string(),
+			 bool fromTemplate = false);
 
 	/// display a message in the view
 	/// could be called from any thread
diff --git a/src/frontends/qt4/Makefile.am b/src/frontends/qt4/Makefile.am
index 4ffb351607..e2e3e1ce5e 100644
--- a/src/frontends/qt4/Makefile.am
+++ b/src/frontends/qt4/Makefile.am
@@ -109,6 +109,7 @@ SOURCEFILES = \
 	GuiLine.cpp \
 	GuiListings.cpp \
 	GuiLog.cpp \
+	GuiLyXFiles.cpp \
 	GuiMathMatrix.cpp \
 	GuiNomenclature.cpp \
 	GuiNote.cpp \
@@ -219,6 +220,7 @@ MOCHEADER = \
 	GuiLine.h \
 	GuiListings.h \
 	GuiLog.h \
+	GuiLyXFiles.h \
 	GuiMathMatrix.h \
 	GuiNomenclature.h \
 	GuiNote.h \
@@ -304,6 +306,7 @@ UIFILES = \
 	ListingsSettingsUi.ui \
 	LocalLayoutUi.ui \
 	LogUi.ui \
+	LyXFilesUi.ui \
 	MarginsUi.ui \
 	MasterChildUi.ui \
 	MathMatrixUi.ui \
diff --git a/src/frontends/qt4/ui/LyXFilesUi.ui b/src/frontends/qt4/ui/LyXFilesUi.ui
new file mode 100644
index 0000000000..22627eb4c0
--- /dev/null
+++ b/src/frontends/qt4/ui/LyXFilesUi.ui
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>LyXFilesUi</class>
+ <widget class="QDialog" name="LyXFilesUi">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>381</width>
+    <height>387</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string/>
+  </property>
+  <property name="sizeGripEnabled">
+   <bool>true</bool>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="0" column="0">
+    <layout class="QHBoxLayout" name="horizontalLayout">
+     <item>
+      <widget class="QLabel" name="filesTypeLA">
+       <property name="text">
+        <string>&amp;Type:</string>
+       </property>
+       <property name="buddy">
+        <cstring>fileTypeCO</cstring>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QComboBox" name="fileTypeCO">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="1" column="0">
+    <widget class="QTreeWidget" name="filesLW">
+     <property name="rootIsDecorated">
+      <bool>true</bool>
+     </property>
+     <property name="itemsExpandable">
+      <bool>true</bool>
+     </property>
+     <attribute name="headerVisible">
+      <bool>false</bool>
+     </attribute>
+     <column>
+      <property name="text">
+       <string notr="true">1</string>
+      </property>
+     </column>
+    </widget>
+   </item>
+   <item row="2" column="0">
+    <layout class="QHBoxLayout" name="horizontalLayout_2">
+     <item>
+      <spacer name="horizontalSpacer">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="browsePB">
+       <property name="text">
+        <string>&amp;Browse...</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item row="3" column="0">
+    <layout class="QHBoxLayout">
+     <property name="spacing">
+      <number>6</number>
+     </property>
+     <property name="leftMargin">
+      <number>0</number>
+     </property>
+     <property name="topMargin">
+      <number>0</number>
+     </property>
+     <property name="rightMargin">
+      <number>0</number>
+     </property>
+     <property name="bottomMargin">
+      <number>0</number>
+     </property>
+     <item>
+      <widget class="QDialogButtonBox" name="buttonBox">
+       <property name="standardButtons">
+        <set>QDialogButtonBox::Cancel|QDialogButtonBox::Open</set>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <includes>
+  <include location="local">qt_i18n.h</include>
+ </includes>
+ <resources/>
+ <connections/>
+</ui>

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to