Commit Graph

5122 Commits

Author SHA1 Message Date
Richard Kimberly Heck
6014492699 Try yet again try to fix bug #9158.
The problem with the previous attempt was that, every time through
updateBuffer, we looked up the file location using kpsewhich, which
took too long on Windows. The new solution is to cache that info, and
to look it up only when we need it.

Previously, this info would have been re-read whenever we parsed the
bibfiles. So we re-read it now whenever the bibinfo cache is invalid,
which is less often, but should be good enough. We can add more such
re-reads if need be.
2018-09-02 11:50:03 -04:00
Richard Kimberly Heck
2bb8bd3ec4 Signal need for reload of bibinfo cache rather than doing it. 2018-09-02 00:16:45 -04:00
Richard Kimberly Heck
a3e87dad80 Revert "Try yet again try to fix bug #9158."
(Unintentionally committed.)

This reverts commit 7b29d4e7aa.
2018-09-02 00:09:19 -04:00
Richard Kimberly Heck
7b29d4e7aa Try yet again try to fix bug #9158.
The problem with the previous attempt was that, every time through
updateBuffer, we looked up the file location using kpsewhich, which
took too long on Windows. The new solution is to cache that info, and
to look it up only when we need it.

Previously, this info would have been re-read whenever we parsed the
bibfiles. So we re-read it now whenever the bibinfo cache is invalid,
which is less often, but should be good enough. We can add more such
re-reads if need be.
2018-09-01 23:13:00 -04:00
Juergen Spitzmueller
bc644d131c Fix potential null pointer detected by Coverity 2018-09-01 10:45:03 +02:00
Juergen Spitzmueller
5279f3e11f Fix uninitialized value revealed by Coverity 2018-09-01 10:41:29 +02:00
Juergen Spitzmueller
b0f579655c InsetInfo: Move validateArgument() to params
and use it for LFUN_INFO_INSERT validation
2018-08-18 14:29:15 +02:00
Juergen Spitzmueller
6d71b9b69a Fix line break in tooltip
Fixes: #11252
2018-08-17 10:32:57 +02:00
Juergen Spitzmueller
b124adbd38 Introduce listpreamble argument type
This uses the InsetArgument interface to provide access to a document
part hitherto inaccessible by LyX: the part between \begin and the first
\item in a list (where lengths and counters can be redefined, for
instance).

Fixes: #11098

File format change, layout format change
2018-08-17 10:22:32 +02:00
Juergen Spitzmueller
e9b187af08 New info-inset type l7n
This returns a localized version of a string (in the GUI language)
if available, removing trailing colons and accelerator marks.

This can be used to refer to dialog items in the docs in a portable way.
2018-08-13 17:18:44 +02:00
Juergen Spitzmueller
d6a93143ec InsetInfo: enable inset dissolve 2018-08-11 17:43:25 +02:00
Juergen Spitzmueller
806f742263 Amend 5f45b3ed9c 2018-08-09 17:23:05 +02:00
Juergen Spitzmueller
5f45b3ed9c Fix shortcuts info output on the Mac
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
2018-08-09 16:59:06 +02:00
Juergen Spitzmueller
b8ed202658 Consider default output format 2018-08-08 15:50:04 +02:00
Juergen Spitzmueller
91a5263d68 Extend list of accessible menu info
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
2018-08-08 15:05:58 +02:00
Juergen Spitzmueller
dd3ae00f74 Disambiguate time (period) from time (of day). 2018-08-07 15:24:40 +02:00
Juergen Spitzmueller
c6d8efba6c Add user name and email to Insert > Fields
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.
2018-08-07 14:57:44 +02:00
Juergen Spitzmueller
2cd7aab7cf Validate (fix) date vs. time specifier 2018-08-07 12:56:43 +02:00
Juergen Spitzmueller
7efdf98fc8 Further extend Info insets:
* Add time type (time, modtime, fixtime)
* Add "name-noext" buffer type (file name w/o extension)
2018-08-07 12:14:45 +02:00
Juergen Spitzmueller
307319e95e Introduce InsetInfoParams
This allows to open the dialog without having an inset already.
2018-08-06 20:07:15 +02:00
Juergen Spitzmueller
e730234e57 Add date-related info insets
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.
2018-08-05 10:01:36 +02:00
Juergen Spitzmueller
87a7f728ca reorder entries 2018-08-01 16:51:38 +02:00
Juergen Spitzmueller
abaccece15 InsetInfo: use localized shortcuts 2018-08-01 15:17:46 +02:00
Juergen Spitzmueller
8d45179403 More GuiInfo usability work 2018-08-01 09:28:03 +02:00
Juergen Spitzmueller
a76c69dea8 Typo.
Thanks, Kornel.
2018-07-30 17:02:28 +02:00
Juergen Spitzmueller
358436ea1e Split vcs Info inset from buffer Info inset
This should go separately in the GUI, and thus in the inset.
2018-07-29 19:41:34 +02:00
Juergen Spitzmueller
5075ce0297 InsetInfo: add useful shortcuts. 2018-07-29 18:28:18 +02:00
Juergen Spitzmueller
a8b0e64094 Try to please windows compiler 2018-07-28 10:26:52 +02:00
Juergen Spitzmueller
803a88f243 Sort out problems with InsetInfo language settings
* 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
2018-07-27 12:14:37 +02:00
Jean-Marc Lasgouttes
ab2b5e02f9 Revert "Make formal table lines exagerately thick to identify \cmidrule"
This not the correct solution. Let's see if we find a better one.

This reverts commit d900b1fcec.
2018-07-25 17:40:42 +02:00
Juergen Spitzmueller
d1ec35a0dc Amend 79cf3f5ec1
Some InfoInsets have to be LTR always.
2018-07-25 11:38:56 +02:00
Juergen Spitzmueller
79cf3f5ec1 Fix text direction issue for InsetInfo in RTL context
Fixes: #10463
2018-07-25 11:00:00 +02:00
Juergen Spitzmueller
1883c4346d Revert "Fix toggle-line for multi-cell selection"
This changes the behavior of the table border toolbar in a way I am not sure everybody appreciates.

This reverts commit 022228e56f.
2018-07-24 08:48:33 +02:00
Jean-Marc Lasgouttes
d900b1fcec Make formal table lines exagerately thick to identify \cmidrule
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.
2018-07-24 00:07:59 +02:00
Jean-Marc Lasgouttes
ad954a32a5 Aesthetics: off-by-one in line drawing
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.
2018-07-23 17:16:03 +02:00
Juergen Spitzmueller
022228e56f Fix toggle-line for multi-cell selection 2018-07-23 17:00:31 +02:00
Juergen Spitzmueller
91254472e6 Allow to change multiple columns' width at once
Fixes: #11205
2018-07-23 16:36:19 +02:00
Enrico Forestieri
16ca5290c0 Fix bug #11203
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.
2018-07-22 22:22:13 +02:00
Juergen Spitzmueller
8ef7d1aaec Amend d41c3f27d9
Quote insets are allowed in ERT.
2018-07-22 20:04:19 +02:00
Jean-Marc Lasgouttes
05d3a64952 Use swap in InsetText::updateBuffer for notes ad friends
Avoid as much as possible to do full copies of all counters, since
that can be exensive. Unfortunately, it is just posible when we want
to restore the saved counters.

Explanations why we use friend swap is here:
https://stackoverflow.com/questions/5695548/public-friend-swap-member-function

Part of bug #5973.
2018-07-22 12:35:05 +02:00
Jean-Marc Lasgouttes
84328c8538 Amend 8651cd89: only full top/bottom rules are thicker 2018-07-21 20:07:33 +02:00
Juergen Spitzmueller
0bf7b3211d (a)mend edb2d14124 2018-07-21 18:33:49 +02:00
Juergen Spitzmueller
edb2d14124 Set RTL tooltips RTL
Fixes: #10672
2018-07-21 18:23:47 +02:00
Jean-Marc Lasgouttes
8651cd89f6 Draw top/bottom rules heavier for booktab
This gives a better idea of the TeX output, even though the width are
not correct.
2018-07-20 00:26:41 +02:00
Jean-Marc Lasgouttes
76512a7569 Use a unicode character for menu separator on screen
Additionally, use a left pointing character in a RtL setting.
2018-07-19 23:05:00 +02:00
Jean-Marc Lasgouttes
9b3fede789 Introduce FontMetrics::xHeight
Use it instead of measuring the height of character 'x'.
2018-07-19 22:16:40 +02:00
Juergen Spitzmueller
e5a9244bef Proper logos with RTL
Fixes #10423
2018-07-15 20:56:55 +02:00
Juergen Spitzmueller
aa1d9638fe Fix quotation marks in RTL script
Fixes: #11188
2018-07-15 12:11:10 +02:00
Juergen Spitzmueller
d41c3f27d9 Disallow any inset inside ERT
Attempting to do this crashes in master, and is not supported anyway.
2018-07-10 07:11:59 +02:00
Juergen Spitzmueller
e6e3777363 Add support for bib files encoding
File format change.

Fixes: #6223
2018-07-07 15:25:35 +02:00