diff --git a/lib/ui/stdcontext.inc b/lib/ui/stdcontext.inc index a6a0504216..e358ce910a 100644 --- a/lib/ui/stdcontext.inc +++ b/lib/ui/stdcontext.inc @@ -336,6 +336,9 @@ Menuset Menu "context-edit" spellingsuggestions Separator + OptItem "Edit Externally..." "inset-edit" + OptItem "End Editing Externally..." "inset-end-edit" + Separator Item "Cut" "cut" Item "Copy" "copy" Item "Paste" "paste" @@ -651,9 +654,6 @@ Menuset Menu "context-ert" # repeat 1 is added as a work-around to not indicate this action as toggable Item "Wrap by Preview|y" "command-sequence repeat 1;inset-toggle;char-forward;char-backward;char-forward-select;preview-insert;char-backward;char-backward;inset-toggle" - Separator - OptItem "Edit Externally...|x" "inset-edit" - OptItem "End Editing Externally...|x" "inset-end-edit" End # diff --git a/src/insets/InsetCollapsible.h b/src/insets/InsetCollapsible.h index c0fbe3b6af..dac8440a5c 100644 --- a/src/insets/InsetCollapsible.h +++ b/src/insets/InsetCollapsible.h @@ -168,13 +168,13 @@ protected: Inset * editXY(Cursor & cur, int x, int y); /// mutable CollapseStatus status_; + /// + unique_ptr tempfile_; private: /// Dimension dimensionCollapsed(BufferView const & bv) const; /// docstring labelstring_; - /// - unique_ptr tempfile_; // These variables depend of the view in which the inset is displayed struct View diff --git a/src/insets/InsetERT.cpp b/src/insets/InsetERT.cpp index f18234344a..e3863ea09d 100644 --- a/src/insets/InsetERT.cpp +++ b/src/insets/InsetERT.cpp @@ -134,12 +134,6 @@ bool InsetERT::getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const { switch (cmd.action()) { - case LFUN_INSET_EDIT: - status.setEnabled(tempfile_ == 0); - return true; - case LFUN_INSET_END_EDIT: - status.setEnabled(tempfile_ != 0); - return true; case LFUN_INSET_INSERT: status.setEnabled(false); return true; diff --git a/src/insets/InsetERT.h b/src/insets/InsetERT.h index 3438a08903..30938e0ee0 100644 --- a/src/insets/InsetERT.h +++ b/src/insets/InsetERT.h @@ -71,8 +71,6 @@ private: bool allowSpellCheck() const { return false; } /// bool insetAllowed(InsetCode code) const { return code == QUOTE_CODE; } - /// - unique_ptr tempfile_; };