mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 03:03:06 +00:00
Dot not swallow log messages
This commit is contained in:
parent
e82cc5d498
commit
1a48d5a967
@ -2253,8 +2253,11 @@ void Buffer::dispatch(FuncRequest const & func, DispatchResult & dr)
|
|||||||
|
|
||||||
switch (func.action()) {
|
switch (func.action()) {
|
||||||
case LFUN_BUFFER_TOGGLE_READ_ONLY:
|
case LFUN_BUFFER_TOGGLE_READ_ONLY:
|
||||||
if (lyxvc().inUse())
|
if (lyxvc().inUse()) {
|
||||||
lyxvc().toggleReadOnly();
|
string log = lyxvc().toggleReadOnly();
|
||||||
|
if (!log.empty())
|
||||||
|
dr.setMessage(log);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
setReadonly(!isReadonly());
|
setReadonly(!isReadonly());
|
||||||
break;
|
break;
|
||||||
|
@ -259,25 +259,24 @@ void LyXVC::undoLast()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LyXVC::toggleReadOnly()
|
string LyXVC::toggleReadOnly()
|
||||||
{
|
{
|
||||||
if (!vcs)
|
if (!vcs)
|
||||||
return;
|
return string();
|
||||||
if (!vcs->toggleReadOnlyEnabled())
|
if (!vcs->toggleReadOnlyEnabled())
|
||||||
return;
|
return string();
|
||||||
|
|
||||||
switch (vcs->status()) {
|
switch (vcs->status()) {
|
||||||
case VCS::UNLOCKED:
|
case VCS::UNLOCKED:
|
||||||
LYXERR(Debug::LYXVC, "LyXVC: toggle to locked");
|
LYXERR(Debug::LYXVC, "LyXVC: toggle to locked");
|
||||||
checkOut();
|
return checkOut();
|
||||||
break;
|
|
||||||
case VCS::LOCKED:
|
case VCS::LOCKED:
|
||||||
LYXERR(Debug::LYXVC, "LyXVC: toggle to unlocked");
|
LYXERR(Debug::LYXVC, "LyXVC: toggle to unlocked");
|
||||||
checkIn();
|
return checkIn();
|
||||||
break;
|
|
||||||
case VCS::NOLOCKING:
|
case VCS::NOLOCKING:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
return string();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ public:
|
|||||||
* keep things in synchro once we would allow user to toggle
|
* keep things in synchro once we would allow user to toggle
|
||||||
* read-only flags.
|
* read-only flags.
|
||||||
*/
|
*/
|
||||||
void toggleReadOnly();
|
std::string toggleReadOnly();
|
||||||
|
|
||||||
/// Is the document under administration by VCS?
|
/// Is the document under administration by VCS?
|
||||||
bool inUse() const;
|
bool inUse() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user