"Bo Peng" <[EMAIL PROTECTED]> writes: | Dear all, | | Attached patch adds Document->compressed menu item that can | 1. reflect the compression status of the current document | 2. when turned on/off, the document will be saved compressed/decompressed. | | Please comment. We can apply, until we find a better place for this option.
I do not like where it is placed, but I have no better alternatives. | Index: src/lyxfunc.C | =================================================================== | --- src/lyxfunc.C (revision 13766) | +++ src/lyxfunc.C (working copy) | @@ -806,6 +812,16 @@ | menuNew(argument, true); | break; | | + case LFUN_COMPRESSION_STATUS: | + // turn compression on/off | + BOOST_ASSERT(owner->buffer()->params().compressed == flag.onoff(true)); | + if (flag.onoff(true)) | + owner->buffer()->params().compressed = false; | + else | + owner->buffer()->params().compressed = true; | + owner->buffer()->markDirty(); | + break; | + Should only markDirty if compressed actually changes state. -- Lgb