File format change. On format reversion, we need to put some extra code
in the local layout that emulates the 2.3 behavior.
Simply Input'ing the respective layouts is unfortunately not enough,
due to the insertion order.
See #9977
"lyxclient -g" now calls the just implemented lyx-activate (see
previous commit) after server-goto-file-row. This allows the PDF
viewer to switch to LyX after executing a reverse search.
On Linux and Mac OS, this action brings the LyX window into focus.
Such behavior is not allowed by Windows OS so instead the color of
the taskbar entry is changed to indicate that the window has changed
in some way.
The action is hidden in the shortcuts menu because it would make
sense to assign a shortcut to it. The only way to execute shortcut
would be if the LyX window is already activated.
lyx-activate will be used (see next commit) to allow the PDF viewer
to switch to LyX after executing a reverse search.
* New constant LYXFILE_LAYOUT_FORMAT in src/TextClass.cpp. This determines the
layout format corresponding to the current lyx file format.
* The Local Layout pane is changed so that the "Convert" button does not convert
to the internal layout format but to the current lyx file format, to make sure
that the file does not become unreadable with a specified earlier version of
LyX.
* If LYXFILE_LAYOUT_FORMAT == LAYOUT_FORMAT then LyX behaves as before. This is
the value defined in master.
It is currently called on hundreds of files: settings, layouts, icons, cached
graphics files (incl. graphics from files that are not opened on startup).
According to callgrind, fixing the FIXME comments could speed up startup by more
than 30%.
A static local variable is guaranteed to be initialized only once, and in time.
Lambda expressions can be used to perform complex initialization of those static
variables on the spot.
(starting from: gcc >= 4.8, msvc >= 2015)
Prevent setRange() from causing a recursive call to scrollTo(). Reduces three
calls of scrollTo() to one call for all scrolling functions of the scroll bar
(e.g. clicking on the arrow, dragging, or clicking somewhere on the scrollbar).
The function is no longer used in LyX's sources (as of the previous
comit, 9b64d7bd) and is thus removed with this commit. Perhaps the
advantage this function had over other path functions we have has
disappeared over time (see e.g. 1a7b7f65).
Before this commit, in the paths preferences tab if you put a
relative path, LyX would convert it behind the scenes to an absolute
path by evaluating the relative path with respect to the working
directory of the LyX instance where the preference change is taking
place. This seems confusing because (1) it is done behind the scenes
(after the preferences dialog is closed) and (2) if the user chooses
to enter a relative path, the safest thing to do is to preserve it
as a relative path, instead of making the assumption that the user
intended for it to be expanded to an absolute path.
An explanation of how relative paths are handled is given at the
bottom of the paths tab. Note that the height/width of the
preferences window is not changed as a result of adding this
explanatory comment because the height of the preferences dialog is
already stretched by other tabs.
This commit improves consistency in the sense that the behavior of
LyX is now the same when a relative path is specified in the
preferences dialog as when it is manually specified in the
preferences file. Before, if the preferences file were manually
edited and a relative path were inserted, the next time the user
made a change to preferences with the GUI (even if the preference
change was a different preference, e.g. instant preview), the
relative path would be silently converted to an absolute path,
evaluated with respect to the working directory of that instance.
Beyond improving clarity and consistency (IMO), this commit allows
for a new feature to be implemented of using relative paths in the
paths preferences. For example, the user may now enter '.' as the
"Working directory" path and now whenever they start LyX from a
directory and create a new file, the default location of the file
will be the directory from which they started LyX, instead of the
user's home directory which is LyX's default and is less intuitive.
No prefs2prefs work is needed because if a relative path were
entered in the preferences dialog before this commit, it was
converted to an absolute path before being stored in preferences. If
a relative path were specified by manually editing the preferences
file, then (unless the path were already automatically converted to
an absolute path by a GUI preferences change, as described above)
the behavior will be the same (the path will be treated as a
relative path).
For related discussion, see the lyx-devel thread here:
https://www.mail-archive.com/search?l=mid&q=20160616003010.bnymtcouar7g55ti%40cotopaxi
This commit removes the last use of lyx::support::expandPath() in
LyX's sources.
The Qt documentation states that tabAt() returns -1 if the position
is not over a tab. This behavior has been consistent since Qt 4.3
[1]. This commit's improvement likely makes the code faster in two
ways:
(1) we do not need to loop through potentially all tabs
(2) we only need to look up the tab index corresponding with one
position
posIsTab() is not currently used intensively so no practical gain in
speed is achieved, but it protects against future use.
[1] https://doc.qt.io/archives/4.3/qtabbar.html#tabAt
This is the default behavior of Chromium and Firefox. The main
appeal is that instead of having to precisely click on the 'x' to
close a tab, one can more easily middle-click anywhere in the tab.
The tab is closed if the middle button is pressed on a tab and is
relased on the same tab. After pressing, the user may move the mouse
over other tabs but as long as they move it back to the tab where
they initiated the press before they release, the close will
execute. This is how the feature works in Chromium and Firefox.
Nothing is done if the user middle-clicks on the blank part of the
tab bar. This is consistent with Chromium. Firefox, on the other
hand, opens a new tab. In LyX one can already double-click the blank
part to open a new tab, and in feedback from lyx-users [1] most
expected and desired that nothing be done in this case.
[1] https://www.mail-archive.com/search?l=mid&q=20160720063306.6fyarf3kywexbxvd%40steph
A chunk of code in an event handler seems to be unnecessary to me
because the event that the situation handles never makes it this far
in the event handling hierarchy. I'm not sure why this is, and thus
I'm not sure if this is true in all cases (e.g. Qt version) and if
it will be true in the future so I leave this code for now.
In redoParagraph, this should be done before coping with the insets,
other wise some graphic gliches may occur. This is a better fix for
Fixes bug #10163.
With the commit cb0c881 we reference XSendEvent in X11-lib
if qt uses X11.
For QT5, this library is pulled by Qt5X11Extras, but
for QT4 we have to add it too.
Spotted by Scott Kostyshak.
For reference, the bug was that quote insets grew bolder because, when
painted over themselves, anti-aliasing made them darker.
It turned out that the fix there created others than were
painstakingly fixed: #7164, #7165, #7174, #7193... More recently, it
created other problems:
http://article.gmane.org/gmane.editors.lyx.devel/163471
We use the right fix here:
* draw background of quote inset when not doing full repaint
* draw background of math macro template when not doing full repaint
* remove hack that grew from #4889 fix.
The default for ZOOM_OUT is -20 from a user perspective. That is,
the following are equivalent:
buffer-zoom-out -20
buffer-zoom-out
The reason for this is that the argument to ZOOM_OUT is treated the
exact same way as ZOOM_IN. The only way they differ is how the
default case is handled.
This commit also clarifies that (1) the argument may be positive or
negative and that (2) the argument is interpreted as percentage
points, not percent.
The code that specializes for double elements in the display string
does not trigger anymore: displayString() returns a single unicode
value, plus some space for french guillemets.
Use a thin space for these french quotes instead of a plain space and
remove special case in metrics().
was not English: We return the the abbreviated author "One and Two",
but translated to the GUI language; then we search that for " and "
in order to pull the authors apart again.
I've just replaced the distinct routines with a single one that handles
both cases, depending upon whether a Buffer is provided as one argument.
* Fix bug #10261 : KDE smartly adds conflicting accelerators.
* Prevent bugs like #9495 in the future.
Issues (non-regression):
* It does not appear possible to prevent Ubuntu's Unity from grabbing the
accelerators for the menus. For instance Alt+A still opens _Affichage in the
French localization.
Add a new checkbox "Save transient properties" to the "Output" panel in the
document properties dialog (now renamed as "Format").
This provides the front-end for the change at 5c2d04999.
is output when a branch is NOT activated. Fixes bug #7698.
At the moment, inversion is controlled through the branch settings
dialog. There is no provision for inserting inverted insets directly,
or for changing them from the context menu. Both of these could be
done, of course. The latter would need LFUN_BRANCH_TOGGLE_INVERTED.
The differentiation of "xetex" and "platex" is not needed here,
is ambiguous and confusing (see #10013). The code that relies on
it can/should get its information otherwise.
Furthermore, polyglossia-exclusive languages now also work with
LuaTeX, since we support LuaTeX + polyglossia.
With both Qt4 and Qt5, when using a click-to-focus policy, the first
attempt to paste a selection by middle mouse in an external application
which has no focus may fail. It is not clear why this succeeds for some
applications and fails for others, but refreshing the timestamp of the
selection request cures the issue. The cmake part is by Kornel.
See also this thread:
http://thread.gmane.org/gmane.editors.lyx.devel/162491
dealing properly with the paragraph separator tag.
We really need to use that tag as a kind of general marker for which
tags we're responsible for in a given paragraph and which tags we are
not. So the changes to InsetText.cpp use the tag as that kind of marker.
Note that, as of this commit, the User Guide again exports without any
kind of error. I haven't yet checked the other manuals.
This fixes bug #8022.