Add document->compressed menu item, by Bo Peng (ben.bob@gmail.com)

* src/LyXAction.C, src/lfuns.h: add LFUN_TOGGLE_COMPRESSION
	* src/BufferView_pimpl.C: react to menu item
	* lib/ui/stdmenus.ui: add buffer_toggle_compression



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@13779 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2006-04-28 16:29:45 +00:00
parent 9d509572db
commit 25f1d0553f
5 changed files with 21 additions and 3 deletions

View File

@ -380,6 +380,7 @@ Menuset
Item "LaTeX Preamble...|P" "dialog-show preamble"
Item "Start Appendix Here|A" "appendix"
Separator
Item "Compressed|o" "toggle-compression"
Item "Settings...|S" "dialog-show document"
End

View File

@ -1087,6 +1087,12 @@ FuncStatus BufferView::Pimpl::getStatus(FuncRequest const & cmd)
case LFUN_REJECT_ALL_CHANGES:
flag.enabled(buffer_ && buffer_->params().tracking_changes);
break;
case LFUN_TOGGLE_COMPRESSION: {
flag.setOnOff(buffer_->params().compressed);
break;
}
default:
flag.enabled(false);
}
@ -1335,6 +1341,12 @@ bool BufferView::Pimpl::dispatch(FuncRequest const & cmd)
Alert::information(_("Count words"), message);
}
break;
case LFUN_TOGGLE_COMPRESSION:
// turn compression on/off
buffer_->params().compressed = !buffer_->params().compressed;
break;
default:
return false;
}

View File

@ -110,6 +110,7 @@ void LyXAction::init()
{ LFUN_BEGINNINGBUFSEL, "buffer-begin-select", ReadOnly },
{ LFUN_CHILDOPEN, "buffer-child-open", ReadOnly },
{ LFUN_RUNCHKTEX, "buffer-chktex", ReadOnly },
{ LFUN_TOGGLE_COMPRESSION, "buffer-toggle-compression", Noop},
{ LFUN_CLOSEBUFFER, "buffer-close", ReadOnly },
{ LFUN_ENDBUF, "buffer-end", ReadOnly },
{ LFUN_ENDBUFSEL, "buffer-end-select", ReadOnly },

View File

@ -357,6 +357,7 @@ enum kb_action {
LFUN_BIBDB_ADD,
LFUN_BIBDB_DEL,
LFUN_INSERT_CITATION,
LFUN_TOGGLE_COMPRESSION, // bpeng 20060427
LFUN_LASTACTION // end of the table
};

View File

@ -24,13 +24,16 @@ What's new
- Update translations for German (User Guide, Extended Features) and
Hungarian (Introduction, splash document, new tutorial examples).
- add support for Austrian (new spelling) as document language.
- Add support for Austrian (new spelling) as document language.
- add "LaTeX (pdflatex)" output format. This new output format produces
- Add "LaTeX (pdflatex)" output format. This new output format produces
.tex files that are suitable for pdflatex, including figure conversion
to png, pdf or jpeg instead of eps.
- add biographynophoto style to IEEEtran.layout
- Add biographynophoto style to IEEEtran.layout.
- Add new function buffer-toggle-compression (and entry in Document
menu) to change whether the file will be compressed on disk or not.
** Bug fixes