mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
New LFUN buffer-external-modification-clear
This commit is contained in:
parent
656bc46892
commit
299242bb16
@ -468,6 +468,7 @@ enum FuncCode
|
||||
LFUN_BRANCH_INVERT, // rgheck, 20160712
|
||||
LFUN_LYX_ACTIVATE, // skostysh, 20160804
|
||||
LFUN_ICON_SIZE, // daniel, 20160712
|
||||
LFUN_BUFFER_EXTERNAL_MODIFICATION_CLEAR,// gm, 20170302
|
||||
LFUN_LASTACTION // end of the table
|
||||
};
|
||||
|
||||
|
@ -878,6 +878,16 @@ void LyXAction::init()
|
||||
*/
|
||||
{ LFUN_BUFFER_WRITE_AS, "buffer-write-as", ReadOnly, Buffer },
|
||||
|
||||
/*!
|
||||
* \var lyx::FuncCode lyx::LFUN_BUFFER_EXTERNAL_MODIFICATION_CLEAR
|
||||
* \li Action: Clear the external modification flag on the current buffer.
|
||||
* \li Syntax: buffer-external-modification-clear
|
||||
* \li Origin: gm, 2 March 2017
|
||||
* \endvar
|
||||
*/
|
||||
{ LFUN_BUFFER_EXTERNAL_MODIFICATION_CLEAR,
|
||||
"buffer-external-modification-clear", ReadOnly, Buffer },
|
||||
|
||||
/*!
|
||||
* \var lyx::FuncCode lyx::LFUN_BUFFER_ZOOM_IN
|
||||
* \li Action: Increases the zoom of the screen fonts.
|
||||
|
@ -1848,6 +1848,10 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_BUFFER_EXTERNAL_MODIFICATION_CLEAR:
|
||||
enable = doc_buffer && doc_buffer->notifiesExternalModification();
|
||||
break;
|
||||
|
||||
case LFUN_BUFFER_WRITE_AS:
|
||||
case LFUN_BUFFER_EXPORT_AS:
|
||||
enable = doc_buffer != 0;
|
||||
@ -3773,6 +3777,11 @@ void GuiView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_BUFFER_EXTERNAL_MODIFICATION_CLEAR:
|
||||
LASSERT(doc_buffer, break);
|
||||
doc_buffer->clearExternalModification();
|
||||
break;
|
||||
|
||||
case LFUN_BUFFER_CLOSE:
|
||||
closeBuffer();
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user