>>>>> "Bo" == Bo Peng <[EMAIL PROTECTED]> writes:
Bo> When the menu item is selected, the status *is* changed and Bo> File->Save should be enabled. Bo> You just remind me that this menu item should be disabled for Bo> readonly file. New patch is attached. Remarks: 1/ You would have that for free by replacing + { LFUN_COMPRESSION_STATUS, "compression-status", ReadOnly}, by + { LFUN_COMPRESSION_STATUS, "compression-status", Noop}, This will handle disabling when doc is read only and handle markDirty too. 2/ I'd rather change the name to something like "buffer-toggle-compression", modeled after "buffer-toggle-readonly". This name is more explicit. 3/ The code in dispatch should not rely on the value of flag. I would write it simply as + case LFUN_COMPRESSION_STATUS: + // turn compression on/off + owner->buffer()->params().compressed = !owner->buffer()->params().compressed; + break; + 4/ Finally, the code to handle LFUN_COMPRESSION_STATUS should go to BufferView::Pimpl::dispatch because it is buffer-level code. I know there is some of this in lyxfunc already, but it should not be. With all these changes, I would accept this in 1.4 too (because the fact it cannot be changed is a bug). I would like also to have an adaptation of your patch to remove USE_COMPRESSION, if you can do that for me. JMarc