QKeySequence returns special characters for keys on the mac rather than
textual key names (as on other OSes).
Since these symbols are not included in many fonts, we re-translate them
to textual names
Fixes: #10641
When searching for and item in the menu, also try to consider those that
require a BufferView (such as View/Update formats).
Also, be explicit for the default format in order to find it.
Fixes: #9851
On some recent Windows versions, GetLastError() may also return
NO_ERROR instead of ERROR_IO_PENDING during an overlapped write
operation to a pipe. This was confusing the state machine in
Server.cpp so that replies to commands were scheduled but were
never actually output.
This is a low hanging fruit, since it's already available (although
quite hidden)
Generally, output "not set" i a pref is not set rather than an empty
string.
This allows to address data in the current lyx-system-directory.
The additional prefix is '~:s/'
The original prefix '~/' still addresses current users home directory.
With this commit, info insets leave the dark backstage room of an opaque
and quite hidden dev-only feature and come frontstage.
In the UI, they present themselves as "Fields" since this is what people
know from word processors. Other user-related fields that could be
implemented next: time, user name (I plan to do that for 2.4).
Since this supersedes date-insert, I removed Insert > Date from
the menu and propose to ditch date-insert and the corresponding rc.
The lyx2lyx reversion routine has lots of room for improvement and
attractive tasks for pythons (file timestamp, switch of localization).
Please feel invited!
This is a file format change.
When selecting text, in some cases a DocIterator could be forwarded
to a (non-existant) paragraph after the end. The critical part of
this fix is to break the loop at the correct place. The following
are additional improvements:
- increase readability by defining a bool named "in_last_par"
- use cur.selectionEnd().pit() instead of cur.selectionEnd().paragraph().id()
- use it.lastpos() instead of it.paragraph().size()
This commit fixes a regression introduced by 23de5e5e, and reported
at #11204.
Thanks to Jürgen and JMarc.
* use the context language of the info inset (rather than the buffer
language), and translate strings accordingly
* for menu and shortcuts, use the Gui language instead
* actually care that all translatable strings end in po
(this wasn't the case).
Fixes: #5348, rest of #10463
A new UNDECIDED state is used if multiple cells with differing border
settings are selected.
This prevents additional borders to be set without being asked.
Fixes: #10010
Width is now 3 for top/bottomrule, 2 for midrule and 1 for cmidrule.
These numbers are bogus of course, but the goal is to help the user
see what he is doing.
It is a general problem when doing graphics to know where a line
begins and where it ends pixel-wise. At the instigation of Scott, and
with the use of the kmag magnifier, this commit corrects 3 areas:
* foreign marks were larger than the row element they were supposed to
mark. This could lead to moving lines, depending on paint ordering.
* visible spaces were drawn outside of their box (select a single
space to see this).
* the `L' blinking caret would leave a cursor dropping because the
horizontal part was too wide.
The part of code that removed space at start of paragraph have been
there forever, but its intent is unclear. For example, cutting text at
the end of a paragraph will lead to remove space at the start of this
same paragraph.
The removal of this functionality is offset by a rewrite of DEPM that
makes it more thorough.
Fixes bug #10503.
Now any sequence of spaces around old cursor will be removed, even at
start or end of paragraph. Sequences of more than 2 characters are
also taken into account.
The version of DEPM which acts on a sequence of paragraphs is also
rewritten to match the local one.
Minted does not have a language option but it is possible to enter
this option in the LyX interface for compatibility with the listings
package, and also for letting to enter a language not present in the
gui. So, this option is only used for properly specifying a language
in a listing, unless it is entered in the document settings dialog.
This case was not foreseen and thus the option was being passed to
the package as is, causing havoc. With this commit the option is
still available but is used to set a default language for a new
listing in place of the default "tex" language used so far.
This reuses code intended only for mac manus and generalizes it. The
list of strings to add to po files is found in
GuiTranslator::translate.
This is useful now that LyX relies on QDialogButtonBox class for its
dialogs. Indeed many languages are not covered natively by Qt.
It is possible to enable the "locace" debug channel to see what
strings are not covered and should be added to our own translation
tables.
In order to make things easier, a new method getIfFound() has been
added to the Messages class, which returns an empty string when no
translation has been found, as Qt's translate() does.
This assures the OK/Apply/Cancel/Restore buttons use the layout/style
of the OS (button order, icons).
The goal is to move all dialogs to this for 2.4.
See #11003
The goal of this patch is to make "self-insert <string>" act as a
sequence of individual self-insert calls. Once it is done, the
insertion of the commit string in GuiWorkArea can use that, which
fixes the issues described in bug 11183.
1/ in InsetMathNest, SELF_INSERT is rewritten to be a proper loop of
interpretChar, instead of inserting the string as characters. This
solves the issue of interpreting ^ properly.
2/ the text version does not need to be changed (the loop is rewritten
using a range, though).
3/ Then {{{GuiWorkArea::inputMethodEvent}}} is changed to invoke
directly self-insert. This removes the update issues.
Fixes bug 11183.
Otherwise it will be recognized only by the file extension, because
libmagic returns "application/octet-stream" as mime type. Moreover,
if the emf encapsulates a binary image format, it can be confused
with this other format and its preview on screen fails.
In such filesystems, including either Magic.h or magic.h does not
make any difference and the one or other file is included depending
on the search order. In this case, Magic.h was trying to include
itself instead of including magic.h.
This makes the code much easier to read and, additionally, allows to
parse the magic file with magic_load() only once per session.
As a result, getFormatFromFile is slightly faster.
This is not perfect, since variable width columns will break at a certain
treshold, but it is better than what we have now (no tabular width
indication at all)
This effectively enables linebreaks, multipars and layout changes in
non-fixed width (i.e., standard) table columns.
Fixes: #6577
TODO: metrics are wrong (too wide) on screen with linebreaks.