Remove embedding stuff from Document>Settings.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24358 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2008-04-19 15:57:17 +00:00
parent 5cadecf3f6
commit 2208b5c264
4 changed files with 0 additions and 135 deletions

View File

@ -924,13 +924,6 @@ GuiDocument::GuiDocument(GuiView & lv)
connect(bulletsModule, SIGNAL(changed()),
this, SLOT(change_adaptor()));
// embedded files
embeddedFilesModule = new UiWidget<Ui::EmbeddedFilesUi>;
connect(embeddedFilesModule->addPB, SIGNAL(clicked()),
this, SLOT(addExtraEmbeddedFile()));
connect(embeddedFilesModule->removePB, SIGNAL(clicked()),
this, SLOT(removeExtraEmbeddedFile()));
// PDF support
pdfSupportModule = new UiWidget<Ui::PDFSupportUi>;
@ -987,7 +980,6 @@ GuiDocument::GuiDocument(GuiView & lv)
docPS->addPanel(floatModule, qt_("Float Placement"));
docPS->addPanel(bulletsModule, qt_("Bullets"));
docPS->addPanel(branchesModule, qt_("Branches"));
docPS->addPanel(embeddedFilesModule, qt_("Embedded Files"));
docPS->addPanel(preambleModule, qt_("LaTeX Preamble"));
docPS->setCurrentPanel(qt_("Document Class"));
// FIXME: hack to work around resizing bug in Qt >= 4.2
@ -1422,41 +1414,6 @@ void GuiDocument::updateModuleInfo()
}
void GuiDocument::setExtraEmbeddedFileList()
{
embeddedFilesModule->extraLW->clear();
// add current embedded files
vector<string> const & files = buffer().params().extraEmbeddedFiles();
vector<string>::const_iterator fit = files.begin();
vector<string>::const_iterator fit_end = files.end();
for (; fit != fit_end; ++fit)
embeddedFilesModule->extraLW->addItem(toqstr(*fit));
}
void GuiDocument::addExtraEmbeddedFile()
{
QString const label1 = qt_("Documents|#o#O");
QString const dir1 = toqstr(lyxrc.document_path);
FileFilterList const filter(_("LyX Layout (*.layout);;LaTeX Classes (*.{cls,sty});;BibTeX Databases (*.{bib,bst})"));
QString file = browseRelFile(QString(), bufferFilepath(),
qt_("Extra embedded file"), filter, true, label1, dir1);
if (file.isEmpty())
return;
if (embeddedFilesModule->extraLW->findItems(file, Qt::MatchExactly).empty())
embeddedFilesModule->extraLW->addItem(file);
}
void GuiDocument::removeExtraEmbeddedFile()
{
int index = embeddedFilesModule->extraLW->currentRow();
delete embeddedFilesModule->extraLW->takeItem(index);
}
void GuiDocument::updateNumbering()
{
DocumentClass const & tclass = bp_.documentClass();
@ -1759,14 +1716,6 @@ void GuiDocument::apply(BufferParams & params)
pdf.pagemode.clear();
pdf.quoted_options = pdf.quoted_options_check(
fromqstr(pdfSupportModule->optionsLE->text()));
// Embedded files
vector<string> & files = params.extraEmbeddedFiles();
files.clear();
for (int i = 0; i < embeddedFilesModule->extraLW->count(); ++i) {
QListWidgetItem * item = embeddedFilesModule->extraLW->item(i);
files.push_back(fromqstr(item->text()));
}
}
@ -2071,8 +2020,6 @@ void GuiDocument::updateParams(BufferParams const & params)
pdfSupportModule->optionsLE->setText(
toqstr(pdf.quoted_options));
setExtraEmbeddedFileList();
}

View File

@ -22,7 +22,6 @@
#include "GuiSelectionManager.h"
#include "ui_DocumentUi.h"
#include "ui_EmbeddedFilesUi.h"
#include "ui_FontUi.h"
#include "ui_TextLayoutUi.h"
#include "ui_MathsUi.h"
@ -138,9 +137,6 @@ private Q_SLOTS:
void browseLayout();
void classChanged();
void updateModuleInfo();
void setExtraEmbeddedFileList();
void addExtraEmbeddedFile();
void removeExtraEmbeddedFile();
private:
UiWidget<Ui::TextLayoutUi> *textLayoutModule;
@ -153,7 +149,6 @@ private:
UiWidget<Ui::MathsUi> *mathsModule;
UiWidget<Ui::LaTeXUi> *latexModule;
UiWidget<Ui::PDFSupportUi> *pdfSupportModule;
UiWidget<Ui::EmbeddedFilesUi> *embeddedFilesModule;
PreambleModule *preambleModule;
GuiBranches *branchesModule;

View File

@ -241,7 +241,6 @@ UIFILES = \
ErrorListUi.ui \
ERTUi.ui \
ExternalUi.ui \
EmbeddedFilesUi.ui \
FloatPlacementUi.ui \
FloatUi.ui \
FontUi.ui \

View File

@ -1,76 +0,0 @@
<ui version="4.0" >
<class>EmbeddedFilesUi</class>
<widget class="QWidget" name="EmbeddedFilesUi" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>409</width>
<height>346</height>
</rect>
</property>
<property name="windowTitle" >
<string>EmbeddedFiles</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QLabel" name="extraLBL" >
<property name="text" >
<string>Extra embedded files:</string>
</property>
</widget>
</item>
<item rowspan="3" row="1" column="0" >
<widget class="QListWidget" name="extraLW" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>7</hsizetype>
<vsizetype>7</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="QPushButton" name="addPB" >
<property name="text" >
<string>Add</string>
</property>
</widget>
</item>
<item row="2" column="1" >
<widget class="QPushButton" name="removePB" >
<property name="text" >
<string>Remove</string>
</property>
</widget>
</item>
<item row="3" column="1" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<layoutdefault spacing="6" margin="11" />
<includes>
<include location="local" >qt_helpers.h</include>
</includes>
<resources/>
<connections/>
</ui>