mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Implement buffer-write force
This commit is contained in:
parent
38ba0ea240
commit
fe09ddf1b9
@ -105,7 +105,7 @@ Format 5
|
||||
|
||||
#bind "F1" "help" # Not yet implemented!
|
||||
#bind "C-F1" "help-context" # Not yet implemented!
|
||||
\bind "F2" "buffer-write"
|
||||
\bind "F2" "buffer-write force"
|
||||
\bind "F3" "word-find"
|
||||
\bind "C-F4" "buffer-close"
|
||||
\bind "M-F4" "lyx-quit"
|
||||
|
@ -136,8 +136,8 @@ Format 4
|
||||
|
||||
#bind "F1" "help" # Not yet implemented!
|
||||
#bind "C-F1" "help-context" # Not yet implemented!
|
||||
#\bind "F2" "buffer-write"
|
||||
#\bind "F3" "file-open"
|
||||
\bind "F2" "buffer-write force"
|
||||
#\bind "F3" "file-open"
|
||||
#bind "F4" "------"
|
||||
#bind "F5" "------"
|
||||
#bind "F6" "------"
|
||||
|
@ -271,7 +271,7 @@ Format 4
|
||||
|
||||
#bind "F1" "help" # Not yet implemented!
|
||||
#bind "C-F1" "help-context" # Not yet implemented!
|
||||
\bind "F2" "buffer-write"
|
||||
\bind "F2" "buffer-write force"
|
||||
\bind "C-F4" "buffer-close"
|
||||
\bind "C-A-Up" "scroll line up"
|
||||
\bind "C-A-Down" "scroll line down"
|
||||
|
@ -130,7 +130,7 @@ Format 4
|
||||
|
||||
#bind "F1" "help" # Not yet implemented!
|
||||
#bind "C-F1" "help-context" # Not yet implemented!
|
||||
#\bind "F2" "buffer-write"
|
||||
\bind "F2" "buffer-write force"
|
||||
#\bind "F3" "file-open"
|
||||
#bind "F4" "------"
|
||||
#bind "F5" "------"
|
||||
|
@ -892,7 +892,8 @@ void LyXAction::init()
|
||||
* \li Notion: Saves the current buffer to disk, using the filename that
|
||||
is already associated with the buffer, asking for one if
|
||||
none is yet assigned.
|
||||
* \li Syntax: buffer-write
|
||||
* \li Syntax: buffer-write [force]
|
||||
* \li Params: force: write even if buffer is clean.
|
||||
* \endvar
|
||||
*/
|
||||
{ LFUN_BUFFER_WRITE, "buffer-write", ReadOnly, Buffer },
|
||||
|
@ -1996,7 +1996,9 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
|
||||
}
|
||||
|
||||
case LFUN_BUFFER_WRITE:
|
||||
enable = doc_buffer && (doc_buffer->isUnnamed() || !doc_buffer->isClean());
|
||||
enable = doc_buffer && (doc_buffer->isUnnamed()
|
||||
|| (!doc_buffer->isClean()
|
||||
|| cmd.argument() == "force"));
|
||||
break;
|
||||
|
||||
//FIXME: This LFUN should be moved to GuiApplication.
|
||||
|
Loading…
Reference in New Issue
Block a user