]> git.lyx.org Git - features.git/log
features.git
21 months agoFixup 572b06d6: reduce cache size for breakString
Jean-Marc Lasgouttes [Wed, 21 Sep 2022 12:42:33 +0000 (14:42 +0200)]
Fixup 572b06d6: reduce cache size for breakString

This was necessary only due to bug #12534.

Reduce the size from 10Mb to 1Mb. Profiling shows that the cache hit rate
is the same.

21 months agoDisable use of QPA_XCB if using QT6
Kornel Benko [Sat, 17 Sep 2022 12:14:41 +0000 (14:14 +0200)]
Disable use of QPA_XCB if using QT6

21 months agoUpdate sk.po
Kornel Benko [Sat, 17 Sep 2022 12:13:41 +0000 (14:13 +0200)]
Update sk.po

21 months agoUpdate it.po
Enrico Forestieri [Thu, 15 Sep 2022 18:53:05 +0000 (20:53 +0200)]
Update it.po

21 months agoAmend f426470a
Enrico Forestieri [Wed, 14 Sep 2022 18:10:01 +0000 (20:10 +0200)]
Amend f426470a

The synctex option can also be specified by a single dash and
any value different from zero will do.

21 months agoUnify wording for statistics
Jean-Marc Lasgouttes [Tue, 13 Sep 2022 10:42:28 +0000 (12:42 +0200)]
Unify wording for statistics

Use 'no blanks' uniformly.

Also remove separator in zoom menu.

21 months agoDisentangle status bar and zoom menu
Daniel Ramoeller [Thu, 8 Sep 2022 05:44:15 +0000 (07:44 +0200)]
Disentangle status bar and zoom menu

- Moves the zoom menu to the zoom value

21 months agoUpdate sk.po
Kornel Benko [Wed, 7 Sep 2022 19:13:06 +0000 (21:13 +0200)]
Update sk.po

21 months ago* doxy
Pavel Sanda [Tue, 6 Sep 2022 20:12:25 +0000 (22:12 +0200)]
* doxy

21 months agode.po
Juergen Spitzmueller [Sat, 3 Sep 2022 11:45:18 +0000 (13:45 +0200)]
de.po

21 months agoSimplify status bar context menu
Jean-Marc Lasgouttes [Fri, 2 Sep 2022 17:52:57 +0000 (19:52 +0200)]
Simplify status bar context menu

Remove "Show" prefix.

Remove "(With Blanks)".

21 months ago Update fr.po
jpc [Fri, 2 Sep 2022 09:41:03 +0000 (11:41 +0200)]
        Update fr.po

22 months agoMathML: amend 26300c565f as discussed in bug 12513
Thibaut Cuvelier [Fri, 2 Sep 2022 00:00:12 +0000 (02:00 +0200)]
MathML: amend 26300c565f as discussed in bug 12513

Contributed by lynx

22 months agoMathML: should display "Text" MathFont using proper <mtext> tag
Thibaut Cuvelier [Thu, 1 Sep 2022 23:57:06 +0000 (01:57 +0200)]
MathML: should display "Text" MathFont using proper <mtext> tag

Fixes bug 12397

Contributed by lynx

22 months agoInsetTabular: fix a typo
Thibaut Cuvelier [Thu, 1 Sep 2022 23:30:25 +0000 (01:30 +0200)]
InsetTabular: fix a typo

22 months agoInsetTabular: move more helper methods to private
Thibaut Cuvelier [Thu, 1 Sep 2022 23:29:19 +0000 (01:29 +0200)]
InsetTabular: move more helper methods to private

22 months agoInsetTabular: replace a Boolean parameter to choose between XHTML and DocBook by...
Thibaut Cuvelier [Thu, 1 Sep 2022 23:26:20 +0000 (01:26 +0200)]
InsetTabular: replace a Boolean parameter to choose between XHTML and DocBook by an enum class

The only goal is to improve code readability: this enum class is strictly equivalent to a Boolean, with the same meaning as the previous is_xhtml arguments (arbitrary choice).

22 months agoInsetTabular: move XML helper methods to private
Thibaut Cuvelier [Thu, 1 Sep 2022 21:35:52 +0000 (23:35 +0200)]
InsetTabular: move XML helper methods to private

They are not needed outside InsetTabular.

22 months agoDocBook: amend 50374e38e1
Thibaut Cuvelier [Thu, 1 Sep 2022 21:33:56 +0000 (23:33 +0200)]
DocBook: amend 50374e38e1

All table rows were generated in the same XML dialect, irrespectively of the caller context (XHTML or DocBook).

22 months agoSmall fixes to fr.po related to status bar menu
Jean-Marc Lasgouttes [Thu, 1 Sep 2022 15:35:55 +0000 (17:35 +0200)]
Small fixes to fr.po related to status bar menu

22 months agoUse auto const & when possible to avoid copies
Jean-Marc Lasgouttes [Tue, 30 Aug 2022 15:31:37 +0000 (17:31 +0200)]
Use auto const & when possible to avoid copies

In several range-based for loops, implicit copies are made. Remove
that when possible, and try to shut converity up otherwise.

Fixes issues found by coverity.

22 months ago Update fr.po
jpc [Sun, 28 Aug 2022 16:46:31 +0000 (18:46 +0200)]
       Update fr.po

22 months agoUpdate sk.po
Kornel Benko [Fri, 19 Aug 2022 11:33:14 +0000 (13:33 +0200)]
Update sk.po

22 months agoUpdate stats display if a stat is (un)selected
Juergen Spitzmueller [Thu, 18 Aug 2022 17:08:03 +0000 (19:08 +0200)]
Update stats display if a stat is (un)selected

22 months agoctests: uninvert a utf8x test
Scott Kostyshak [Thu, 18 Aug 2022 14:17:30 +0000 (10:17 -0400)]
ctests: uninvert a utf8x test

The compilation succeeds now, although the behavior might be
different: unless we load ucs explicitly it will proceed with
utf8 instead of utf8x if I understand correctly.

See here for more details:
https://github.com/latex3/latex2e/issues/833#issuecomment-1219535732

22 months agoctests: invert EuropeCV tests
Scott Kostyshak [Thu, 18 Aug 2022 13:09:30 +0000 (09:09 -0400)]
ctests: invert EuropeCV tests

These might not be fixed for a while:

  https://github.com/gsilano/EuropeCV/pull/33

22 months agode.po
Juergen Spitzmueller [Wed, 17 Aug 2022 16:15:29 +0000 (18:15 +0200)]
de.po

22 months agoAnother inset font switch fix
Juergen Spitzmueller [Wed, 17 Aug 2022 16:04:51 +0000 (18:04 +0200)]
Another inset font switch fix

22 months agoPolish status bar statistics
Juergen Spitzmueller [Wed, 17 Aug 2022 12:59:50 +0000 (14:59 +0200)]
Polish status bar statistics

22 months agoLoad ucs before utf8x inputenc with recent ucs versions
Juergen Spitzmueller [Tue, 16 Aug 2022 15:56:07 +0000 (17:56 +0200)]
Load ucs before utf8x inputenc with recent ucs versions

Otherwise inputenc falls back to utf8 option, which breaks documents

22 months agofix compiler warning
Juergen Spitzmueller [Tue, 16 Aug 2022 15:41:40 +0000 (17:41 +0200)]
fix compiler warning

22 months agode/UserGuide: another minor correction
Juergen Spitzmueller [Tue, 16 Aug 2022 10:28:13 +0000 (12:28 +0200)]
de/UserGuide: another minor correction

22 months agode/UserGuide: some minor corrections
Juergen Spitzmueller [Tue, 16 Aug 2022 10:25:55 +0000 (12:25 +0200)]
de/UserGuide: some minor corrections

22 months agode.po
Juergen Spitzmueller [Tue, 16 Aug 2022 09:55:04 +0000 (11:55 +0200)]
de.po

22 months agoImproved synctex support
Stephan Witt [Sat, 13 Aug 2022 12:20:03 +0000 (14:20 +0200)]
Improved synctex support

- Add check for converter with active synctex support to check for synchronized output for activate forward search.

22 months agoconfigure.py: sanitize restrictive policies of IM on some distributions.
Pavel Sanda [Thu, 11 Aug 2022 23:03:09 +0000 (01:03 +0200)]
configure.py: sanitize restrictive policies of IM on some distributions.

Some distros banned GS for Imagemigick conversions.
In effect eps->png conversion is broken and this can't
be fixed locally by the user.

Our workaround is to allow eps->pdf->png conversion from
different tools when IM bans the conversion.

https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg217834.html

22 months agoImproved synctex support
Stephan Witt [Thu, 11 Aug 2022 20:45:51 +0000 (22:45 +0200)]
Improved synctex support

- Check the state of the synchronize TeX output option of the document to enable or disable the LFUN for forward-search.
- write synctex macro to TeX source not only for PdfLaTeX

22 months agoAdditional cursor position validation required to avoid an assertion in Text::selectWord
Stephan Witt [Thu, 11 Aug 2022 20:35:58 +0000 (22:35 +0200)]
Additional cursor position validation required to avoid an assertion in Text::selectWord

22 months agoFix shortcut
Pavel Sanda [Tue, 9 Aug 2022 22:03:20 +0000 (00:03 +0200)]
Fix shortcut

22 months ago* RELEASE-NOTES
Pavel Sanda [Tue, 9 Aug 2022 21:58:13 +0000 (23:58 +0200)]
* RELEASE-NOTES

22 months agoAdd document statistics to statusbar.
Pavel Sanda [Tue, 9 Aug 2022 21:48:55 +0000 (23:48 +0200)]
Add document statistics to statusbar.

https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg217810.html

22 months agoUse localized length strings also in space label/tooltip
Juergen Spitzmueller [Tue, 9 Aug 2022 15:28:41 +0000 (17:28 +0200)]
Use localized length strings also in space label/tooltip

22 months agoMode [un]locLengthString() methods to support/qstring_helpers
Juergen Spitzmueller [Tue, 9 Aug 2022 15:27:53 +0000 (17:27 +0200)]
Mode [un]locLengthString() methods to support/qstring_helpers

22 months agoLocalize display of glue lengths in dialogs
Juergen Spitzmueller [Tue, 9 Aug 2022 07:44:12 +0000 (09:44 +0200)]
Localize display of glue lengths in dialogs

22 months agoRename function
Juergen Spitzmueller [Tue, 9 Aug 2022 07:31:46 +0000 (09:31 +0200)]
Rename function

22 months ago Update fr.po
jpc [Tue, 9 Aug 2022 06:46:54 +0000 (08:46 +0200)]
        Update fr.po

22 months agoAllow entering localized lengths with unit (#11852)
Juergen Spitzmueller [Mon, 8 Aug 2022 16:34:34 +0000 (18:34 +0200)]
Allow entering localized lengths with unit (#11852)

22 months agoAdd detection for available macOS applications and add check for Skim.app as alternat...
Stephan Witt [Mon, 8 Aug 2022 13:46:57 +0000 (15:46 +0200)]
Add detection for available macOS applications and add check for Skim.app as alternate PDF viewer.

22 months agoMake "open -a" implicit on macOS
Stephan Witt [Mon, 8 Aug 2022 08:36:46 +0000 (10:36 +0200)]
Make "open -a" implicit on macOS

Fix for bug #12570 - add simple check for app bundle name and prefix it with macOS open command if name matches

22 months agoUpdate sk.po
Kornel Benko [Mon, 8 Aug 2022 08:20:48 +0000 (10:20 +0200)]
Update sk.po

22 months agoInstall icon.aliases in images/ where it is searched
Juergen Spitzmueller [Mon, 8 Aug 2022 08:13:23 +0000 (10:13 +0200)]
Install icon.aliases in images/ where it is searched

22 months agode.po
Juergen Spitzmueller [Mon, 8 Aug 2022 07:55:07 +0000 (09:55 +0200)]
de.po

22 months agoAmend 9e645a5cfc9d6c3e66d
Juergen Spitzmueller [Mon, 8 Aug 2022 07:49:51 +0000 (09:49 +0200)]
Amend 9e645a5cfc9d6c3e66d

Only show "System Default" if auto-open is available for the current
format.

22 months ago"System Default" viewer/editor option
Daniel Ramoeller [Sun, 7 Aug 2022 15:57:39 +0000 (17:57 +0200)]
"System Default" viewer/editor option

Fix for bug #12571. More user friendly way to set the system default application aka "auto" option.

22 months agoUpdate sk.po
Kornel Benko [Sun, 7 Aug 2022 17:27:06 +0000 (19:27 +0200)]
Update sk.po

22 months ago Update fr.po
jpc [Sun, 7 Aug 2022 16:06:44 +0000 (18:06 +0200)]
    Update fr.po

22 months agode.po
Juergen Spitzmueller [Sun, 7 Aug 2022 14:47:18 +0000 (16:47 +0200)]
de.po

22 months agoGuiGraphic: delimit "Scale in LyX" (1--1000%)
Juergen Spitzmueller [Sun, 7 Aug 2022 14:40:12 +0000 (16:40 +0200)]
GuiGraphic: delimit "Scale in LyX" (1--1000%)

Larger values will eventually crash LyX (see #12353), 0 or negative
values make the image disappear in the workarea and impossible to edit.

22 months agoHandle LFUN_FONT_DEFAULT is InsetTabular::Dispatch (fixes #12566)
Juergen Spitzmueller [Sun, 7 Aug 2022 12:34:42 +0000 (14:34 +0200)]
Handle LFUN_FONT_DEFAULT is InsetTabular::Dispatch (fixes #12566)

22 months agoAmend 4ba989000c4
Juergen Spitzmueller [Sun, 7 Aug 2022 08:41:02 +0000 (10:41 +0200)]
Amend 4ba989000c4

If the lfun argument already has a Flex: prefix (which is equivalent),
do not append one

22 months agoFixup cd8338636395d (#12569)
Juergen Spitzmueller [Sat, 6 Aug 2022 17:00:36 +0000 (19:00 +0200)]
Fixup cd8338636395d (#12569)

22 months agoFix font tracking at fontswitch_insets
Juergen Spitzmueller [Sat, 6 Aug 2022 15:29:40 +0000 (17:29 +0200)]
Fix font tracking at fontswitch_insets

(hopefully)

23 months agoFix a typo in copied comment.
Stephan Witt [Sun, 31 Jul 2022 21:35:14 +0000 (23:35 +0200)]
Fix a typo in copied comment.

23 months agopyupgrade related fixes to python scripts #2.
Pavel Sanda [Sun, 31 Jul 2022 18:08:44 +0000 (20:08 +0200)]
pyupgrade related fixes to python scripts #2.

Patch from Jose.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg217790.html

23 months ago Info in French UserGuide
jpc [Sun, 31 Jul 2022 16:28:23 +0000 (18:28 +0200)]
    Info in French UserGuide

23 months agopyupgrade related fixes to python scripts #2.
Pavel Sanda [Sun, 31 Jul 2022 09:13:53 +0000 (11:13 +0200)]
pyupgrade related fixes to python scripts #2.

Patch from Jose.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg217777.html

23 months agoEnhanced build script to use c++17 with EnableCXXMode for Qt6
Stephan Witt [Sat, 30 Jul 2022 13:04:37 +0000 (15:04 +0200)]
Enhanced build script to use c++17 with EnableCXXMode for Qt6

23 months agoVarious python fixes suggested by pyupgrade.
Pavel Sanda [Sat, 30 Jul 2022 22:36:51 +0000 (00:36 +0200)]
Various python fixes suggested by pyupgrade.

Patch from Jose.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg217770.html

23 months agoanother typo
Pavel Sanda [Sat, 30 Jul 2022 22:26:04 +0000 (00:26 +0200)]
another typo

23 months agowhitespace
Pavel Sanda [Sat, 30 Jul 2022 22:24:33 +0000 (00:24 +0200)]
whitespace

23 months agoDoxy for zoom args in ui-toggle lfun.
Pavel Sanda [Sat, 30 Jul 2022 22:23:09 +0000 (00:23 +0200)]
Doxy for zoom args in ui-toggle lfun.

23 months agoAmend 1dedd398: Adapt some tests to use unspecified unbind.
Kornel Benko [Wed, 27 Jul 2022 18:27:59 +0000 (20:27 +0200)]
Amend 1dedd398: Adapt some tests to use unspecified unbind.

23 months agoAllow to unbind without specifying the lfun
Jean-Marc Lasgouttes [Wed, 27 Jul 2022 09:52:50 +0000 (11:52 +0200)]
Allow to unbind without specifying the lfun

When unbinding a shortcut, it may happen that the exact definition of
the request is not known. A typical example it Tab, which is bound to
a complex command sequence.

In this case it is convenient to use the syntax
\unbind "Tab" "*"

To make this word, the special "*" value is translated to the
FuncRequest::unknown lfun and this value is considered specially in
several places.

23 months agoRemove unneeded code
Scott Kostyshak [Wed, 27 Jul 2022 11:26:19 +0000 (07:26 -0400)]
Remove unneeded code

This code was triggering the following warnings:

  src/mathed/InsetMathHull.cpp:234:15: error: variable 'counters_to_save' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
          const char * counters_to_save[] = {"section", "chapter"};
                       ^
  src/mathed/InsetMathHull.cpp:235:21: error: unused variable 'numcnts' [-Werror,-Wunused-const-variable]
          unsigned int const numcnts = sizeof(counters_to_save)/sizeof(char *);

The original code was put in at 645f9fdf (and the comment at 8a226ec4).

This commit amends a65e12d6.

23 months agoDo not redefine \jobname for previews
Jean-Marc Lasgouttes [Wed, 27 Jul 2022 10:37:13 +0000 (12:37 +0200)]
Do not redefine \jobname for previews

This reverts the fix for #9627, with the agreement of original reporter.

Fixes preview of citation insets.

23 months agoRegenerate equations previews when their numbering changes.
Jean-Marc Lasgouttes [Mon, 25 Jul 2022 20:13:35 +0000 (22:13 +0200)]
Regenerate equations previews when their numbering changes.

Time will tell whether this is too expensive (because most equations
after this on will change too, unless equations are numbered by
section).

Related to bug #11535.

23 months agoReimplement support for numbering of equation previews
Jean-Marc Lasgouttes [Mon, 25 Jul 2022 20:09:14 +0000 (22:09 +0200)]
Reimplement support for numbering of equation previews

This patch simplifies and fixes the generation of previews with
numbering. Instead of saving the counter values (which is complicated
and error prone), the \thequation macro is set to the numbers_ string
which has been computed by updateBuffer for screen display.

Harcoding the number in the formula means that two equations with
different numbers have different previews, which is the subject of the
bug.

The special code for saving counters in updateBuffer and outputing
them in preparePreview from 645f9fdf (ticket #6894) is removed and
replaced by this simpler approach.

This fixes ticket #11535.

23 months agoRename eolString() to eol() and pass a MathTeXStream parameter
Jean-Marc Lasgouttes [Mon, 25 Jul 2022 20:02:59 +0000 (22:02 +0200)]
Rename eolString() to eol() and pass a MathTeXStream parameter

This is completely equivalent, but will allow in eol() to determine
whether one is preparing a preview.

Related to bug #11535.

23 months agoFixup 1d08af62: unused variable
Jean-Marc Lasgouttes [Mon, 25 Jul 2022 22:54:54 +0000 (00:54 +0200)]
Fixup 1d08af62: unused variable

23 months agoImplement on screen numbering for Subequation module
Jean-Marc Lasgouttes [Fri, 22 Jul 2022 22:56:07 +0000 (00:56 +0200)]
Implement on screen numbering for Subequation module

The module subequation allows to number equations in the "Subfigure"
inset to be numbered (1a), (1b), (1c), etc.

To implement this on screen, we need to redefine temporarily the
"equation" counter to use this different numbering.

To this end, implement Counters::copy method that can be used to
backup full counter definitions.

Fixes bug #12567.

23 months agoRevert "Implement on screen numbering for Subequation module"
Jean-Marc Lasgouttes [Mon, 25 Jul 2022 22:47:28 +0000 (00:47 +0200)]
Revert "Implement on screen numbering for Subequation module"

This reverts commit c6f35b6ad66e57fef3f7833430b828d5f936a35a.

23 months agoRevert "Rename eolString() to eol() ans pass a MathTeXStream parameter"
Jean-Marc Lasgouttes [Mon, 25 Jul 2022 22:46:13 +0000 (00:46 +0200)]
Revert "Rename eolString() to eol() ans pass a MathTeXStream parameter"

This reverts commit 2db682b97eff2362bb7865c7637881906bf0f2cf.

23 months agoRevert "Reimplement support for numbering of equation previews"
Jean-Marc Lasgouttes [Mon, 25 Jul 2022 22:45:57 +0000 (00:45 +0200)]
Revert "Reimplement support for numbering of equation previews"

This reverts commit f4da29306fc8acc0cca2ac6fe36f7dfcb58c2563.

23 months agoImprove comment
Jean-Marc Lasgouttes [Mon, 25 Jul 2022 22:44:16 +0000 (00:44 +0200)]
Improve comment

23 months agoReimplement support for numbering of equation previews
Jean-Marc Lasgouttes [Mon, 25 Jul 2022 20:09:14 +0000 (22:09 +0200)]
Reimplement support for numbering of equation previews

This patch simplifies and fixes the generation of previews with
numbering. Instead of saving the counter values (which is complicated
and error prone), the \thequation macro is set to the numbers_ string
which has been computed by updateBuffer for screen display.

Harcoding the number in the formula means that two equations with
different numbers have different previews, which is the subject of the
bug.

The special code for saving counters in updateBuffer and putputing
them in preparePreview from 645f9fdf (ticket #6894) is removed and
replaced by this simpler approach.

This fixes ticket #11535.

23 months agoRename eolString() to eol() ans pass a MathTeXStream parameter
Jean-Marc Lasgouttes [Mon, 25 Jul 2022 20:02:59 +0000 (22:02 +0200)]
Rename eolString() to eol() ans pass a MathTeXStream parameter

This is completely equivalent, but will allow in eol() to determine
whether one is preparing a preview.

Related to bug #11535.

23 months agoImplement on screen numbering for Subequation module
Jean-Marc Lasgouttes [Fri, 22 Jul 2022 22:56:07 +0000 (00:56 +0200)]
Implement on screen numbering for Subequation module

The module subequation allows to number equations in the "Subfigure"
inset to be numbered (1a), (1b), (1c), etc.

To implement this on screen, we need to redefine temporarily the
"equation" counter to use this different numbering.

To this end, implement Counters::copy method that can be used to
backup full counter definitions.

Fixes bug #12567.

23 months agoExport ' as ’ in HTML
Jean-Marc Lasgouttes [Sun, 17 Jul 2022 17:09:22 +0000 (19:09 +0200)]
Export ' as ’ in HTML

This is similar to what LaTeX does in its output.

See the (long) discussion in ticket #11244.

23 months agoFix flicker due to changing metrics while selecting with the mouse
Jean-Marc Lasgouttes [Fri, 22 Jul 2022 23:57:56 +0000 (01:57 +0200)]
Fix flicker due to changing metrics while selecting with the mouse

This patch has been backported from the lyx-unstable branch
https://gitlab.com/gadmm/lyx-unstable/-/commit/9d7ed42389ba

Actual author is Guillaume Munch.

Fixes bug #8951.

23 months agoImproved layout adoption on paste
Daniel Ramoeller [Thu, 15 Oct 2020 14:40:20 +0000 (16:40 +0200)]
Improved layout adoption on paste

The layout from the paste content is adopted only if
- the paragraph is empty (ie. empty after the selection has been
  erased) and Standard or Plain Layout, or
- empty and multiple lines are pasted, or
- multiple lines are pasted at the beginning of a paragraph

As for what other applications do:
- MS Word decides the adoption of a layout depending on whether the end of line
character is copied
- Libre Writer adopts the paste content layout only if the paragraph is empty
(otherwise it makes *all* pasted paragraph the target layout)

In LyX, as in Libre Writer, one cannot copy the end of line character by
selecting a single line. However, the Libre Writer solution is problematic
because one always has to make sure that a paragraph is in Standard layout if
one wants to paste several lines with their source layout. The implemented
behaviour differs from Libre Writer in that the source format is kept when end
of line characters are pasted, i.e. several lines are pasted, and hence does
what MS Word does in that situation.

Fix for bug #11023: Copy and paste from one list into another often leads to
undesired result.

23 months agoAdd proper extension as needed in Save as and Export
Jean-Marc Lasgouttes [Sun, 17 Jul 2022 18:10:53 +0000 (20:10 +0200)]
Add proper extension as needed in Save as and Export

Introduce the new FileName method ensureExtension, which does the following:
* if the extension is already correct (in a case-insensitive way), do nothing.
* if it is not correct, add the extension to the file name.

This is different from changeExtension that will fail in a case where
the file contains dots, but not a real extension, like newfile2.1.

Use this new method in renameBuffer() and exportBufferAs().

Fixes bug #11008.

23 months agoFix for blue rectangles on math Style icon
Daniel Ramoeller [Tue, 2 Feb 2021 11:02:30 +0000 (12:02 +0100)]
Fix for blue rectangles on math Style icon

Fix for bug #12103.

23 months agoFix display of bindings for StaticMenuButton
Jean-Marc Lasgouttes [Tue, 19 Jul 2022 16:39:04 +0000 (18:39 +0200)]
Fix display of bindings for StaticMenuButton

This requires to add a parameter to GuiToolbar::addItem so that it is
possble to make a difference between toolbar buttons and menu items.

The long-term solution is to rely on the menu backend for such things.

Fixes bug #12004.

23 months agoRevert "Fix display of bindings for View-other-formats dynamic toolbar menu"
Jean-Marc Lasgouttes [Tue, 19 Jul 2022 11:36:12 +0000 (13:36 +0200)]
Revert "Fix display of bindings for View-other-formats dynamic toolbar menu"

This reverts commit e2e7794c7e3c6f5f9535789019d5e78ae1f676d9.

23 months agoFix display of bindings for View-other-formats dynamic toolbar menu
Jean-Marc Lasgouttes [Tue, 19 Jul 2022 11:22:18 +0000 (13:22 +0200)]
Fix display of bindings for View-other-formats dynamic toolbar menu

Do it the same way as in menus. Also remove the tooltip, which is not used.

Fixes bug #12004.

23 months agoDisable flex-insert when inset does not exist
Jean-Marc Lasgouttes [Tue, 19 Jul 2022 10:31:50 +0000 (12:31 +0200)]
Disable flex-insert when inset does not exist

This is useful when adding icons to the toolbar that insert insets not
availble by default (but provided by a module).

Fixes bug #11690.

23 months agoWhen pasting as LaTeX, honor textclass and modules
Jean-Marc Lasgouttes [Sun, 17 Jul 2022 22:50:33 +0000 (00:50 +0200)]
When pasting as LaTeX, honor textclass and modules

There are several small parts that are needed here:

* Implement LayoutModuleList::asString() that returns a comma-separated
  list of modules.

* in Converter::convert(), handle the new tokens $$c for the current
  textclass and $$m for the list of modules.

* in Buffer::importFile(), pass the current buffer as parameter instead
  of nullptr.

* in pasteClipboardText(), copy the parameters of the current buffer to
  the internal one used for importation, so that the textclass and
  modules information is available to convert().

* finally, modify configure.py to pass "-c $$c -m $$m" to tex2lyx for
  the latexclipoard->lyx converter.

Fixes bug #11312.

23 months agoAmend 2b24c03e: Do not override (Back)Tab in Adv F&R when it is useful
Kornel Benko [Mon, 18 Jul 2022 20:55:03 +0000 (22:55 +0200)]
Amend 2b24c03e: Do not override (Back)Tab in Adv F&R when it is useful

While testing we want to override 'Tab' in Adv F&R.
Unbinding 'Tab' seems to help, thanks to JMarc for the suggestion.

23 months agoFix forcing of text class for LaTeX snippets
Jean-Marc Lasgouttes [Sun, 17 Jul 2022 22:45:01 +0000 (00:45 +0200)]
Fix forcing of text class for LaTeX snippets

When the input document is not a full document, make sure that the -c
is taken into account.

23 months agoDo not override (Back)Tab in Adv F&R when it is useful
Jean-Marc Lasgouttes [Mon, 18 Jul 2022 10:02:28 +0000 (12:02 +0200)]
Do not override (Back)Tab in Adv F&R when it is useful

In Advanced Find and Replace, Tab can be used to move the focus from
Search field to the replace field. This is inconvenient when Tab has
another use, like completion.

To fix this, check that the function bound to Tab is disabled before switching focus.

The same is done for BackTab.

Fixes bug #11114.