It is used in lib/Makefile.am and we were relying some autoconf macros
to define it as a side-effect. This is not the case anymore as of
autoconf 2.72.
Using translateIfPossible with null language does not make sense (and
gives an error on console).
Using translateIfPossible there actually does not make sense at all: it
is only for string from layout files that may already be translated.
We use the buffer language when no language has been specified. It
might have been better to use the GUI language.
A consequence of the commit is that "elsewhere" will be in the po
files and now really translatable ;)
The regex is expensive which is especially noticeable with very long
author lists.
This introduces a case-insensitive subst() variant which is much faster.
In some cases, it might happen that this method is called in cases
where no metrics is know for the current paragraph or where its
position is not set.
Take care of these cases to avoid assertions.
Remove setting of inset positions in the method, but make sure that
updateMetrics(false) is always called to get everything right.
In the new code, updateMetrics(bool) os the method that sets
everything right with minimal effort.
Using SinglePar does not majke sense here since the paragraph is not
modified and it might even not have a position yet.
This fixes a crash in BufferView::singleParUpdate, which is not
prepared (yet) to such situations.
Sometimes quick selection-scrolling could cause a crash because the
position of some paragraphs is not computed. To fix that, in
BufferView::showCursor, make sure that the metrics are always kept
clean using updateMetrics(false), which is lighweight.
As a consequence, the 'update' parameter of showCursor and
scrollDocView is not needed anymore. Its removal is mechanical and
accounts for most of this commit.
The only other significant change is that, when creating synthetic
mouse events and relying on scroll() for small moves, the full metrics
recomputation is replaced by the lighter version.
More work is still to come on this code, but this should be going in
the right direction.