diff --git a/lib/ui/stdmenus.inc b/lib/ui/stdmenus.inc index 33d238f658..a3eebddb07 100644 --- a/lib/ui/stdmenus.inc +++ b/lib/ui/stdmenus.inc @@ -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 diff --git a/src/BufferView.cpp b/src/BufferView.cpp index c4f1ae7407..2b6820949c 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -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" @@ -917,6 +918,11 @@ FuncStatus BufferView::getStatus(FuncRequest const & cmd) flag.setOnOff(buffer_.params().compressed); break; } + + case LFUN_BUFFER_TOGGLE_EMBEDDING: { + flag.setOnOff(buffer_.params().embedded); + break; + } case LFUN_SCREEN_UP: case LFUN_SCREEN_DOWN: @@ -1298,6 +1304,11 @@ Update::flags BufferView::dispatch(FuncRequest const & cmd) // turn compression on/off 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 diff --git a/src/LyXAction.cpp b/src/LyXAction.cpp index 325252e423..dd248bc97e 100644 --- a/src/LyXAction.cpp +++ b/src/LyXAction.cpp @@ -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 } }; diff --git a/src/lfuns.h b/src/lfuns.h index 2948a6da1a..184021db73 100644 --- a/src/lfuns.h +++ b/src/lfuns.h @@ -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 };