titleConnection_ = buf.updateTitles.connect(boost::bind(&LyXView::updateWindowTitle, owner_));
timerConnection_ = buf.resetAutosaveTimers.connect(boost::bind(&LyXView::resetAutosaveTimer, owner_));
readonlyConnection_ = buf.readonly.connect(boost::bind(&BufferView::Pimpl::showReadonly, this, _1));
+ closingConnection_ = buf.closing.connect(boost::bind(&BufferView::Pimpl::buffer, this, (Buffer *)0));
}
titleConnection_.disconnect();
timerConnection_.disconnect();
readonlyConnection_.disconnect();
+ closingConnection_.disconnect();
}
boost::signals::connection timerConnection_;
/// buffer readonly status changed signal connection
boost::signals::connection readonlyConnection_;
+ /// buffer closing signal connection
+ boost::signals::connection closingConnection_;
/// connect to signals in the given buffer
void connectBuffer(Buffer & buf);
/// disconnect from signals in the given buffer
-2003-07-10 Alfredo Brauntein <abraunst@libero.it>
+2003-07-11 Alfredo Braunstein <abraunst@libero.it>
+
+ * buffer.[Ch]: added new closing signal
+ * BufferView_pimpl.[Ch]: connect/disconnect to new signal
+ * lyxfunc.C: removed BufferView::buffer(0) call now handled in
+ BufferView::Pimpl via the closing the signal
+
+2003-07-10 Alfredo Braunstein <abraunst@libero.it>
* buffer.[Ch]: take out all bv-related from buffer
* BufferView.C:
// here the buffer should take care that it is
// saved properly, before it goes into the void.
+ closing();
+
if (!tmppath.empty() && destroyDir(tmppath) != 0) {
Alert::warning(_("Could not remove temporary directory"),
bformat(_("Could not remove the temporary directory %1$s"), tmppath));
boost::signal0<void> updateTitles;
/// Reset autosave timers for all users.
boost::signal0<void> resetAutosaveTimers;
+ /// This signal is emitting if the buffer is being closed.
+ boost::signal0<void> closing;
/** Save file.
{
if (bufferlist.close(owner->buffer(), true) && !quitting) {
if (bufferlist.empty()) {
- view()->buffer(0);
- // need this otherwise SEGV may occur while trying to
- // set variables that don't exist
+ // need this otherwise SEGV may occur while
+ // trying to set variables that don't exist
// since there's no current buffer
owner->getDialogs().hideBufferDependent();
} else {