Commit Graph

38820 Commits

Author SHA1 Message Date
José Matos
94905f9ce3 Use insert_document_option to remove Georgian when reverting.
Less code for the same functionality. :-)
2018-04-28 18:47:32 +01:00
José Matos
08182ead14 Remove spurious spaces at the end of lines 2018-04-28 18:31:31 +01:00
Scott Kostyshak
4f7a5f8c3e Fix duplicate, disabled "Separated Frame Below"
This commit fixes an issue where the menu option "Insert Separated
Frame Below" would show up twice, with one instance disabled. This
occurred when there was a "Standard" environment nested in a
"Frame". With this commit, the duplicate instance is removed.
2018-04-28 11:45:17 -04:00
José Matos
ea8b0df0e4 Add new semantic functions to add an remove document options.
The objective is to identify common operations and place them
in functions in order to improve the readability and correctness of the code.

is_document_option(document, option):
  Find if _option_ is a document option (\\options in the header).

insert_document_option(document, option):
  Insert _option_ as a document option.

remove_document_option(document, option):
  Remove _option_ as a document option.
2018-04-28 15:10:09 +01:00
José Matos
91ded82b52 Small improvement to pre-historic file format conversion. 2018-04-28 14:57:57 +01:00
José Matos
1fe328666c Improve the readability of lyx2lyx -l option
Example:
$ lyx2lyx -l
...
2.2     stable format:       508
        stable versions:     ['2.2.0', '2.2.1', '2.2.2', '2.2.3', '2.2.4']
        development formats: 475 - 507

2.3     stable format:       544
        stable versions:     ['2.3.0']
        development formats: 509 - 543

2.4     stable format:       -- not yet --
        stable versions:     -- not yet --
        development formats: 545 - 550
2018-04-28 14:42:31 +01:00
Juergen Spitzmueller
0b2fae66e3 unicodesymbols: add general way to require a feature only for specific encodings
A feature can now be required only for specific input or font encodings:
- <feature>=enc1;enc2...  Require the feature <feature> only if the
                          character is used in one if the specified font
                          or input encodings.
- <feature>!=enc1;enc2... Require the feature <feature> only if the
                          character is used in a font or input encoding
                          that is not among the specified.
2018-04-28 13:31:29 +02:00
José Matos
5b160e82be Update scripts to support simultaneously python 2 and 3
The fixes are simple and on line with the changes made during
the 2.3 development. It was an oversight to leave them out.

With this commit all the python scripts should be supported by
python 2 and 3.
2018-04-28 10:51:35 +01:00
Juergen Spitzmueller
c7bdb3b342 Rework OK/Apply/Cancel UI of prefs dialog
Instead of "Save" (permanently) and "Apply" (temporarily), OK and Apply
now always save permanently, unless the new checkbox "Apply to current
session only" is checked.

Addresses: #10016
2018-04-28 11:19:26 +02:00
Scott Kostyshak
e49a10729e Initialize toolbarsMovable_
Valgrind detected a conditional jump because this member was not
initialized.
2018-04-27 21:20:56 -04:00
Richard Kimberly Heck
9f79ab99ed Fix bug #11127. 2018-04-27 20:13:58 -04:00
Kornel Benko
0519a70297 Make the lyx2lyx test-file 'lyx_2_1_test.lyx' compilable.
Inserted short German text to provoke loading its language feature
to babel.
2018-04-27 19:58:25 +02:00
Juergen Spitzmueller
7018d3641f Don't add localswitch if no language changes 2018-04-27 18:27:21 +02:00
Kornel Benko
cf7c31b559 Amend 26ea1e1 for roundtrip tests 2018-04-27 12:49:13 +02:00
Kornel Benko
b91bc7d602 Correct graphical reference 2018-04-27 10:54:38 +02:00
Juergen Spitzmueller
f778870338 Close/reopen local language switches at each par
Fixes: #11128
2018-04-27 09:48:14 +02:00
Jean-Marc Lasgouttes
90cfe4ec3b Adapt caret height to context in mathed.
Compute a height from current font and current cell vertical
dimensions in MathData::metrics(), because this is where current font
is known.

Introduce BufferView::setCaretAscentDescent to remember this value.

This mechanism is not used for text because Cursor::current_font is
restored by undo, and the caret height would not be changed then. But
in principle it is doable.
2018-04-27 00:03:48 +02:00
Jean-Marc Lasgouttes
2f1eb35b86 Rework caret display code
The new code is much simpler: what it does is, after redrawing has
been done, to mark the cursor row as changed, so that it will be
repainted on next paint event.

This avoids some crashes at the price of possibly repainting the row
when it was not necessary.
2018-04-26 23:25:31 +02:00
Kornel Benko
5177fd1135 Update sk.po 2018-04-26 07:29:51 +02:00
Richard Kimberly Heck
19e6977b5b Try to fix bug #10989.
The problem is that popping dialogs during reload can cause paint
events for which we are not ready. If this does not work, then we
can introduce a new flag, besides 'busy', for that case. But busy
does not seem to be used very widely, so hopefully this works.
2018-04-25 23:46:13 -04:00
Richard Kimberly Heck
4e8730b57e Const. 2018-04-25 22:51:57 -04:00
Richard Kimberly Heck
ba0f28a09b Simplify some code now that we don't need it for indexes.
This has the effect that inserting nomenclature entries does not
cut the selection (implicit or explicit) but rather copies it, which
seems to me to make a lot more sense. If anyone objects, let me know.
2018-04-25 22:22:36 -04:00
Richard Kimberly Heck
aa2f409d87 Restore implicit word selection for inset insertion.
Modifies 83356ab9.
2018-04-25 21:48:25 -04:00
Richard Kimberly Heck
821e101547 Improve error message a bit more.
Sorry to Kornel, who had already updated sk.po!
2018-04-25 18:43:49 -04:00
Richard Kimberly Heck
6b095e2b71 Don't sort the bibfiles cache.
This causes problems with biblatex. Instead, we sort the old and
new lists and then compare them.
2018-04-25 13:41:12 -04:00
Kornel Benko
1528a80ccb Update sk.po 2018-04-25 19:13:23 +02:00
Richard Kimberly Heck
04f7151684 Improve error message. 2018-04-25 12:05:25 -04:00
Juergen Spitzmueller
389352b3fb Add optional flavor flag to needaux
Also, use latex flavor if no flag is given rather than default output
format

Fixes: #9127
2018-04-25 13:51:40 +02:00
Kornel Benko
0add7120ba ctests: Test dedicated LaTeX test samples with LaTeX export only.
A fixed size table cell which contains multiple paragraphs in other language
2018-04-25 12:14:32 +02:00
Jean-Marc Lasgouttes
68ec34e603 Redo metrics after cancelling macro mode
When the cursor is inside a subscript that may become empty, metrics
issues can happen. This patch fixes the issue, although it is not
clear to see what the problem is.

Still, requesting a metrics update also in the case where the macro
mode is canceled makes sense.

Fixes bug #11125.
2018-04-24 14:03:35 +02:00
Richard Kimberly Heck
ae45a5de59 Add slightly improved error message.
(cherry picked from commit 4f0504d778)
2018-04-23 20:36:56 -04:00
Juergen Spitzmueller
dcd0586b75 Add T1 fontenc as fallback for no font
This probably needs some more thought.
2018-04-23 18:35:11 +02:00
Juergen Spitzmueller
72cebc2514 We need the "none" return value of main_font_encoding 2018-04-23 16:21:08 +02:00
Juergen Spitzmueller
0e75a749d0 Move definition out of loop 2018-04-23 16:21:08 +02:00
Kornel Benko
432580e397 Cmake export tests: All cyrillic tests pass no 2018-04-23 14:57:21 +02:00
Juergen Spitzmueller
f63de41c4c Remove Language::fontenc()
This raw vector of fontenc alternatives is not needed outside Language,
and it should actually never be used.
2018-04-23 12:59:57 +02:00
Juergen Spitzmueller
998f097686 Correct fontenc for secondary languages 2018-04-23 12:33:11 +02:00
Juergen Spitzmueller
1af0832f75 Do not require cprotect if we only have a cprotectible inset in the maintext. 2018-04-23 11:04:18 +02:00
Richard Kimberly Heck
8da025014d Add bindings for inset-settings.
Fixes #7762.
2018-04-22 23:56:17 -04:00
Richard Kimberly Heck
34c559edeb Whitespace 2018-04-22 21:45:36 -04:00
Juergen Spitzmueller
a883133e8d Paragraph on top level do not need cprotection. 2018-04-22 20:15:04 +02:00
Juergen Spitzmueller
26ea1e1496 Align fontenc with document fonts
Following a request by Günter, we consider the document fonts (only rm
for now) when selecting an appropriate font encoding.

See #9741

The new default font encoding setting "auto" does

* consider the font encoding needed by the language(s), which can now
  have fallback alternatives
* Consider which font encoding is provided by the document font

Thus, cm now will result in OT1 fontenc, if the language can deal with
that.

The font_enc pref is ditched: it is no longer needed.

The automatism is still very basic and is subject to extension.

File format and prefs format change.
2018-04-22 19:06:46 +02:00
Kornel Benko
337ec5830a Cmake build: Output error messages emitted by lyx_pot.py 2018-04-22 12:06:47 +02:00
Kornel Benko
4f93e28b0c Adapt Format-entry in unix/lyxrc.dist 2018-04-22 12:02:27 +02:00
Kornel Benko
17dc24419a Adapt test outline-beamer' to the synchronous batch export
Also add the 'export'- label to this test
2018-04-22 11:59:19 +02:00
Juergen Spitzmueller
3457d9d25f Output "textbaltic" definitions only if needed. 2018-04-22 10:08:07 +02:00
Juergen Spitzmueller
2ed1012ead Document Provides in languages 2018-04-22 09:07:31 +02:00
Scott Kostyshak
dc404b19a5 Comment: buffer-forall should be run synchronously
As of 8be51425, "buffer-forall" joins "command-sequence" and
"repeat" in this category of LFUNs.
2018-04-21 23:05:21 -04:00
Scott Kostyshak
8be514258f buffer-forall now disables async
Before, the command

  buffer-forall buffer-export

only exported one buffer for me. With async disabled, the command
works as documented and successfully exports all buffers.

Also before, I received an assertion from

  buffer-forall buffer-close

which caused a SIGSEGV at #9422. Now, the action works as expected.
2018-04-21 22:59:26 -04:00
Richard Kimberly Heck
97021ee369 Avoid warning. 2018-04-21 21:41:47 -04:00