mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 02:49:46 +00:00
Compare commits
No commits in common. "70ab623c6ebf4ce54b6f1272747449ddd20952d1" and "6c20e5db7db662239e8c2bd47fe28d18b27bd729" have entirely different histories.
70ab623c6e
...
6c20e5db7d
@ -25,11 +25,6 @@ and generates a PHP web page.
|
|||||||
|
|
||||||
Invocation:
|
Invocation:
|
||||||
postats.py lyx_version po_files > "pathToWebPages"/i18n.inc
|
postats.py lyx_version po_files > "pathToWebPages"/i18n.inc
|
||||||
|
|
||||||
or simply
|
|
||||||
make i18n.inc
|
|
||||||
to create stats only for allowed langauages in LINGUAS file
|
|
||||||
(typically good for stable branch stats).
|
|
||||||
"""
|
"""
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
|
@ -1450,6 +1450,8 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
&& lyxaction.funcHasFlag(cmd.action(), LyXAction::NoInternal))
|
&& lyxaction.funcHasFlag(cmd.action(), LyXAction::NoInternal))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// We'll set this back to false if need be.
|
||||||
|
bool dispatched = true;
|
||||||
buffer_.undo().beginUndoGroup();
|
buffer_.undo().beginUndoGroup();
|
||||||
|
|
||||||
FuncCode const act = cmd.action();
|
FuncCode const act = cmd.action();
|
||||||
@ -1636,7 +1638,8 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
InsetMathRef * minset =
|
InsetMathRef * minset =
|
||||||
getInsetByCode<InsetMathRef>(cur, MATH_REF_CODE);
|
getInsetByCode<InsetMathRef>(cur, MATH_REF_CODE);
|
||||||
if (minset)
|
if (minset)
|
||||||
lyx::dispatch(FuncRequest(LFUN_LABEL_GOTO, minset->getTarget()));
|
lyx::dispatch(FuncRequest(LFUN_LABEL_GOTO,
|
||||||
|
minset->getTarget()));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1895,8 +1898,14 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
FindAndReplaceOptions opt;
|
FindAndReplaceOptions opt;
|
||||||
istringstream iss(to_utf8(cmd.argument()));
|
istringstream iss(to_utf8(cmd.argument()));
|
||||||
iss >> opt;
|
iss >> opt;
|
||||||
if (findAdv(this, opt))
|
if (findAdv(this, opt)) {
|
||||||
dr.screenUpdate(Update::Force | Update::FitCursor);
|
dr.screenUpdate(Update::Force | Update::FitCursor);
|
||||||
|
cur.dispatched();
|
||||||
|
dispatched = true;
|
||||||
|
} else {
|
||||||
|
cur.undispatched();
|
||||||
|
dispatched = false;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2190,8 +2199,10 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
how = SCROLL_TOGGLE;
|
how = SCROLL_TOGGLE;
|
||||||
else if (where == "visible")
|
else if (where == "visible")
|
||||||
how = SCROLL_VISIBLE;
|
how = SCROLL_VISIBLE;
|
||||||
else
|
else {
|
||||||
|
dispatched = false;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
showCursor(how);
|
showCursor(how);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2201,8 +2212,10 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
scroll_step = d->scrollbarParameters_.single_step;
|
scroll_step = d->scrollbarParameters_.single_step;
|
||||||
else if (scroll_type == "page")
|
else if (scroll_type == "page")
|
||||||
scroll_step = d->scrollbarParameters_.page_step;
|
scroll_step = d->scrollbarParameters_.page_step;
|
||||||
else
|
else {
|
||||||
|
dispatched = false;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
string const scroll_quantity = cmd.getArg(1);
|
string const scroll_quantity = cmd.getArg(1);
|
||||||
|
|
||||||
@ -2212,8 +2225,10 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
scroll(scroll_step);
|
scroll(scroll_step);
|
||||||
else if (isStrInt(scroll_quantity))
|
else if (isStrInt(scroll_quantity))
|
||||||
scroll(scroll_step * convert<int>(scroll_quantity));
|
scroll(scroll_step * convert<int>(scroll_quantity));
|
||||||
else
|
else {
|
||||||
|
dispatched = false;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
dr.screenUpdate(Update::ForceDraw);
|
dr.screenUpdate(Update::ForceDraw);
|
||||||
dr.forceBufferUpdate();
|
dr.forceBufferUpdate();
|
||||||
@ -2463,13 +2478,14 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
if (!opt1.empty())
|
if (!opt1.empty())
|
||||||
LYXERR0("Discarding optional argument to citation-insert.");
|
LYXERR0("Discarding optional argument to citation-insert.");
|
||||||
}
|
}
|
||||||
|
dispatched = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
InsetCommandParams icp(CITE_CODE);
|
InsetCommandParams icp(CITE_CODE);
|
||||||
icp["key"] = from_utf8(arg);
|
icp["key"] = from_utf8(arg);
|
||||||
if (!opt1.empty())
|
if (!opt1.empty())
|
||||||
icp["before"] = from_utf8(opt1);
|
icp["before"] = from_utf8(opt1);
|
||||||
icp["literal"] =
|
icp["literal"] =
|
||||||
from_ascii(InsetCitation::last_literal ? "true" : "false");
|
from_ascii(InsetCitation::last_literal ? "true" : "false");
|
||||||
string icstr = InsetCommand::params2string(icp);
|
string icstr = InsetCommand::params2string(icp);
|
||||||
FuncRequest fr(LFUN_INSET_INSERT, icstr);
|
FuncRequest fr(LFUN_INSET_INSERT, icstr);
|
||||||
@ -2555,6 +2571,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
if (cur.inTexted() && cur.selection()
|
if (cur.inTexted() && cur.selection()
|
||||||
&& cur.selectionBegin().idx() != cur.selectionEnd().idx()) {
|
&& cur.selectionBegin().idx() != cur.selectionEnd().idx()) {
|
||||||
buffer_.dispatch(cmd, dr);
|
buffer_.dispatch(cmd, dr);
|
||||||
|
dispatched = dr.dispatched();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
cap::copySelection(cur);
|
cap::copySelection(cur);
|
||||||
@ -2564,10 +2581,12 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
|
|||||||
default:
|
default:
|
||||||
// OK, so try the Buffer itself...
|
// OK, so try the Buffer itself...
|
||||||
buffer_.dispatch(cmd, dr);
|
buffer_.dispatch(cmd, dr);
|
||||||
|
dispatched = dr.dispatched();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer_.undo().endUndoGroup();
|
buffer_.undo().endUndoGroup();
|
||||||
|
dr.dispatched(dispatched);
|
||||||
|
|
||||||
// NOTE: The code below is copied from Cursor::dispatch. If you
|
// NOTE: The code below is copied from Cursor::dispatch. If you
|
||||||
// need to modify this, please update the other one too.
|
// need to modify this, please update the other one too.
|
||||||
|
Loading…
Reference in New Issue
Block a user