mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
fix LFUN enum values (some of them were broken by r13801)
adjust some commands according to the LyX naming conventions (toggle-tooltip => tooltip-toggle, *-change(s) => change(s)-*) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13811 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
39976d4a74
commit
1396ade8b1
@ -139,7 +139,7 @@
|
||||
\bind "M-~S-n b 4" "bookmark-goto 4"
|
||||
\bind "M-~S-n b 5" "bookmark-goto 5"
|
||||
|
||||
\bind "M-~S-h o" "toggle-tooltips"
|
||||
\bind "M-~S-h o" "tooltips-toggle"
|
||||
\bind "M-~S-h i" "help-open Intro"
|
||||
\bind "M-~S-h t" "help-open Tutorial"
|
||||
\bind "M-~S-h u" "help-open UserGuide"
|
||||
|
@ -75,7 +75,7 @@
|
||||
\bind "C-z" "undo"
|
||||
\bind "C-S-Z" "redo"
|
||||
|
||||
\bind "C-S-E" "track-changes" # it's what MS Word uses
|
||||
\bind "C-S-E" "changes-track" # it's what MS Word uses
|
||||
\bind "~S-M-quotedbl" "quote-insert single"
|
||||
\bind "~S-C-quotedbl" "self-insert \""
|
||||
\bind "C-minus" "hyphenation-point-insert"
|
||||
|
@ -64,7 +64,7 @@
|
||||
\bind "C-z" "undo"
|
||||
\bind "C-S-Z" "redo"
|
||||
|
||||
\bind "C-S-E" "track-changes" # it's what MS Word uses
|
||||
\bind "C-S-E" "changes-track" # it's what MS Word uses
|
||||
\bind "~S-M-quotedbl" "quote-insert single"
|
||||
\bind "~S-C-quotedbl" "self-insert \""
|
||||
\bind "C-minus" "hyphenation-point-insert"
|
||||
|
@ -320,11 +320,11 @@ Menuset
|
||||
End
|
||||
|
||||
Menu "edit_change"
|
||||
Item "Track Changes|T" "track-changes"
|
||||
Item "Merge Changes...|M" "merge-changes"
|
||||
Item "Accept All Changes|A" "accept-all-changes"
|
||||
Item "Reject All Changes|R" "reject-all-changes"
|
||||
Item "Show Changes in Output|S" "output-changes"
|
||||
Item "Track Changes|T" "changes-track"
|
||||
Item "Merge Changes...|M" "changes-merge"
|
||||
Item "Accept All Changes|A" "all-changes-accept"
|
||||
Item "Reject All Changes|R" "all-changes-reject"
|
||||
Item "Show Changes in Output|S" "changes-output"
|
||||
|
||||
End
|
||||
#
|
||||
@ -402,7 +402,7 @@ Menuset
|
||||
# HELP MENU
|
||||
#
|
||||
Menu "help"
|
||||
Item "Tooltips|o" "toggle-tooltips"
|
||||
Item "Tooltips|o" "tooltips-toggle"
|
||||
Separator
|
||||
Item "Introduction|I" "help-open Intro"
|
||||
Item "Tutorial|T" "help-open Tutorial"
|
||||
|
@ -215,7 +215,7 @@ Menuset
|
||||
# A common feature request JMarc wants to see
|
||||
# Item "Open All Footnotes|F" "open-footnotes"
|
||||
# Item "Close All Footnotes|C" "close-footnotes"
|
||||
Item "Display Tooltips|i" "toggle-tooltips"
|
||||
Item "Display Tooltips|i" "tooltips-toggle"
|
||||
Separator
|
||||
Item "View source|s" "dialog-show view-source"
|
||||
Submenu "Update|U" "document_update"
|
||||
@ -386,11 +386,11 @@ Menuset
|
||||
End
|
||||
|
||||
Menu "edit_change"
|
||||
Item "Track Changes|T" "track-changes"
|
||||
Item "Merge Changes...|M" "merge-changes"
|
||||
Item "Accept All Changes|A" "accept-all-changes"
|
||||
Item "Reject All Changes|R" "reject-all-changes"
|
||||
Item "Show Changes in Output|S" "output-changes"
|
||||
Item "Track Changes|T" "changes-track"
|
||||
Item "Merge Changes...|M" "changes-merge"
|
||||
Item "Accept All Changes|A" "all-changes-accept"
|
||||
Item "Reject All Changes|R" "all-changes-reject"
|
||||
Item "Show Changes in Output|S" "changes-output"
|
||||
End
|
||||
|
||||
#
|
||||
|
@ -1103,12 +1103,12 @@ FuncStatus BufferView::Pimpl::getStatus(FuncRequest const & cmd)
|
||||
case LFUN_BOOKMARK_GOTO:
|
||||
flag.enabled(isSavedPosition(convert<unsigned int>(cmd.argument)));
|
||||
break;
|
||||
case LFUN_TRACK_CHANGES:
|
||||
case LFUN_CHANGES_TRACK:
|
||||
flag.enabled(true);
|
||||
flag.setOnOff(buffer_->params().tracking_changes);
|
||||
break;
|
||||
|
||||
case LFUN_OUTPUT_CHANGES: {
|
||||
case LFUN_CHANGES_OUTPUT: {
|
||||
OutputParams runparams;
|
||||
LaTeXFeatures features(*buffer_, buffer_->params(), runparams);
|
||||
flag.enabled(buffer_ && buffer_->params().tracking_changes
|
||||
@ -1117,11 +1117,11 @@ FuncStatus BufferView::Pimpl::getStatus(FuncRequest const & cmd)
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_MERGE_CHANGES:
|
||||
case LFUN_ACCEPT_CHANGE: // what about these two
|
||||
case LFUN_REJECT_CHANGE: // what about these two
|
||||
case LFUN_ACCEPT_ALL_CHANGES:
|
||||
case LFUN_REJECT_ALL_CHANGES:
|
||||
case LFUN_CHANGES_MERGE:
|
||||
case LFUN_CHANGE_ACCEPT: // what about these two
|
||||
case LFUN_CHANGE_REJECT: // what about these two
|
||||
case LFUN_ALL_CHANGES_ACCEPT:
|
||||
case LFUN_ALL_CHANGES_REJECT:
|
||||
flag.enabled(buffer_ && buffer_->params().tracking_changes);
|
||||
break;
|
||||
|
||||
@ -1275,22 +1275,22 @@ bool BufferView::Pimpl::dispatch(FuncRequest const & cmd)
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_TRACK_CHANGES:
|
||||
case LFUN_CHANGES_TRACK:
|
||||
trackChanges();
|
||||
break;
|
||||
|
||||
case LFUN_OUTPUT_CHANGES: {
|
||||
case LFUN_CHANGES_OUTPUT: {
|
||||
bool const state = buffer_->params().output_changes;
|
||||
buffer_->params().output_changes = !state;
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_MERGE_CHANGES:
|
||||
case LFUN_CHANGES_MERGE:
|
||||
if (lyx::find::findNextChange(bv_))
|
||||
owner_->getDialogs().show("changes");
|
||||
break;
|
||||
|
||||
case LFUN_ACCEPT_ALL_CHANGES: {
|
||||
case LFUN_ALL_CHANGES_ACCEPT: {
|
||||
cursor_.reset(buffer_->inset());
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning FIXME changes
|
||||
@ -1301,7 +1301,7 @@ bool BufferView::Pimpl::dispatch(FuncRequest const & cmd)
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_REJECT_ALL_CHANGES: {
|
||||
case LFUN_ALL_CHANGES_REJECT: {
|
||||
cursor_.reset(buffer_->inset());
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning FIXME changes
|
||||
|
@ -97,29 +97,28 @@ void LyXAction::init()
|
||||
{ LFUN_ACCENT_UNDERBAR, "accent-underbar", Noop },
|
||||
{ LFUN_ACCENT_UNDERDOT, "accent-underdot", Noop },
|
||||
{ LFUN_APPENDIX, "appendix", Noop },
|
||||
{ LFUN_BACKWARD_SELECT, "backward-select", ReadOnly | SingleParUpdate },
|
||||
{ LFUN_BOOKMARK_GOTO, "bookmark-goto", ReadOnly },
|
||||
{ LFUN_BOOKMARK_SAVE, "bookmark-save", ReadOnly },
|
||||
{ LFUN_BREAK_LINE, "break-line", Noop },
|
||||
{ LFUN_BREAK_PARAGRAPH, "break-paragraph", Noop },
|
||||
{ LFUN_BREAK_PARAGRAPHKEEPLAYOUT, "break-paragraph-keep-layout", Noop },
|
||||
{ LFUN_BREAK_PARAGRAPH_KEEP_LAYOUT, "break-paragraph-keep-layout", Noop },
|
||||
{ LFUN_BREAK_PARAGRAPH_SKIP, "break-paragraph-skip", Noop },
|
||||
{ LFUN_BUILD_PROGRAM, "build-program", ReadOnly },
|
||||
{ LFUN_BUFFER_AUTO_SAVE, "buffer-auto-save", Noop },
|
||||
{ LFUN_BUFFER_BEGIN, "buffer-begin", ReadOnly },
|
||||
{ LFUN_BUFFER_BEGINSEL, "buffer-begin-select", ReadOnly },
|
||||
{ LFUN_BUFFER_BEGIN_SELECT, "buffer-begin-select", ReadOnly },
|
||||
{ LFUN_BUFFER_CHILD_OPEN, "buffer-child-open", ReadOnly },
|
||||
{ LFUN_BUFFER_CHKTEX, "buffer-chktex", ReadOnly },
|
||||
{ LFUN_BUFFER_TOGGLE_COMPRESSION, "buffer-toggle-compression", Noop},
|
||||
{ LFUN_BUFFER_CLOSE, "buffer-close", ReadOnly },
|
||||
{ LFUN_BUFFER_END, "buffer-end", ReadOnly },
|
||||
{ LFUN_BUFFER_ENDSEL, "buffer-end-select", ReadOnly },
|
||||
{ LFUN_BUFFER_END_SELECT, "buffer-end-select", ReadOnly },
|
||||
{ LFUN_BUFFER_EXPORT, "buffer-export", ReadOnly },
|
||||
{ LFUN_BUFFER_EXPORT_CUSTOM, "buffer-export-custom", ReadOnly },
|
||||
{ LFUN_BUFFER_PRINT, "buffer-print", ReadOnly },
|
||||
{ LFUN_BUFFER_IMPORT, "buffer-import", NoBuffer },
|
||||
{ LFUN_BUFFER_NEW, "buffer-new", NoBuffer },
|
||||
{ LFUN_BUFFER_NEWTMPLT,"buffer-new-template", NoBuffer },
|
||||
{ LFUN_BUFFER_NEW_TEMPLATE,"buffer-new-template", NoBuffer },
|
||||
{ LFUN_BUFFER_RELOAD, "buffer-reload", ReadOnly },
|
||||
{ LFUN_BUFFER_SWITCH, "buffer-switch", ReadOnly },
|
||||
{ LFUN_BUFFER_TOGGLE_READ_ONLY, "buffer-toggle-read-only", ReadOnly },
|
||||
@ -130,16 +129,18 @@ void LyXAction::init()
|
||||
{ LFUN_CANCEL, "cancel", NoBuffer },
|
||||
{ LFUN_CAPTION_INSERT, "caption-insert", Noop },
|
||||
{ LFUN_CHAR_BACKWARD, "char-backward", ReadOnly | NoUpdate},
|
||||
{ LFUN_CHAR_BACKWARD_SELECT, "backward-select", ReadOnly | SingleParUpdate },
|
||||
{ LFUN_CHAR_DELETE_BACKWARD, "delete-backward", SingleParUpdate },
|
||||
{ LFUN_CHAR_DELETE_FORWARD, "delete-forward", SingleParUpdate },
|
||||
{ LFUN_CHAR_FORWARD, "char-forward", ReadOnly | NoUpdate},
|
||||
{ LFUN_CHAR_FORWARD_SELECT, "forward-select", ReadOnly | SingleParUpdate },
|
||||
{ LFUN_COMMAND_EXECUTE, "command-execute", NoBuffer },
|
||||
{ LFUN_COMMAND_PREFIX, "command-prefix", NoBuffer },
|
||||
{ LFUN_COMMAND_SEQUENCE, "command-sequence", NoBuffer },
|
||||
{ LFUN_COPY, "copy", ReadOnly },
|
||||
{ LFUN_CUT, "cut", Noop },
|
||||
{ LFUN_DATE_INSERT, "date-insert", Noop },
|
||||
{ LFUN_DELETE_FORWARD_BACKWARD, "delete-backward", SingleParUpdate },
|
||||
{ LFUN_DELETE_FORWARD_BACKWARD_SKIP, "delete-backward-skip", Noop },
|
||||
{ LFUN_DELETE_FORWARD, "delete-forward", SingleParUpdate },
|
||||
{ LFUN_DELETE_BACKWARD_SKIP, "delete-backward-skip", Noop },
|
||||
{ LFUN_DELETE_FORWARD_SKIP, "delete-forward-skip", Noop },
|
||||
{ LFUN_DEPTH_DECREMENT, "depth-decrement", Noop },
|
||||
{ LFUN_DEPTH_INCREMENT, "depth-increment", Noop },
|
||||
@ -147,7 +148,7 @@ void LyXAction::init()
|
||||
{ LFUN_DOWN, "down", ReadOnly | NoUpdate },
|
||||
{ LFUN_DOWN_SELECT, "down-select", ReadOnly | SingleParUpdate },
|
||||
{ LFUN_DROP_LAYOUTS_CHOICE, "drop-layouts-choice", ReadOnly },
|
||||
{ LFUN_LINE_END_OF_SENTENCE_PERIOD_INSERT, "end-of-sentence-period-insert", Noop },
|
||||
{ LFUN_END_OF_SENTENCE_PERIOD_INSERT, "end-of-sentence-period-insert", Noop },
|
||||
{ LFUN_ENVIRONMENT_INSERT, "environment-insert", Noop },
|
||||
{ LFUN_ERROR_NEXT, "error-next", ReadOnly },
|
||||
{ LFUN_ERT_INSERT, "ert-insert", Noop },
|
||||
@ -174,7 +175,6 @@ void LyXAction::init()
|
||||
{ LFUN_FONT_STATE, "font-state", ReadOnly },
|
||||
{ LFUN_FONT_UNDERLINE, "font-underline", Noop },
|
||||
{ LFUN_FOOTNOTE_INSERT, "footnote-insert", Noop },
|
||||
{ LFUN_CHAR_FORWARDSEL, "forward-select", ReadOnly | SingleParUpdate },
|
||||
{ LFUN_HFILL_INSERT, "hfill-insert", Noop },
|
||||
{ LFUN_HELP_OPEN, "help-open", NoBuffer | Argument},
|
||||
{ LFUN_HTML_INSERT, "html-insert", Noop },
|
||||
@ -199,10 +199,10 @@ void LyXAction::init()
|
||||
{ LFUN_LAYOUT_PARAGRAPH, "layout-paragraph", ReadOnly },
|
||||
{ LFUN_LAYOUT_TABULAR, "layout-tabular", Noop },
|
||||
{ LFUN_LINE_BEGIN, "line-begin", ReadOnly | NoUpdate},
|
||||
{ LFUN_LINE_BEGINSEL, "line-begin-select", ReadOnly | SingleParUpdate },
|
||||
{ LFUN_DELETE_FORWARD_LINE_FORWARD, "line-delete-forward", Noop },
|
||||
{ LFUN_LINE_BEGIN_SELECT, "line-begin-select", ReadOnly | SingleParUpdate },
|
||||
{ LFUN_LINE_DELETE, "line-delete-forward", Noop }, // there is no line-delete-backward
|
||||
{ LFUN_LINE_END, "line-end", ReadOnly | NoUpdate},
|
||||
{ LFUN_LINE_ENDSEL, "line-end-select", ReadOnly | SingleParUpdate },
|
||||
{ LFUN_LINE_END_SELECT, "line-end-select", ReadOnly | SingleParUpdate },
|
||||
#if 0
|
||||
{ LFUN_LIST_INSERT, "list-insert", Noop },
|
||||
#endif
|
||||
@ -237,10 +237,10 @@ void LyXAction::init()
|
||||
{ LFUN_BOX_INSERT, "box-insert", Noop },
|
||||
{ LFUN_NOTE_NEXT, "note-next", ReadOnly },
|
||||
{ LFUN_INSET_TOGGLE, "", ReadOnly },
|
||||
{ LFUN_SCREEN_DOWN_INSET_TOGGLE, "next-inset-toggle", ReadOnly },
|
||||
{ LFUN_NEXT_INSET_TOGGLE, "next-inset-toggle", ReadOnly },
|
||||
{ LFUN_ALL_INSETS_TOGGLE, "all-insets-toggle", ReadOnly },
|
||||
{ LFUN_PARAGRAPH_DOWN, "paragraph-down", ReadOnly | NoUpdate},
|
||||
{ LFUN_PARAGRAPH_DOWNSEL, "paragraph-down-select", ReadOnly },
|
||||
{ LFUN_PARAGRAPH_DOWN_SELECT, "paragraph-down-select", ReadOnly },
|
||||
{ LFUN_PARAGRAPH_GOTO, "paragraph-goto", ReadOnly },
|
||||
{ LFUN_OUTLINE_UP, "outline-up", Noop },
|
||||
{ LFUN_OUTLINE_DOWN, "outline-down", Noop },
|
||||
@ -248,7 +248,7 @@ void LyXAction::init()
|
||||
{ LFUN_OUTLINE_OUT, "outline-out", Noop },
|
||||
{ LFUN_PARAGRAPH_SPACING, "paragraph-spacing", Noop },
|
||||
{ LFUN_PARAGRAPH_UP, "paragraph-up", ReadOnly | NoUpdate},
|
||||
{ LFUN_PARAGRAPH_UPSEL, "paragraph-up-select", ReadOnly },
|
||||
{ LFUN_PARAGRAPH_UP_SELECT, "paragraph-up-select", ReadOnly },
|
||||
{ LFUN_PASTE, "paste", Noop },
|
||||
{ LFUN_PREFERENCES_SAVE, "preferences-save", NoBuffer },
|
||||
{ LFUN_PRIMARY_SELECTION_PASTE, "primary-selection-paste", Noop },
|
||||
@ -258,11 +258,11 @@ void LyXAction::init()
|
||||
{ LFUN_LABEL_GOTO, "label-goto", ReadOnly },
|
||||
{ LFUN_REFERENCE_NEXT, "reference-next", ReadOnly },
|
||||
{ LFUN_SCREEN_DOWN, "screen-down", ReadOnly | NoUpdate},
|
||||
{ LFUN_SCREEN_DOWNSEL, "screen-down-select", ReadOnly },
|
||||
{ LFUN_SCREEN_DOWN_SELECT, "screen-down-select", ReadOnly },
|
||||
{ LFUN_SCREEN_FONT_UPDATE, "screen-font-update", NoBuffer },
|
||||
{ LFUN_SCREEN_RECENTER, "screen-recenter", ReadOnly },
|
||||
{ LFUN_SCREEN_UP, "screen-up", ReadOnly | NoUpdate},
|
||||
{ LFUN_SCREEN_UPSEL, "screen-up-select", ReadOnly },
|
||||
{ LFUN_SCREEN_UP_SELECT, "screen-up-select", ReadOnly },
|
||||
{ LFUN_INSET_SCROLL, "inset-scroll", ReadOnly },
|
||||
{ LFUN_SELF_INSERT, "self-insert", SingleParUpdate },
|
||||
{ LFUN_SPACE_INSERT, "space-insert", Noop },
|
||||
@ -297,14 +297,14 @@ void LyXAction::init()
|
||||
{ LFUN_VC_REVERT, "vc-revert", ReadOnly },
|
||||
{ LFUN_VC_UNDO_LAST, "vc-undo-last", ReadOnly },
|
||||
{ LFUN_WORD_BACKWARD, "word-backward", ReadOnly | NoUpdate},
|
||||
{ LFUN_WORD_BACKWARDSEL, "word-backward-select", ReadOnly | SingleParUpdate },
|
||||
{ LFUN_WORD_BACKWARD_SELECT, "word-backward-select", ReadOnly | SingleParUpdate },
|
||||
{ LFUN_WORD_CAPITALIZE, "word-capitalize", Noop },
|
||||
{ LFUN_DELETE_FORWARD_WORD_BACKWARD, "word-delete-backward", Noop },
|
||||
{ LFUN_DELETE_FORWARD_WORD_FORWARD, "word-delete-forward", Noop },
|
||||
{ LFUN_WORD_DELETE_BACKWARD, "word-delete-backward", Noop },
|
||||
{ LFUN_WORD_DELETE_FORWARD, "word-delete-forward", Noop },
|
||||
{ LFUN_WORD_FIND_BACKWARD, "word-find-backward", ReadOnly },
|
||||
{ LFUN_WORD_FIND_FORWARD, "word-find-forward", ReadOnly },
|
||||
{ LFUN_WORD_FORWARD, "word-forward", ReadOnly | NoUpdate},
|
||||
{ LFUN_WORD_FORWARDSEL, "word-forward-select", ReadOnly | SingleParUpdate },
|
||||
{ LFUN_WORD_FORWARD_SELECT, "word-forward-select", ReadOnly | SingleParUpdate },
|
||||
{ LFUN_WORD_LOWCASE, "word-lowcase", Noop },
|
||||
{ LFUN_WORD_SELECT, "word-select", ReadOnly },
|
||||
{ LFUN_WORD_UPCASE, "word-upcase", Noop },
|
||||
@ -312,14 +312,14 @@ void LyXAction::init()
|
||||
{ LFUN_CHARS_TRANSPOSE, "chars-transpose", Noop },
|
||||
{ LFUN_FLOAT_LIST, "float-list", Noop },
|
||||
{ LFUN_ESCAPE, "escape", ReadOnly },
|
||||
{ LFUN_TOGGLE_TOOLTIPS, "toggle-tooltips", NoBuffer },
|
||||
{ LFUN_TRACK_CHANGES, "track-changes", Noop },
|
||||
{ LFUN_OUTPUT_CHANGES, "output-changes", Noop },
|
||||
{ LFUN_MERGE_CHANGES, "merge-changes", Noop },
|
||||
{ LFUN_ACCEPT_CHANGE, "accept-change", Noop },
|
||||
{ LFUN_REJECT_CHANGE, "reject-change", Noop },
|
||||
{ LFUN_ACCEPT_ALL_CHANGES, "accept-all-changes", Noop },
|
||||
{ LFUN_REJECT_ALL_CHANGES, "reject-all-changes", Noop },
|
||||
{ LFUN_TOOLTIPS_TOGGLE, "tooltips-toggle", NoBuffer },
|
||||
{ LFUN_CHANGES_TRACK, "changes-track", Noop },
|
||||
{ LFUN_CHANGES_OUTPUT, "changes-output", Noop },
|
||||
{ LFUN_CHANGES_MERGE, "changes-merge", Noop },
|
||||
{ LFUN_CHANGE_ACCEPT, "change-accept", Noop },
|
||||
{ LFUN_CHANGE_REJECT, "change-reject", Noop },
|
||||
{ LFUN_ALL_CHANGES_ACCEPT, "all-changes-accept", Noop },
|
||||
{ LFUN_ALL_CHANGES_REJECT, "all-changes-reject", Noop },
|
||||
{ LFUN_DIALOG_SHOW, "dialog-show", NoBuffer },
|
||||
{ LFUN_DIALOG_SHOW_NEW_INSET, "dialog-show-new-inset", Noop },
|
||||
{ LFUN_DIALOG_SHOW_NEXT_INSET, "dialog-show-next-inset", Noop },
|
||||
@ -346,7 +346,7 @@ void LyXAction::init()
|
||||
{ LFUN_BUFFER_PARAMS_APPLY, "buffer-params-apply", Noop },
|
||||
{ LFUN_LYXRC_APPLY, "lyxrc-apply", NoBuffer },
|
||||
{ LFUN_INSET_REFRESH, "", Noop },
|
||||
{ LFUN_SCREEN_DOWNBUFFER, "buffer-next", ReadOnly },
|
||||
{ LFUN_BUFFER_NEXT, "buffer-next", ReadOnly },
|
||||
{ LFUN_BUFFER_PREVIOUS, "buffer-previous", ReadOnly },
|
||||
{ LFUN_WORDS_COUNT, "words-count", ReadOnly },
|
||||
{ LFUN_FINISHED_RIGHT, "", ReadOnly },
|
||||
|
@ -77,14 +77,14 @@ string const ControlChanges::getChangeAuthor()
|
||||
|
||||
bool ControlChanges::accept()
|
||||
{
|
||||
kernel().dispatch(FuncRequest(LFUN_ACCEPT_CHANGE));
|
||||
kernel().dispatch(FuncRequest(LFUN_CHANGE_ACCEPT));
|
||||
return find::findNextChange(kernel().bufferview());
|
||||
}
|
||||
|
||||
|
||||
bool ControlChanges::reject()
|
||||
{
|
||||
kernel().dispatch(FuncRequest(LFUN_REJECT_CHANGE));
|
||||
kernel().dispatch(FuncRequest(LFUN_CHANGE_REJECT));
|
||||
return find::findNextChange(kernel().bufferview());
|
||||
}
|
||||
|
||||
|
@ -64,8 +64,8 @@ Gtk::BuiltinStockID getGTKStockIcon(FuncRequest const & func)
|
||||
case LFUN_LABEL_GOTO:
|
||||
case LFUN_BOOKMARK_GOTO: return Gtk::Stock::JUMP_TO;
|
||||
case LFUN_NOTE_NEXT: return Gtk::Stock::GO_FORWARD;
|
||||
case LFUN_ACCEPT_ALL_CHANGES: return Gtk::Stock::APPLY;
|
||||
case LFUN_REJECT_ALL_CHANGES: return Gtk::Stock::CANCEL;
|
||||
case LFUN_ALL_CHANGES_ACCEPT: return Gtk::Stock::APPLY;
|
||||
case LFUN_ALL_CHANGES_REJECT: return Gtk::Stock::CANCEL;
|
||||
case LFUN_DIALOG_SHOW:
|
||||
if (func.argument == "findreplace")
|
||||
return Gtk::Stock::FIND_AND_REPLACE;
|
||||
@ -142,7 +142,7 @@ Glib::ustring getGTKThemeIcon(FuncRequest const & func)
|
||||
case LFUN_BOOKMARK_SAVE: return "stock_add-bookmark";
|
||||
case LFUN_NOTE_INSERT: return "stock_insert-note";
|
||||
case LFUN_LAYOUT_PARAGRAPH: return "stock_format-paragraph";
|
||||
case LFUN_BUFFER_NEWTMPLT: return "stock_new-template";
|
||||
case LFUN_BUFFER_NEW_TEMPLATE: return "stock_new-template";
|
||||
//case LFUN_ERT_INSERT: return "gnome-mime-application-x-tex";
|
||||
}
|
||||
return "";
|
||||
|
@ -165,7 +165,7 @@ FuncStatus lyx_gui::getStatus(FuncRequest const & ev)
|
||||
if (ev.argument == "preamble")
|
||||
flag.unknown(true);
|
||||
break;
|
||||
case LFUN_TOGGLE_TOOLTIPS:
|
||||
case LFUN_TOOLTIPS_TOGGLE:
|
||||
flag.unknown(true);
|
||||
break;
|
||||
default:
|
||||
|
@ -318,7 +318,7 @@ FuncStatus getStatus(FuncRequest const & ev)
|
||||
if (ev.argument == "preamble")
|
||||
flag.unknown(true);
|
||||
break;
|
||||
case LFUN_TOGGLE_TOOLTIPS:
|
||||
case LFUN_TOOLTIPS_TOGGLE:
|
||||
flag.unknown(true);
|
||||
break;
|
||||
default:
|
||||
|
@ -312,7 +312,7 @@ FuncStatus getStatus(FuncRequest const & ev)
|
||||
if (ev.argument == "preamble")
|
||||
flag.unknown(true);
|
||||
break;
|
||||
case LFUN_TOGGLE_TOOLTIPS:
|
||||
case LFUN_TOOLTIPS_TOGGLE:
|
||||
flag.unknown(true);
|
||||
break;
|
||||
default:
|
||||
|
@ -254,7 +254,7 @@ bool InsetCharStyle::getStatus(LCursor & cur, FuncRequest const & cmd,
|
||||
switch (cmd.action) {
|
||||
// paragraph breaks not allowed in charstyle insets
|
||||
case LFUN_BREAK_PARAGRAPH:
|
||||
case LFUN_BREAK_PARAGRAPHKEEPLAYOUT:
|
||||
case LFUN_BREAK_PARAGRAPH_KEEP_LAYOUT:
|
||||
case LFUN_BREAK_PARAGRAPH_SKIP:
|
||||
status.enabled(false);
|
||||
return true;
|
||||
|
@ -310,7 +310,7 @@ bool InsetERT::getStatus(LCursor & cur, FuncRequest const & cmd,
|
||||
case LFUN_DEPTH_DECREMENT:
|
||||
case LFUN_DEPTH_INCREMENT:
|
||||
case LFUN_DOTS_INSERT:
|
||||
case LFUN_LINE_END_OF_SENTENCE_PERIOD_INSERT:
|
||||
case LFUN_END_OF_SENTENCE_PERIOD_INSERT:
|
||||
case LFUN_ENVIRONMENT_INSERT:
|
||||
case LFUN_ERT_INSERT:
|
||||
case LFUN_FILE_INSERT:
|
||||
|
@ -507,7 +507,7 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd)
|
||||
cur.selection() = false;
|
||||
break;
|
||||
|
||||
case LFUN_CHAR_FORWARDSEL:
|
||||
case LFUN_CHAR_FORWARD_SELECT:
|
||||
case LFUN_CHAR_FORWARD:
|
||||
cell(cur.idx())->dispatch(cur, cmd);
|
||||
if (!cur.result().dispatched()) {
|
||||
@ -519,7 +519,7 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd)
|
||||
}
|
||||
break;
|
||||
|
||||
case LFUN_BACKWARD_SELECT:
|
||||
case LFUN_CHAR_BACKWARD_SELECT:
|
||||
case LFUN_CHAR_BACKWARD:
|
||||
cell(cur.idx())->dispatch(cur, cmd);
|
||||
if (!cur.result().dispatched()) {
|
||||
@ -644,8 +644,8 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd)
|
||||
cell(cur.idx())->dispatch(cur, cmd);
|
||||
break;
|
||||
|
||||
case LFUN_DELETE_FORWARD_BACKWARD:
|
||||
case LFUN_DELETE_FORWARD:
|
||||
case LFUN_CHAR_DELETE_BACKWARD:
|
||||
case LFUN_CHAR_DELETE_FORWARD:
|
||||
if (tablemode(cur)) {
|
||||
recordUndoInset(cur, Undo::DELETE);
|
||||
cutSelection(cur);
|
||||
@ -975,7 +975,7 @@ bool InsetTabular::getStatus(LCursor & cur, FuncRequest const & cmd,
|
||||
// disable in non-fixed-width cells
|
||||
case LFUN_BREAK_LINE:
|
||||
case LFUN_BREAK_PARAGRAPH:
|
||||
case LFUN_BREAK_PARAGRAPHKEEPLAYOUT:
|
||||
case LFUN_BREAK_PARAGRAPH_KEEP_LAYOUT:
|
||||
case LFUN_BREAK_PARAGRAPH_SKIP: {
|
||||
if (tabular.getPWidth(cur.idx()).zero()) {
|
||||
status.enabled(false);
|
||||
|
76
src/lfuns.h
76
src/lfuns.h
@ -84,30 +84,30 @@ enum kb_action {
|
||||
LFUN_BUFFER_BEGIN,
|
||||
// 45
|
||||
LFUN_BUFFER_END,
|
||||
LFUN_CHAR_FORWARDSEL,
|
||||
LFUN_BACKWARD_SELECT,
|
||||
LFUN_CHAR_FORWARD_SELECT,
|
||||
LFUN_CHAR_BACKWARD_SELECT,
|
||||
LFUN_UP_SELECT,
|
||||
LFUN_DOWN_SELECT,
|
||||
// 50
|
||||
LFUN_SCREEN_UPSEL,
|
||||
LFUN_SCREEN_DOWNSEL,
|
||||
LFUN_LINE_BEGINSEL,
|
||||
LFUN_LINE_ENDSEL,
|
||||
LFUN_WORD_FORWARDSEL,
|
||||
LFUN_SCREEN_UP_SELECT,
|
||||
LFUN_SCREEN_DOWN_SELECT,
|
||||
LFUN_LINE_BEGIN_SELECT,
|
||||
LFUN_LINE_END_SELECT,
|
||||
LFUN_WORD_FORWARD_SELECT,
|
||||
// 55
|
||||
LFUN_WORD_BACKWARDSEL,
|
||||
LFUN_WORD_BACKWARD_SELECT,
|
||||
LFUN_WORD_SELECT,
|
||||
LFUN_BUFFER_BEGINSEL,
|
||||
LFUN_BUFFER_ENDSEL,
|
||||
LFUN_BUFFER_BEGIN_SELECT,
|
||||
LFUN_BUFFER_END_SELECT,
|
||||
LFUN_SPACE_INSERT, // JSpitzm 20030520
|
||||
// 60
|
||||
LFUN_MARK_TOGGLE,
|
||||
LFUN_DELETE_FORWARD,
|
||||
LFUN_DELETE_FORWARD_BACKWARD,
|
||||
LFUN_CHAR_DELETE_FORWARD,
|
||||
LFUN_CHAR_DELETE_BACKWARD,
|
||||
LFUN_BREAK_LINE,
|
||||
LFUN_BREAK_PARAGRAPH,
|
||||
// 65
|
||||
LFUN_BREAK_PARAGRAPHKEEPLAYOUT,
|
||||
LFUN_BREAK_PARAGRAPH_KEEP_LAYOUT,
|
||||
LFUN_QUOTE_INSERT,
|
||||
LFUN_ACCENT_CIRCUMFLEX,
|
||||
LFUN_MATH_SUBSCRIPT,
|
||||
@ -169,9 +169,9 @@ enum kb_action {
|
||||
// 115
|
||||
LFUN_MATH_IMPORT_SELECTION, // Andre' 20010704
|
||||
LFUN_MATH_SPACE, // Andre' 20010725
|
||||
LFUN_DELETE_FORWARD_WORD_FORWARD,
|
||||
LFUN_DELETE_FORWARD_WORD_BACKWARD,
|
||||
LFUN_DELETE_FORWARD_LINE_FORWARD,
|
||||
LFUN_WORD_DELETE_FORWARD,
|
||||
LFUN_WORD_DELETE_BACKWARD,
|
||||
LFUN_LINE_DELETE,
|
||||
// 120
|
||||
LFUN_MARK_OFF,
|
||||
LFUN_MARK_ON,
|
||||
@ -205,35 +205,35 @@ enum kb_action {
|
||||
// 145
|
||||
LFUN_FILE_OPEN,
|
||||
LFUN_PARAGRAPH_UP, // Asger 1996-10-01
|
||||
LFUN_PARAGRAPH_UPSEL, // Asger 1996-10-01
|
||||
LFUN_PARAGRAPH_UP_SELECT, // Asger 1996-10-01
|
||||
LFUN_PARAGRAPH_DOWN, // Asger 1996-10-01
|
||||
LFUN_PARAGRAPH_DOWNSEL, // Asger 1996-10-01
|
||||
LFUN_PARAGRAPH_DOWN_SELECT, // Asger 1996-10-01
|
||||
// 150
|
||||
LFUN_BREAK_PARAGRAPH_SKIP,
|
||||
LFUN_DELETE_FORWARD_BACKWARD_SKIP,
|
||||
LFUN_DELETE_BACKWARD_SKIP,
|
||||
LFUN_DELETE_FORWARD_SKIP,
|
||||
LFUN_BUFFER_NEWTMPLT, // Asger 1997-02-02
|
||||
LFUN_BUFFER_RELOAD, // Asger 1997-02-02
|
||||
LFUN_BUFFER_NEW_TEMPLATE, // Asger 1997-02-02
|
||||
LFUN_BUFFER_RELOAD, // Asger 1997-02-02
|
||||
// 155
|
||||
LFUN_RECONFIGURE, // Asger 1997-02-14
|
||||
LFUN_INDEX_PRINT, // Lgb 97-02-27
|
||||
LFUN_CELL_SPLIT,
|
||||
LFUN_BUFFER_CHILD_OPEN, // Ale 970528
|
||||
LFUN_BUFFER_CHILD_OPEN, // Ale 970528
|
||||
LFUN_TOC_INSERT, // Lgb 97-05-27
|
||||
// 160
|
||||
LFUN_FLOAT_LIST, // Lgb 20010503
|
||||
LFUN_BUFFER_TOGGLE_READ_ONLY, // Lgb 97-05-27
|
||||
LFUN_VC_REGISTER, // Lgb 97-07-01
|
||||
LFUN_VC_CHECK_IN, // Lgb 97-07-01
|
||||
LFUN_VC_CHECK_OUT, // Lgb 97-07-01
|
||||
LFUN_VC_CHECK_IN, // Lgb 97-07-01
|
||||
LFUN_VC_CHECK_OUT, // Lgb 97-07-01
|
||||
// 165
|
||||
LFUN_VC_REVERT, // Lgb 97-07-01
|
||||
LFUN_VC_UNDO_LAST, // Lgb 97-07-01
|
||||
LFUN_BUFFER_EXPORT, // Lgb 97-07-29
|
||||
LFUN_VC_UNDO_LAST, // Lgb 97-07-01
|
||||
LFUN_BUFFER_EXPORT, // Lgb 97-07-29
|
||||
LFUN_LABEL_GOTO, // Ale 970806
|
||||
LFUN_DOTS_INSERT, // Asger 970929
|
||||
LFUN_DOTS_INSERT, // Asger 970929
|
||||
// 170
|
||||
LFUN_LINE_END_OF_SENTENCE_PERIOD_INSERT, // Asger 970929
|
||||
LFUN_END_OF_SENTENCE_PERIOD_INSERT, // Asger 970929
|
||||
LFUN_TOGGLE_CURSOR_FOLLOWS_SCROLLBAR, // ARRae 971202
|
||||
LFUN_BUFFER_CHKTEX, // Asger 971030
|
||||
LFUN_HTML_INSERT, // CFO-G 971121
|
||||
@ -284,7 +284,7 @@ enum kb_action {
|
||||
LFUN_CHARS_TRANSPOSE, // Lgb 20010425
|
||||
LFUN_ESCAPE, // Lgb 20010517
|
||||
LFUN_THESAURUS_ENTRY, // Levon 20010720
|
||||
LFUN_TOGGLE_TOOLTIPS, // Angus 8 Mar 2002
|
||||
LFUN_TOOLTIPS_TOGGLE, // Angus 8 Mar 2002
|
||||
LFUN_OPTIONAL_INSERT, // Martin 12 Aug 2002
|
||||
// 215
|
||||
LFUN_MOUSE_PRESS, // André 9 Aug 2002
|
||||
@ -294,13 +294,13 @@ enum kb_action {
|
||||
LFUN_MOUSE_TRIPLE, // André 9 Aug 2002
|
||||
// 220
|
||||
LFUN_WRAP_INSERT, // Dekel 7 Apr 2002
|
||||
LFUN_TRACK_CHANGES, // Levon 20021001 (cool date !)
|
||||
LFUN_MERGE_CHANGES, // Levon 20021016
|
||||
LFUN_ACCEPT_CHANGE, // Levon 20021016
|
||||
LFUN_REJECT_CHANGE, // Levon 20021016
|
||||
LFUN_CHANGES_TRACK, // Levon 20021001 (cool date !)
|
||||
LFUN_CHANGES_MERGE, // Levon 20021016
|
||||
LFUN_CHANGE_ACCEPT, // Levon 20021016
|
||||
LFUN_CHANGE_REJECT, // Levon 20021016
|
||||
// 225
|
||||
LFUN_ACCEPT_ALL_CHANGES, // Levon 20021016
|
||||
LFUN_REJECT_ALL_CHANGES, // Levon 20021016
|
||||
LFUN_ALL_CHANGES_ACCEPT, // Levon 20021016
|
||||
LFUN_ALL_CHANGES_REJECT, // Levon 20021016
|
||||
LFUN_BIBITEM_INSERT, // André 14 Feb 2003
|
||||
LFUN_DIALOG_SHOW,
|
||||
LFUN_DIALOG_SHOW_NEW_INSET,
|
||||
@ -337,7 +337,7 @@ enum kb_action {
|
||||
// 255
|
||||
LFUN_BUFFER_EXPORT_CUSTOM,
|
||||
LFUN_BUFFER_PRINT,
|
||||
LFUN_SCREEN_DOWN_INSET_TOGGLE,
|
||||
LFUN_NEXT_INSET_TOGGLE,
|
||||
LFUN_ALL_INSETS_TOGGLE,
|
||||
LFUN_BUFFER_LANGUAGE,
|
||||
// 260
|
||||
@ -349,11 +349,11 @@ enum kb_action {
|
||||
// 265
|
||||
LFUN_GRAPHICS_EDIT,
|
||||
LFUN_INSET_REFRESH,
|
||||
LFUN_SCREEN_DOWNBUFFER,
|
||||
LFUN_BUFFER_NEXT,
|
||||
LFUN_BUFFER_PREVIOUS,
|
||||
LFUN_WORDS_COUNT,
|
||||
// 270
|
||||
LFUN_OUTPUT_CHANGES, // jspitzm 20050121
|
||||
LFUN_CHANGES_OUTPUT, // jspitzm 20050121
|
||||
LFUN_BIBTEX_DATABASE_ADD,
|
||||
LFUN_BIBTEX_DATABASE_DEL,
|
||||
LFUN_CITATION_INSERT,
|
||||
|
@ -538,8 +538,8 @@ void LyX::defaultKeyBindings(kb_keymap * kbmap)
|
||||
kbmap->bind("Return", FuncRequest(LFUN_BREAK_PARAGRAPH));
|
||||
//kbmap->bind("~C-~S-~M-nobreakspace", FuncRequest(LFUN_PROTECTEDSPACE));
|
||||
|
||||
kbmap->bind("Delete", FuncRequest(LFUN_DELETE_FORWARD));
|
||||
kbmap->bind("BackSpace", FuncRequest(LFUN_DELETE_FORWARD_BACKWARD));
|
||||
kbmap->bind("Delete", FuncRequest(LFUN_CHAR_DELETE_FORWARD));
|
||||
kbmap->bind("BackSpace", FuncRequest(LFUN_CHAR_DELETE_BACKWARD));
|
||||
|
||||
// kbmap->bindings to enable the use of the numeric keypad
|
||||
// e.g. Num Lock set
|
||||
|
@ -397,7 +397,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
|
||||
// to handle (Andre')
|
||||
bool enable = true;
|
||||
switch (cmd.action) {
|
||||
case LFUN_TOGGLE_TOOLTIPS:
|
||||
case LFUN_TOOLTIPS_TOGGLE:
|
||||
flag.setOnOff(owner->getDialogs().tooltipsEnabled());
|
||||
break;
|
||||
|
||||
@ -562,7 +562,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
|
||||
}
|
||||
|
||||
case LFUN_BUFFER_NEW:
|
||||
case LFUN_BUFFER_NEWTMPLT:
|
||||
case LFUN_BUFFER_NEW_TEMPLATE:
|
||||
case LFUN_WORD_FIND_FORWARD:
|
||||
case LFUN_WORD_FIND_BACKWARD:
|
||||
case LFUN_COMMAND_PREFIX:
|
||||
@ -611,7 +611,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
|
||||
case LFUN_BUFFER_SAVE_AS_DEFAULT:
|
||||
case LFUN_BUFFER_PARAMS_APPLY:
|
||||
case LFUN_LYXRC_APPLY:
|
||||
case LFUN_SCREEN_DOWNBUFFER:
|
||||
case LFUN_BUFFER_NEXT:
|
||||
case LFUN_BUFFER_PREVIOUS:
|
||||
// these are handled in our dispatch()
|
||||
break;
|
||||
@ -802,7 +802,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
menuNew(argument, false);
|
||||
break;
|
||||
|
||||
case LFUN_BUFFER_NEWTMPLT:
|
||||
case LFUN_BUFFER_NEW_TEMPLATE:
|
||||
menuNew(argument, true);
|
||||
break;
|
||||
|
||||
@ -1095,7 +1095,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
view()->setBuffer(bufferlist.getBuffer(argument));
|
||||
break;
|
||||
|
||||
case LFUN_SCREEN_DOWNBUFFER:
|
||||
case LFUN_BUFFER_NEXT:
|
||||
view()->setBuffer(bufferlist.next(view()->buffer()));
|
||||
break;
|
||||
|
||||
@ -1409,7 +1409,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
owner->message(argument);
|
||||
break;
|
||||
|
||||
case LFUN_TOGGLE_TOOLTIPS:
|
||||
case LFUN_TOOLTIPS_TOGGLE:
|
||||
owner->getDialogs().toggleTooltips();
|
||||
break;
|
||||
|
||||
|
@ -1044,7 +1044,7 @@ void MathGridInset::doDispatch(LCursor & cur, FuncRequest & cmd)
|
||||
break;
|
||||
|
||||
// insert file functions
|
||||
case LFUN_DELETE_FORWARD_LINE_FORWARD:
|
||||
case LFUN_LINE_DELETE:
|
||||
// FIXME: We use recordUndoInset when a change reflects more
|
||||
// than one cell, because recordUndo does not work for
|
||||
// multiple cells. Unfortunately this puts the cursor in front
|
||||
@ -1245,11 +1245,12 @@ void MathGridInset::doDispatch(LCursor & cur, FuncRequest & cmd)
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_LINE_BEGINSEL:
|
||||
case LFUN_LINE_BEGIN_SELECT:
|
||||
case LFUN_LINE_BEGIN:
|
||||
case LFUN_WORD_BACKWARDSEL:
|
||||
case LFUN_WORD_BACKWARD_SELECT:
|
||||
case LFUN_WORD_BACKWARD:
|
||||
cur.selHandle(cmd.action == LFUN_WORD_BACKWARDSEL || cmd.action == LFUN_LINE_BEGINSEL);
|
||||
cur.selHandle(cmd.action == LFUN_WORD_BACKWARD_SELECT ||
|
||||
cmd.action == LFUN_LINE_BEGIN_SELECT);
|
||||
cur.macroModeClose();
|
||||
if (cur.pos() != 0) {
|
||||
cur.pos() = 0;
|
||||
@ -1265,11 +1266,12 @@ void MathGridInset::doDispatch(LCursor & cur, FuncRequest & cmd)
|
||||
}
|
||||
break;
|
||||
|
||||
case LFUN_WORD_FORWARDSEL:
|
||||
case LFUN_WORD_FORWARD_SELECT:
|
||||
case LFUN_WORD_FORWARD:
|
||||
case LFUN_LINE_ENDSEL:
|
||||
case LFUN_LINE_END_SELECT:
|
||||
case LFUN_LINE_END:
|
||||
cur.selHandle(cmd.action == LFUN_WORD_FORWARDSEL || cmd.action == LFUN_LINE_ENDSEL);
|
||||
cur.selHandle(cmd.action == LFUN_WORD_FORWARD_SELECT ||
|
||||
cmd.action == LFUN_LINE_END_SELECT);
|
||||
cur.macroModeClose();
|
||||
cur.clearTargetX();
|
||||
if (cur.pos() != cur.lastpos()) {
|
||||
|
@ -472,9 +472,9 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
|
||||
cur.bv().cursor() = cur;
|
||||
break;
|
||||
|
||||
case LFUN_CHAR_FORWARDSEL:
|
||||
case LFUN_CHAR_FORWARD_SELECT:
|
||||
case LFUN_CHAR_FORWARD:
|
||||
cur.selHandle(cmd.action == LFUN_CHAR_FORWARDSEL);
|
||||
cur.selHandle(cmd.action == LFUN_CHAR_FORWARD_SELECT);
|
||||
cur.autocorrect() = false;
|
||||
cur.clearTargetX();
|
||||
cur.macroModeClose();
|
||||
@ -490,9 +490,9 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
|
||||
}
|
||||
break;
|
||||
|
||||
case LFUN_BACKWARD_SELECT:
|
||||
case LFUN_CHAR_BACKWARD_SELECT:
|
||||
case LFUN_CHAR_BACKWARD:
|
||||
cur.selHandle(cmd.action == LFUN_BACKWARD_SELECT);
|
||||
cur.selHandle(cmd.action == LFUN_CHAR_BACKWARD_SELECT);
|
||||
cur.autocorrect() = false;
|
||||
cur.clearTargetX();
|
||||
cur.macroModeClose();
|
||||
@ -552,17 +552,18 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
|
||||
cur.idx() = cur.lastidx();
|
||||
break;
|
||||
|
||||
case LFUN_PARAGRAPH_UPSEL:
|
||||
case LFUN_PARAGRAPH_UP_SELECT:
|
||||
case LFUN_PARAGRAPH_UP:
|
||||
case LFUN_PARAGRAPH_DOWNSEL:
|
||||
case LFUN_PARAGRAPH_DOWN_SELECT:
|
||||
case LFUN_PARAGRAPH_DOWN:
|
||||
break;
|
||||
|
||||
case LFUN_LINE_BEGINSEL:
|
||||
case LFUN_LINE_BEGIN_SELECT:
|
||||
case LFUN_LINE_BEGIN:
|
||||
case LFUN_WORD_BACKWARDSEL:
|
||||
case LFUN_WORD_BACKWARD_SELECT:
|
||||
case LFUN_WORD_BACKWARD:
|
||||
cur.selHandle(cmd.action == LFUN_WORD_BACKWARDSEL || cmd.action == LFUN_LINE_BEGINSEL);
|
||||
cur.selHandle(cmd.action == LFUN_WORD_BACKWARD_SELECT ||
|
||||
cmd.action == LFUN_LINE_BEGIN_SELECT);
|
||||
cur.macroModeClose();
|
||||
if (cur.pos() != 0) {
|
||||
cur.pos() = 0;
|
||||
@ -578,11 +579,12 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
|
||||
}
|
||||
break;
|
||||
|
||||
case LFUN_WORD_FORWARDSEL:
|
||||
case LFUN_WORD_FORWARD_SELECT:
|
||||
case LFUN_WORD_FORWARD:
|
||||
case LFUN_LINE_ENDSEL:
|
||||
case LFUN_LINE_END_SELECT:
|
||||
case LFUN_LINE_END:
|
||||
cur.selHandle(cmd.action == LFUN_WORD_FORWARDSEL || cmd.action == LFUN_LINE_ENDSEL);
|
||||
cur.selHandle(cmd.action == LFUN_WORD_FORWARD_SELECT ||
|
||||
cmd.action == LFUN_LINE_END_SELECT);
|
||||
cur.macroModeClose();
|
||||
cur.clearTargetX();
|
||||
if (cur.pos() != cur.lastpos()) {
|
||||
@ -599,13 +601,13 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
|
||||
}
|
||||
break;
|
||||
|
||||
case LFUN_SCREEN_UPSEL:
|
||||
case LFUN_SCREEN_UP_SELECT:
|
||||
case LFUN_SCREEN_UP:
|
||||
cmd = FuncRequest(LFUN_FINISHED_LEFT);
|
||||
cur.undispatched();
|
||||
break;
|
||||
|
||||
case LFUN_SCREEN_DOWNSEL:
|
||||
case LFUN_SCREEN_DOWN_SELECT:
|
||||
case LFUN_SCREEN_DOWN:
|
||||
cmd = FuncRequest(LFUN_FINISHED_RIGHT);
|
||||
cur.undispatched();
|
||||
@ -619,8 +621,8 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
|
||||
cur.inset().idxPrev(cur);
|
||||
break;
|
||||
|
||||
case LFUN_DELETE_FORWARD_WORD_BACKWARD:
|
||||
case LFUN_DELETE_FORWARD_BACKWARD:
|
||||
case LFUN_WORD_DELETE_BACKWARD:
|
||||
case LFUN_CHAR_DELETE_BACKWARD:
|
||||
if (cur.pos() == 0)
|
||||
// May affect external cell:
|
||||
recordUndoInset(cur, Undo::ATOMIC);
|
||||
@ -629,8 +631,8 @@ void MathNestInset::doDispatch(LCursor & cur, FuncRequest & cmd)
|
||||
cur.backspace();
|
||||
break;
|
||||
|
||||
case LFUN_DELETE_FORWARD_WORD_FORWARD:
|
||||
case LFUN_DELETE_FORWARD:
|
||||
case LFUN_WORD_DELETE_FORWARD:
|
||||
case LFUN_CHAR_DELETE_FORWARD:
|
||||
if (cur.pos() == cur.lastpos())
|
||||
// May affect external cell:
|
||||
recordUndoInset(cur, Undo::ATOMIC);
|
||||
|
@ -344,7 +344,7 @@ void LyXText::setLayout(LCursor & cur, string const & layout)
|
||||
// move everything in a new environment inset
|
||||
lyxerr[Debug::DEBUG] << "setting layout " << layout << endl;
|
||||
bv.owner()->dispatch(FuncRequest(LFUN_LINE_BEGIN));
|
||||
bv.owner()->dispatch(FuncRequest(LFUN_LINE_ENDSEL));
|
||||
bv.owner()->dispatch(FuncRequest(LFUN_LINE_END_SELECT));
|
||||
bv.owner()->dispatch(FuncRequest(LFUN_CUT));
|
||||
InsetBase * inset = new InsetEnvironment(params, layout);
|
||||
insertInset(cur, inset);
|
||||
|
98
src/text3.C
98
src/text3.C
@ -377,19 +377,19 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_DELETE_FORWARD_WORD_FORWARD:
|
||||
case LFUN_WORD_DELETE_FORWARD:
|
||||
cur.clearSelection();
|
||||
deleteWordForward(cur);
|
||||
finishChange(cur, false);
|
||||
break;
|
||||
|
||||
case LFUN_DELETE_FORWARD_WORD_BACKWARD:
|
||||
case LFUN_WORD_DELETE_BACKWARD:
|
||||
cur.clearSelection();
|
||||
deleteWordBackward(cur);
|
||||
finishChange(cur, false);
|
||||
break;
|
||||
|
||||
case LFUN_DELETE_FORWARD_LINE_FORWARD:
|
||||
case LFUN_LINE_DELETE:
|
||||
cur.clearSelection();
|
||||
deleteLineForward(cur);
|
||||
finishChange(cur, false);
|
||||
@ -426,7 +426,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
}
|
||||
break;
|
||||
|
||||
case LFUN_BUFFER_BEGINSEL:
|
||||
case LFUN_BUFFER_BEGIN_SELECT:
|
||||
if (cur.depth() == 1) {
|
||||
if (!cur.selection())
|
||||
cur.resetAnchor();
|
||||
@ -448,7 +448,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
}
|
||||
break;
|
||||
|
||||
case LFUN_BUFFER_ENDSEL:
|
||||
case LFUN_BUFFER_END_SELECT:
|
||||
if (cur.depth() == 1) {
|
||||
if (!cur.selection())
|
||||
cur.resetAnchor();
|
||||
@ -460,10 +460,10 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
break;
|
||||
|
||||
case LFUN_CHAR_FORWARD:
|
||||
case LFUN_CHAR_FORWARDSEL:
|
||||
case LFUN_CHAR_FORWARD_SELECT:
|
||||
//lyxerr << BOOST_CURRENT_FUNCTION
|
||||
// << " LFUN_CHAR_FORWARD[SEL]:\n" << cur << endl;
|
||||
cur.selHandle(cmd.action == LFUN_CHAR_FORWARDSEL);
|
||||
cur.selHandle(cmd.action == LFUN_CHAR_FORWARD_SELECT);
|
||||
if (isRTL(cur.paragraph()))
|
||||
needsUpdate = cursorLeft(cur);
|
||||
else
|
||||
@ -477,9 +477,9 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
break;
|
||||
|
||||
case LFUN_CHAR_BACKWARD:
|
||||
case LFUN_BACKWARD_SELECT:
|
||||
//lyxerr << "handle LFUN_CHAR_BACKWARD[SEL]:\n" << cur << endl;
|
||||
cur.selHandle(cmd.action == LFUN_BACKWARD_SELECT);
|
||||
case LFUN_CHAR_BACKWARD_SELECT:
|
||||
//lyxerr << "handle LFUN_CHAR_BACKWARD[_SELECT]:\n" << cur << endl;
|
||||
cur.selHandle(cmd.action == LFUN_CHAR_BACKWARD_SELECT);
|
||||
if (isRTL(cur.paragraph()))
|
||||
needsUpdate = cursorRight(cur);
|
||||
else
|
||||
@ -527,7 +527,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
finishChange(cur, false);
|
||||
break;
|
||||
|
||||
case LFUN_PARAGRAPH_UPSEL:
|
||||
case LFUN_PARAGRAPH_UP_SELECT:
|
||||
if (!cur.selection())
|
||||
cur.resetAnchor();
|
||||
cursorUpParagraph(cur);
|
||||
@ -541,14 +541,14 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
finishChange(cur, false);
|
||||
break;
|
||||
|
||||
case LFUN_PARAGRAPH_DOWNSEL:
|
||||
case LFUN_PARAGRAPH_DOWN_SELECT:
|
||||
if (!cur.selection())
|
||||
cur.resetAnchor();
|
||||
cursorDownParagraph(cur);
|
||||
finishChange(cur, true);
|
||||
break;
|
||||
|
||||
case LFUN_SCREEN_UPSEL:
|
||||
case LFUN_SCREEN_UP_SELECT:
|
||||
update(cur);
|
||||
if (!cur.selection())
|
||||
cur.resetAnchor();
|
||||
@ -556,7 +556,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
finishChange(cur, true);
|
||||
break;
|
||||
|
||||
case LFUN_SCREEN_DOWNSEL:
|
||||
case LFUN_SCREEN_DOWN_SELECT:
|
||||
update(cur);
|
||||
if (!cur.selection())
|
||||
cur.resetAnchor();
|
||||
@ -564,7 +564,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
finishChange(cur, true);
|
||||
break;
|
||||
|
||||
case LFUN_LINE_BEGINSEL:
|
||||
case LFUN_LINE_BEGIN_SELECT:
|
||||
update(cur);
|
||||
if (!cur.selection())
|
||||
cur.resetAnchor();
|
||||
@ -572,7 +572,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
finishChange(cur, true);
|
||||
break;
|
||||
|
||||
case LFUN_LINE_ENDSEL:
|
||||
case LFUN_LINE_END_SELECT:
|
||||
update(cur);
|
||||
if (!cur.selection())
|
||||
cur.resetAnchor();
|
||||
@ -580,7 +580,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
finishChange(cur, true);
|
||||
break;
|
||||
|
||||
case LFUN_WORD_FORWARDSEL:
|
||||
case LFUN_WORD_FORWARD_SELECT:
|
||||
if (!cur.selection())
|
||||
cur.resetAnchor();
|
||||
if (isRTL(cur.paragraph()))
|
||||
@ -590,7 +590,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
finishChange(cur, true);
|
||||
break;
|
||||
|
||||
case LFUN_WORD_BACKWARDSEL:
|
||||
case LFUN_WORD_BACKWARD_SELECT:
|
||||
if (!cur.selection())
|
||||
cur.resetAnchor();
|
||||
if (isRTL(cur.paragraph()))
|
||||
@ -658,7 +658,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_DELETE_FORWARD:
|
||||
case LFUN_CHAR_DELETE_FORWARD:
|
||||
if (!cur.selection()) {
|
||||
if (cur.pos() == cur.paragraph().size())
|
||||
// Par boundary, force full-screen update
|
||||
@ -689,7 +689,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
break;
|
||||
|
||||
|
||||
case LFUN_DELETE_FORWARD_BACKWARD:
|
||||
case LFUN_CHAR_DELETE_BACKWARD:
|
||||
if (!cur.selection()) {
|
||||
if (bv->owner()->getIntl().getTransManager().backspace()) {
|
||||
// Par boundary, full-screen update
|
||||
@ -707,7 +707,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
bv->switchKeyMap();
|
||||
break;
|
||||
|
||||
case LFUN_DELETE_FORWARD_BACKWARD_SKIP:
|
||||
case LFUN_DELETE_BACKWARD_SKIP:
|
||||
// Reverse the effect of LFUN_BREAK_PARAGRAPH_SKIP.
|
||||
if (!cur.selection()) {
|
||||
#ifdef WITH_WARNINGS
|
||||
@ -728,7 +728,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
bv->switchKeyMap();
|
||||
break;
|
||||
|
||||
case LFUN_BREAK_PARAGRAPHKEEPLAYOUT:
|
||||
case LFUN_BREAK_PARAGRAPH_KEEP_LAYOUT:
|
||||
lyx::cap::replaceSelection(cur);
|
||||
breakParagraph(cur, 1);
|
||||
cur.resetAnchor();
|
||||
@ -801,7 +801,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
cur.inset().showInsetDialog(bv);
|
||||
break;
|
||||
|
||||
case LFUN_SCREEN_DOWN_INSET_TOGGLE: {
|
||||
case LFUN_NEXT_INSET_TOGGLE: {
|
||||
InsetBase * inset = cur.nextInset();
|
||||
// this is the real function we want to invoke
|
||||
cmd = FuncRequest(LFUN_INSET_TOGGLE);
|
||||
@ -845,7 +845,7 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
specialChar(cur, InsetSpecialChar::LDOTS);
|
||||
break;
|
||||
|
||||
case LFUN_LINE_END_OF_SENTENCE_PERIOD_INSERT:
|
||||
case LFUN_END_OF_SENTENCE_PERIOD_INSERT:
|
||||
specialChar(cur, InsetSpecialChar::END_OF_SENTENCE);
|
||||
break;
|
||||
|
||||
@ -1499,12 +1499,12 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_ACCEPT_CHANGE: {
|
||||
case LFUN_CHANGE_ACCEPT: {
|
||||
acceptChange(cur);
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_REJECT_CHANGE: {
|
||||
case LFUN_CHANGE_REJECT: {
|
||||
rejectChange(cur);
|
||||
break;
|
||||
}
|
||||
@ -1740,7 +1740,7 @@ bool LyXText::getStatus(LCursor & cur, FuncRequest const & cmd,
|
||||
case LFUN_HFILL_INSERT:
|
||||
case LFUN_MENU_SEPARATOR_INSERT:
|
||||
case LFUN_DOTS_INSERT:
|
||||
case LFUN_LINE_END_OF_SENTENCE_PERIOD_INSERT:
|
||||
case LFUN_END_OF_SENTENCE_PERIOD_INSERT:
|
||||
code = InsetBase::SPECIALCHAR_CODE;
|
||||
break;
|
||||
case LFUN_SPACE_INSERT:
|
||||
@ -1819,27 +1819,27 @@ bool LyXText::getStatus(LCursor & cur, FuncRequest const & cmd,
|
||||
break;
|
||||
}
|
||||
|
||||
case LFUN_DELETE_FORWARD_WORD_FORWARD:
|
||||
case LFUN_DELETE_FORWARD_WORD_BACKWARD:
|
||||
case LFUN_DELETE_FORWARD_LINE_FORWARD:
|
||||
case LFUN_WORD_DELETE_FORWARD:
|
||||
case LFUN_WORD_DELETE_BACKWARD:
|
||||
case LFUN_LINE_DELETE:
|
||||
case LFUN_WORD_FORWARD:
|
||||
case LFUN_WORD_BACKWARD:
|
||||
case LFUN_CHAR_FORWARD:
|
||||
case LFUN_CHAR_FORWARDSEL:
|
||||
case LFUN_CHAR_FORWARD_SELECT:
|
||||
case LFUN_CHAR_BACKWARD:
|
||||
case LFUN_BACKWARD_SELECT:
|
||||
case LFUN_CHAR_BACKWARD_SELECT:
|
||||
case LFUN_UP:
|
||||
case LFUN_UP_SELECT:
|
||||
case LFUN_DOWN:
|
||||
case LFUN_DOWN_SELECT:
|
||||
case LFUN_PARAGRAPH_UPSEL:
|
||||
case LFUN_PARAGRAPH_DOWNSEL:
|
||||
case LFUN_SCREEN_UPSEL:
|
||||
case LFUN_SCREEN_DOWNSEL:
|
||||
case LFUN_LINE_BEGINSEL:
|
||||
case LFUN_LINE_ENDSEL:
|
||||
case LFUN_WORD_FORWARDSEL:
|
||||
case LFUN_WORD_BACKWARDSEL:
|
||||
case LFUN_PARAGRAPH_UP_SELECT:
|
||||
case LFUN_PARAGRAPH_DOWN_SELECT:
|
||||
case LFUN_SCREEN_UP_SELECT:
|
||||
case LFUN_SCREEN_DOWN_SELECT:
|
||||
case LFUN_LINE_BEGIN_SELECT:
|
||||
case LFUN_LINE_END_SELECT:
|
||||
case LFUN_WORD_FORWARD_SELECT:
|
||||
case LFUN_WORD_BACKWARD_SELECT:
|
||||
case LFUN_WORD_SELECT:
|
||||
case LFUN_PARAGRAPH_UP:
|
||||
case LFUN_PARAGRAPH_DOWN:
|
||||
@ -1848,16 +1848,16 @@ bool LyXText::getStatus(LCursor & cur, FuncRequest const & cmd,
|
||||
case LFUN_LINE_BEGIN:
|
||||
case LFUN_LINE_END:
|
||||
case LFUN_BREAK_LINE:
|
||||
case LFUN_DELETE_FORWARD:
|
||||
case LFUN_CHAR_DELETE_FORWARD:
|
||||
case LFUN_DELETE_FORWARD_SKIP:
|
||||
case LFUN_DELETE_FORWARD_BACKWARD:
|
||||
case LFUN_DELETE_FORWARD_BACKWARD_SKIP:
|
||||
case LFUN_CHAR_DELETE_BACKWARD:
|
||||
case LFUN_DELETE_BACKWARD_SKIP:
|
||||
case LFUN_BREAK_PARAGRAPH:
|
||||
case LFUN_BREAK_PARAGRAPHKEEPLAYOUT:
|
||||
case LFUN_BREAK_PARAGRAPH_KEEP_LAYOUT:
|
||||
case LFUN_BREAK_PARAGRAPH_SKIP:
|
||||
case LFUN_PARAGRAPH_SPACING:
|
||||
case LFUN_INSET_INSERT:
|
||||
case LFUN_SCREEN_DOWN_INSET_TOGGLE:
|
||||
case LFUN_NEXT_INSET_TOGGLE:
|
||||
case LFUN_WORD_UPCASE:
|
||||
case LFUN_WORD_LOWCASE:
|
||||
case LFUN_WORD_CAPITALIZE:
|
||||
@ -1907,15 +1907,15 @@ bool LyXText::getStatus(LCursor & cur, FuncRequest const & cmd,
|
||||
case LFUN_ACCENT_HUNGARIAN_UMLAUT:
|
||||
case LFUN_ACCENT_CIRCLE:
|
||||
case LFUN_ACCENT_OGONEK:
|
||||
case LFUN_ACCEPT_CHANGE:
|
||||
case LFUN_REJECT_CHANGE:
|
||||
case LFUN_CHANGE_ACCEPT:
|
||||
case LFUN_CHANGE_REJECT:
|
||||
case LFUN_THESAURUS_ENTRY:
|
||||
case LFUN_PARAGRAPH_PARAMS_APPLY:
|
||||
case LFUN_ESCAPE:
|
||||
case LFUN_BUFFER_END:
|
||||
case LFUN_BUFFER_BEGIN:
|
||||
case LFUN_BUFFER_BEGINSEL:
|
||||
case LFUN_BUFFER_ENDSEL:
|
||||
case LFUN_BUFFER_BEGIN_SELECT:
|
||||
case LFUN_BUFFER_END_SELECT:
|
||||
// these are handled in our dispatch()
|
||||
enable = true;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user