mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 19:14:51 +00:00
Get rid of Buffer::setReadOnly() pseudo signal.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33222 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e4f796aee7
commit
11474f6b89
@ -603,7 +603,7 @@ void Buffer::setReadonly(bool const flag)
|
|||||||
{
|
{
|
||||||
if (d->read_only != flag) {
|
if (d->read_only != flag) {
|
||||||
d->read_only = flag;
|
d->read_only = flag;
|
||||||
setReadOnly(flag);
|
changed(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2952,13 +2952,6 @@ void Buffer::setBusy(bool on) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Buffer::setReadOnly(bool on) const
|
|
||||||
{
|
|
||||||
if (d->wa_)
|
|
||||||
d->wa_->setReadOnly(on);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Buffer::updateTitles() const
|
void Buffer::updateTitles() const
|
||||||
{
|
{
|
||||||
if (d->wa_)
|
if (d->wa_)
|
||||||
|
@ -492,8 +492,6 @@ public:
|
|||||||
void errors(std::string const & err, bool from_master = false) const;
|
void errors(std::string const & err, bool from_master = false) const;
|
||||||
/// This function is called when the buffer busy status change.
|
/// This function is called when the buffer busy status change.
|
||||||
void setBusy(bool on) const;
|
void setBusy(bool on) const;
|
||||||
/// This function is called when the buffer readonly status change.
|
|
||||||
void setReadOnly(bool on) const;
|
|
||||||
/// Update window titles of all users.
|
/// Update window titles of all users.
|
||||||
void updateTitles() const;
|
void updateTitles() const;
|
||||||
/// Reset autosave timers for all users.
|
/// Reset autosave timers for all users.
|
||||||
|
@ -43,8 +43,6 @@ public:
|
|||||||
/// close this work area.
|
/// close this work area.
|
||||||
/// Slot for Buffer::closing signal.
|
/// Slot for Buffer::closing signal.
|
||||||
virtual void close() = 0;
|
virtual void close() = 0;
|
||||||
/// This function is called when the buffer readonly status change.
|
|
||||||
virtual void setReadOnly(bool) = 0;
|
|
||||||
|
|
||||||
/// Update window titles of all users.
|
/// Update window titles of all users.
|
||||||
virtual void updateWindowTitle() = 0;
|
virtual void updateWindowTitle() = 0;
|
||||||
|
@ -46,13 +46,6 @@ void WorkAreaManager::closeAll()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void WorkAreaManager::setReadOnly(bool on)
|
|
||||||
{
|
|
||||||
for (iterator it = work_areas_.begin(); it != work_areas_.end(); ++it)
|
|
||||||
(*it)->setReadOnly(on);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void WorkAreaManager::updateTitles()
|
void WorkAreaManager::updateTitles()
|
||||||
{
|
{
|
||||||
for (iterator it = work_areas_.begin(); it != work_areas_.end(); ++it)
|
for (iterator it = work_areas_.begin(); it != work_areas_.end(); ++it)
|
||||||
|
@ -38,8 +38,6 @@ public:
|
|||||||
void redrawAll(bool update_metrics);
|
void redrawAll(bool update_metrics);
|
||||||
///
|
///
|
||||||
void closeAll();
|
void closeAll();
|
||||||
/// This function is called when the buffer readonly status change.
|
|
||||||
void setReadOnly(bool);
|
|
||||||
/// Update window titles of all users.
|
/// Update window titles of all users.
|
||||||
void updateTitles();
|
void updateTitles();
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@ GuiWorkArea::GuiWorkArea(QWidget *)
|
|||||||
|
|
||||||
|
|
||||||
GuiWorkArea::GuiWorkArea(Buffer & buffer, GuiView & gv)
|
GuiWorkArea::GuiWorkArea(Buffer & buffer, GuiView & gv)
|
||||||
: buffer_view_(0), lyx_view_(0),
|
: buffer_view_(0), read_only_(buffer.isReadonly()), lyx_view_(0),
|
||||||
cursor_visible_(false),
|
cursor_visible_(false),
|
||||||
need_resize_(false), schedule_redraw_(false),
|
need_resize_(false), schedule_redraw_(false),
|
||||||
preedit_lines_(1), completer_(new GuiCompleter(this, this)),
|
preedit_lines_(1), completer_(new GuiCompleter(this, this)),
|
||||||
@ -440,6 +440,8 @@ void GuiWorkArea::redraw(bool update_metrics)
|
|||||||
|
|
||||||
if (lyxerr.debugging(Debug::WORKAREA))
|
if (lyxerr.debugging(Debug::WORKAREA))
|
||||||
buffer_view_->coordCache().dump();
|
buffer_view_->coordCache().dump();
|
||||||
|
|
||||||
|
setReadOnly(buffer_view_->buffer().isReadonly());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1213,8 +1215,11 @@ void GuiWorkArea::updateWindowTitle()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GuiWorkArea::setReadOnly(bool)
|
void GuiWorkArea::setReadOnly(bool read_only)
|
||||||
{
|
{
|
||||||
|
if (read_only_ == read_only)
|
||||||
|
return;
|
||||||
|
read_only_ = read_only;
|
||||||
updateWindowTitle();
|
updateWindowTitle();
|
||||||
if (this == lyx_view_->currentWorkArea())
|
if (this == lyx_view_->currentWorkArea())
|
||||||
lyx_view_->updateDialogs();
|
lyx_view_->updateDialogs();
|
||||||
|
@ -184,7 +184,7 @@ private:
|
|||||||
/// hide the cursor
|
/// hide the cursor
|
||||||
virtual void removeCursor();
|
virtual void removeCursor();
|
||||||
|
|
||||||
/// This function is called when the buffer readonly status change.
|
/// This function should be called to update the buffer readonly status.
|
||||||
void setReadOnly(bool);
|
void setReadOnly(bool);
|
||||||
|
|
||||||
/// Update window titles of all users.
|
/// Update window titles of all users.
|
||||||
@ -231,6 +231,8 @@ private:
|
|||||||
|
|
||||||
///
|
///
|
||||||
BufferView * buffer_view_;
|
BufferView * buffer_view_;
|
||||||
|
/// Read only Buffer status cache.
|
||||||
|
bool read_only_;
|
||||||
///
|
///
|
||||||
GuiView * lyx_view_;
|
GuiView * lyx_view_;
|
||||||
/// is the cursor currently displayed
|
/// is the cursor currently displayed
|
||||||
|
Loading…
Reference in New Issue
Block a user