mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-14 20:26:50 +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 "Outline|O" "dialog-toggle toc"
|
||||||
Item "Start Appendix Here|A" "appendix"
|
Item "Start Appendix Here|A" "appendix"
|
||||||
Separator
|
Separator
|
||||||
Item "Embedded Files|E" "dialog-show embedding"
|
Item "Save in Bundled Format|F" "buffer-toggle-embedding"
|
||||||
Item "Compressed|m" "buffer-toggle-compression"
|
Item "Compressed|m" "buffer-toggle-compression"
|
||||||
Item "Settings...|S" "dialog-show document"
|
Item "Settings...|S" "dialog-show document"
|
||||||
End
|
End
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "CutAndPaste.h"
|
#include "CutAndPaste.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "DispatchResult.h"
|
#include "DispatchResult.h"
|
||||||
|
#include "EmbeddedFiles.h"
|
||||||
#include "ErrorList.h"
|
#include "ErrorList.h"
|
||||||
#include "factory.h"
|
#include "factory.h"
|
||||||
#include "FloatList.h"
|
#include "FloatList.h"
|
||||||
@ -918,6 +919,11 @@ FuncStatus BufferView::getStatus(FuncRequest const & cmd)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case LFUN_BUFFER_TOGGLE_EMBEDDING: {
|
||||||
|
flag.setOnOff(buffer_.params().embedded);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case LFUN_SCREEN_UP:
|
case LFUN_SCREEN_UP:
|
||||||
case LFUN_SCREEN_DOWN:
|
case LFUN_SCREEN_DOWN:
|
||||||
flag.enabled(true);
|
flag.enabled(true);
|
||||||
@ -1299,6 +1305,11 @@ Update::flags BufferView::dispatch(FuncRequest const & cmd)
|
|||||||
buffer_.params().compressed = !buffer_.params().compressed;
|
buffer_.params().compressed = !buffer_.params().compressed;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case LFUN_BUFFER_TOGGLE_EMBEDDING:
|
||||||
|
// turn embedding on/off
|
||||||
|
buffer_.embeddedFiles().enable(!buffer_.params().embedded);
|
||||||
|
break;
|
||||||
|
|
||||||
case LFUN_NEXT_INSET_TOGGLE: {
|
case LFUN_NEXT_INSET_TOGGLE: {
|
||||||
// this is the real function we want to invoke
|
// this is the real function we want to invoke
|
||||||
FuncRequest tmpcmd = FuncRequest(LFUN_INSET_TOGGLE, cmd.origin);
|
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_MODULE_ADD, "layout-module-add", Noop, Layout },
|
||||||
{ LFUN_LAYOUT_RELOAD, "layout-reload", Noop, Layout },
|
{ LFUN_LAYOUT_RELOAD, "layout-reload", Noop, Layout },
|
||||||
{ LFUN_INFO_INSERT, "info-insert", Noop, Edit },
|
{ LFUN_INFO_INSERT, "info-insert", Noop, Edit },
|
||||||
|
{ LFUN_BUFFER_TOGGLE_EMBEDDING, "buffer-toggle-embedding", Noop, Buffer },
|
||||||
|
|
||||||
{ LFUN_NOACTION, "", Noop, Hidden }
|
{ LFUN_NOACTION, "", Noop, Hidden }
|
||||||
};
|
};
|
||||||
|
@ -406,6 +406,7 @@ enum kb_action {
|
|||||||
LFUN_INFO_INSERT, // bpeng, 20071007
|
LFUN_INFO_INSERT, // bpeng, 20071007
|
||||||
// 295
|
// 295
|
||||||
LFUN_CALL, // broider, 20071002
|
LFUN_CALL, // broider, 20071002
|
||||||
|
LFUN_BUFFER_TOGGLE_EMBEDDING, // bpeng, 20071021
|
||||||
|
|
||||||
LFUN_LASTACTION // end of the table
|
LFUN_LASTACTION // end of the table
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user