mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-27 06:19:36 +00:00
Embedding: add LFUN_BUFFER_TOGGLE_EMBEDDING
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21106 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f8836d8b12
commit
b89d3f2cc2
@ -423,7 +423,7 @@ Menuset
|
||||
Item "Outline|O" "dialog-toggle toc"
|
||||
Item "Start Appendix Here|A" "appendix"
|
||||
Separator
|
||||
Item "Embedded Files|E" "dialog-show embedding"
|
||||
Item "Save in Bundled Format|F" "buffer-toggle-embedding"
|
||||
Item "Compressed|m" "buffer-toggle-compression"
|
||||
Item "Settings...|S" "dialog-show document"
|
||||
End
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "CutAndPaste.h"
|
||||
#include "debug.h"
|
||||
#include "DispatchResult.h"
|
||||
#include "EmbeddedFiles.h"
|
||||
#include "ErrorList.h"
|
||||
#include "factory.h"
|
||||
#include "FloatList.h"
|
||||
@ -918,6 +919,11 @@ FuncStatus BufferView::getStatus(FuncRequest const & cmd)
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_BUFFER_TOGGLE_EMBEDDING: {
|
||||
flag.setOnOff(buffer_.params().embedded);
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_SCREEN_UP:
|
||||
case LFUN_SCREEN_DOWN:
|
||||
flag.enabled(true);
|
||||
@ -1299,6 +1305,11 @@ Update::flags BufferView::dispatch(FuncRequest const & cmd)
|
||||
buffer_.params().compressed = !buffer_.params().compressed;
|
||||
break;
|
||||
|
||||
case LFUN_BUFFER_TOGGLE_EMBEDDING:
|
||||
// turn embedding on/off
|
||||
buffer_.embeddedFiles().enable(!buffer_.params().embedded);
|
||||
break;
|
||||
|
||||
case LFUN_NEXT_INSET_TOGGLE: {
|
||||
// this is the real function we want to invoke
|
||||
FuncRequest tmpcmd = FuncRequest(LFUN_INSET_TOGGLE, cmd.origin);
|
||||
|
@ -379,6 +379,7 @@ void LyXAction::init()
|
||||
{ LFUN_LAYOUT_MODULE_ADD, "layout-module-add", Noop, Layout },
|
||||
{ LFUN_LAYOUT_RELOAD, "layout-reload", Noop, Layout },
|
||||
{ LFUN_INFO_INSERT, "info-insert", Noop, Edit },
|
||||
{ LFUN_BUFFER_TOGGLE_EMBEDDING, "buffer-toggle-embedding", Noop, Buffer },
|
||||
|
||||
{ LFUN_NOACTION, "", Noop, Hidden }
|
||||
};
|
||||
|
@ -406,6 +406,7 @@ enum kb_action {
|
||||
LFUN_INFO_INSERT, // bpeng, 20071007
|
||||
// 295
|
||||
LFUN_CALL, // broider, 20071002
|
||||
LFUN_BUFFER_TOGGLE_EMBEDDING, // bpeng, 20071021
|
||||
|
||||
LFUN_LASTACTION // end of the table
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user