mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 11:08:41 +00:00
Embedding patch 4: interaction between buffer and the embedding dialog. Emit embeddingChanged signal to update the embedding dialog.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20038 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
960af8f370
commit
3611b0ff33
@ -144,6 +144,8 @@ public:
|
|||||||
boost::signal<void()> changed;
|
boost::signal<void()> changed;
|
||||||
/// This signal is emitted when the buffer structure is changed.
|
/// This signal is emitted when the buffer structure is changed.
|
||||||
boost::signal<void()> structureChanged;
|
boost::signal<void()> structureChanged;
|
||||||
|
/// This signal is emitted when an embedded file is changed
|
||||||
|
boost::signal<void()> embeddingChanged;
|
||||||
/// This signal is emitted when some parsing error shows up.
|
/// This signal is emitted when some parsing error shows up.
|
||||||
boost::signal<void(std::string)> errors;
|
boost::signal<void(std::string)> errors;
|
||||||
/// This signal is emitted when some message shows up.
|
/// This signal is emitted when some message shows up.
|
||||||
|
@ -621,6 +621,11 @@ void updateLabels(Buffer const & buf, bool childonly)
|
|||||||
cbuf.tocBackend().update();
|
cbuf.tocBackend().update();
|
||||||
if (!childonly)
|
if (!childonly)
|
||||||
cbuf.structureChanged();
|
cbuf.structureChanged();
|
||||||
|
// FIXME
|
||||||
|
// the embedding signal is emitted with structureChanged signal
|
||||||
|
// this is inaccurate so these two will be separated later.
|
||||||
|
cbuf.embeddedFiles().update();
|
||||||
|
cbuf.embeddingChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -170,6 +170,10 @@ void LyXView::connectBuffer(Buffer & buf)
|
|||||||
buf.getMasterBuffer()->structureChanged.connect(
|
buf.getMasterBuffer()->structureChanged.connect(
|
||||||
boost::bind(&LyXView::updateToc, this));
|
boost::bind(&LyXView::updateToc, this));
|
||||||
|
|
||||||
|
bufferEmbeddingChangedConnection_ =
|
||||||
|
buf.embeddingChanged.connect(
|
||||||
|
boost::bind(&LyXView::updateEmbeddedFiles, this));
|
||||||
|
|
||||||
errorsConnection_ =
|
errorsConnection_ =
|
||||||
buf.errors.connect(
|
buf.errors.connect(
|
||||||
boost::bind(&LyXView::showErrorList, this, _1));
|
boost::bind(&LyXView::showErrorList, this, _1));
|
||||||
@ -200,6 +204,7 @@ void LyXView::disconnectBuffer()
|
|||||||
{
|
{
|
||||||
errorsConnection_.disconnect();
|
errorsConnection_.disconnect();
|
||||||
bufferStructureChangedConnection_.disconnect();
|
bufferStructureChangedConnection_.disconnect();
|
||||||
|
bufferEmbeddingChangedConnection_.disconnect();
|
||||||
messageConnection_.disconnect();
|
messageConnection_.disconnect();
|
||||||
busyConnection_.disconnect();
|
busyConnection_.disconnect();
|
||||||
titleConnection_.disconnect();
|
titleConnection_.disconnect();
|
||||||
@ -291,6 +296,12 @@ void LyXView::updateToc()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void LyXView::updateEmbeddedFiles()
|
||||||
|
{
|
||||||
|
updateDialog("embedding", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void LyXView::updateToolbars()
|
void LyXView::updateToolbars()
|
||||||
{
|
{
|
||||||
WorkArea * wa = currentWorkArea();
|
WorkArea * wa = currentWorkArea();
|
||||||
|
@ -215,6 +215,8 @@ private:
|
|||||||
|
|
||||||
/// buffer structure changed signal connection
|
/// buffer structure changed signal connection
|
||||||
boost::signals::connection bufferStructureChangedConnection_;
|
boost::signals::connection bufferStructureChangedConnection_;
|
||||||
|
/// embedded file change signal connection
|
||||||
|
boost::signals::connection bufferEmbeddingChangedConnection_;
|
||||||
/// buffer errors signal connection
|
/// buffer errors signal connection
|
||||||
boost::signals::connection errorsConnection_;
|
boost::signals::connection errorsConnection_;
|
||||||
/// buffer messages signal connection
|
/// buffer messages signal connection
|
||||||
@ -255,6 +257,8 @@ private:
|
|||||||
protected:
|
protected:
|
||||||
///
|
///
|
||||||
void updateToc();
|
void updateToc();
|
||||||
|
///
|
||||||
|
void updateEmbeddedFiles();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int id_;
|
int id_;
|
||||||
|
@ -55,7 +55,7 @@ void ControlEmbeddedFiles::updateEmbeddedFiles()
|
|||||||
{
|
{
|
||||||
// copy buffer embeddedFiles to a local copy
|
// copy buffer embeddedFiles to a local copy
|
||||||
kernel().buffer().embeddedFiles().update();
|
kernel().buffer().embeddedFiles().update();
|
||||||
//kernel().buffer().embeddingChanged();
|
kernel().buffer().embeddingChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user