Commit Graph

44464 Commits

Author SHA1 Message Date
Daniel Ramoeller
d7eecccfd4 Fix for blue rectangles on math Style icon
Fix for bug #12103.
2022-07-23 17:15:50 +02:00
Jean-Marc Lasgouttes
7823d3b01b 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.
2022-07-19 20:58:06 +02:00
Jean-Marc Lasgouttes
23a27e90ba Revert "Fix display of bindings for View-other-formats dynamic toolbar menu"
This reverts commit e2e7794c7e.
2022-07-19 13:36:12 +02:00
Jean-Marc Lasgouttes
e2e7794c7e 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.
2022-07-19 13:30:31 +02:00
Jean-Marc Lasgouttes
cd83386363 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.
2022-07-19 12:31:50 +02:00
Jean-Marc Lasgouttes
96e7fcd4e0 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.
2022-07-19 00:28:28 +02:00
Kornel Benko
f771f77c67 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.
2022-07-18 22:55:03 +02:00
Jean-Marc Lasgouttes
efef533d91 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.
2022-07-18 19:40:41 +02:00
Jean-Marc Lasgouttes
2b24c03e8b 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.
2022-07-18 12:02:28 +02:00
Daniel Ramoeller
3305b9301e Properly draw changed Captions
Fix for bug #12555.
2022-07-17 15:11:45 +02:00
Jean-Marc Lasgouttes
45191d04f9 Rename Row::right_boundary to end_boundary
This is more correct for RtL paragraphs.
2022-07-16 18:13:47 +02:00
Jean-Marc Lasgouttes
31579edd76 Fixup b2a7b715a2: At least one 'HFill' should remain in the doc. 2022-07-16 00:33:55 +02:00
Enrico Forestieri
6355fceafc Update it.po 2022-07-14 20:59:47 +02:00
Jean-Marc Lasgouttes
045aff3d9f Avoid duplicates in minibuffer history
The removal of duplicates is done in LastCommandsSection::add and uses
the erase-remove idiom for performance.

Most of the patch is a cleanup of GuiCommandBuffer:

* remove history_ member, that was a copy of the session lastcommands
  vector. Use instead a wrapper history() around it and a addHistory
  wrapper for adding new entries.

* Make sure that there is only one place where commands are added to
  history. The code used to maintain a list for interactive editing,
  and a list for saving the session. They could be different in terms
  of leading/trailing spaces.

* [unrelated] remove command_ member, which is just a copy of
  LyXAction list of commmands. Use directly lyxaction instead.
2022-07-13 19:53:08 +02:00
Enrico Forestieri
4a7a19352c Fix bug #12561
In mathed it is assumed that a labeled line is also implicitly numbered.
However, latex allows to label an equation without numbering it.
The label is then assigned the value of a nearby numbered one.
This commit drops the above mathed assumption in order to allow to import
valid latex code with a labeled but not numbered equation line.

The screen representation omits the line number and encloses the label
in square brackets for further differentiation. However, it is still not
possible to label an equation without numbering it using the GUI.
2022-07-13 19:11:03 +02:00
Jean-Marc Lasgouttes
f71a11f693 Fixup 95da2707: document getAlias. 2022-07-13 13:10:57 +02:00
Kornel Benko
7f32b02306 Amend 95da2707 for Cmake: Check for icon aliases 2022-07-13 09:36:45 +02:00
Scott Kostyshak
c63e9d4caa Style 2022-07-12 17:55:04 -04:00
Daniel Ramoeller
95da270711 Check for icon aliases
The aliases are defined by a file in the (system or user) image
directory. The format is pretty simple: each line is like
  <str1> <str2>
Where every instance of <str1> will be replaced with <str2>.

Fixes bug #12509.
2022-07-12 23:35:48 +02:00
Scott Kostyshak
21eb2c4f74 Allow negative values for counters
enumi, for example, can be negative.
2022-07-09 16:40:22 -04:00
Kornel Benko
e481981dea Update sk.po 2022-07-05 08:58:40 +02:00
Scott Kostyshak
74dfb2e323 Amend 2022-07-04 14:36:03 -04:00
Scott Kostyshak
7281b8d50d ctests: log an upstream issue that wasted time 2022-07-04 14:29:07 -04:00
Jean-Marc Lasgouttes
2104ae8068 Fixup c30b0aac: protect against bad recursion
Adding this particular line created bad redraw interactions. See
thread on lyx-devel here:
https://marc.info/?l=lyx-devel&m=165648365808777&w=2

The code is reorganized a bit:

- the part of updateGUI() that (en|dis)abled elements is not moved to
  updateBottons ; the rest is renamed updateWorkAreas()

- only updateButtons is called now in eventFilter

- finally the recursion curse is fixed now in updateWorkAreas() by
  setting the old_buffer value _before_ calling copy_params. This
  avoid recursion if some bad update were to happen again.
2022-07-02 13:10:16 +02:00
Scott Kostyshak
8c8f558c4d ctests: log issue triggered by microtype update
These tests were already inverted at 93066f13.
2022-07-01 10:18:40 -04:00
Jean-Marc Lasgouttes
4c6dce1b0b Remove useless message (and avoid endless loop)
When changing the document class, the message "Converting document to
new document class..." is shown in minibuffer. This message leads to
weird GUI update interactions with the FindAndReplace panel, and
ultimately infinite loops. It would only be useful if the conversion
took a long time.

See this thread for rreference:
https://marc.info/?l=lyx-devel&m=165648365808777&w=2

Therefore, just remove it.
2022-06-30 12:30:01 +02:00
Jean-Marc Lasgouttes
c75522bbb7 Fix crash when dissolving a top level math inset
This should be disabled not only for math hull, but also macro template.

Fixes bug #12562.
2022-06-29 22:52:16 +02:00
Jean-Marc Lasgouttes
ae528715d3 Fix ToC action when cursor is in adv. F&R pane
This important part is the last point, the rest is what is needed to
make it happen.

* implement (FindAndReplace|FindAndReplaceWidget)::hasWorkArea, that
  tell whether a work area is own by the advanced find & replace
  widget.

* factor out method find() from GuiView::findOrBuild.

* implement GuiView::hasVisibleWorkArea, that tells whether a workarea
  is visible in the view (current tab in a split or adv. f&r
  workarea).

* Finally, in TocWidget::sendDispatch, change the current workarea
  temporarily to the document workarea before dispatching the
  function. The code tries to be as careful as possible to handle all
  cases. The future will tell whether it is good enough.
2022-06-29 11:09:14 +02:00
Jean-Marc Lasgouttes
2283440e77 whitespace 2022-06-28 23:51:09 +02:00
Pavel Sanda
6874c86cb5 Fix gcc 13 compilation.
Spotted by Jose.
2022-06-28 10:26:42 +02:00
Jean-Marc Lasgouttes
f2f0b30222 Fix line breaking thinko with Qt4
The test on whether to keep trailing spaces was inverted.
2022-06-27 16:12:02 +02:00
Scott Kostyshak
93066f13a5 ctests: invert Hebrew tests failing with microtype
The new microtype version seems to have caused failure of our Hebrew
Article (KOMA-Script) template.
2022-06-26 13:49:48 -04:00
Scott Kostyshak
9108263d2f Europe_CV: use "utf8" instead of "utf8x"
uf8x is not recommended
(https://github.com/latex3/latex2e/issues/833), and thanks to Europe
CV's recent release, is no longer needed. See here:

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

Europe CV still fails on an updated TeX Live (see discussion on
hooks in the above discussion for why), but this commit at least
fixes the unicode-related errors.
2022-06-20 16:45:02 -04:00
Scott Kostyshak
6148b4424c Europe_CV: update format 2022-06-20 16:45:02 -04:00
Scott Kostyshak
a4759b0599 ctests: invert American Geophysical Union tests
Our template was already marked as "Obsolete" since the class does
not appear to be maintained. The recent LaTeX2e update triggered a
problem in the .cls file that seems unlikely to be fixed.
2022-06-20 11:54:08 -04:00
Scott Kostyshak
3ec564720d ctests: invert a test that fails due to TeX issue
This issue was introduced (or triggered) in the recent LaTeX2e
release and is tracked here:

  https://github.com/latex3/latex2e/issues/833
2022-06-19 17:54:03 -04:00
Kornel Benko
ef5e11b0a7 Update sk.po 2022-06-14 18:07:35 +02:00
jpc
05ca785776 Hopefully last shortcut conflict 2022-06-14 16:30:31 +02:00
jpc
8605296ac0 Solve shortcut conflicts in std*.inc and fr.po 2022-06-14 15:41:32 +02:00
Juergen Spitzmueller
b7f0a90364 Amend [7efdbeaddf226/lyxgit]
We do not ship the nonfloat module, actually (I had a private copy).
2022-06-13 16:12:16 +02:00
Juergen Spitzmueller
ef90f7e4e8 de.po 2022-06-13 16:11:09 +02:00
Juergen Spitzmueller
7efdbeaddf Better UI for captions outside floats (#12554) 2022-06-13 13:22:58 +02:00
Jean-Marc Lasgouttes
ab54158447 Honor key bindings for commit string
When the commit string from the inputMethodEvent can be interpreted as
characters bound to some action, dispatch this action instead of
inserting the string.

This is useful on an international keyboard, when diaresis+space gives
a plain double quote. It is better in this case to enter a smart
quote.

Adapted from a patch from Daniel Ramoeller <d.lyx@web.de>.

Fixes bug #10377.
2022-06-13 11:22:50 +02:00
jpc
8fff0cf774 Update fr.po and a couple of shortcuts defined with non-existing letters 2022-06-13 09:47:54 +02:00
Kornel Benko
4ec85ba5d1 Update sk.po 2022-06-12 15:48:34 +02:00
Juergen Spitzmueller
f40b8bf627 Amend b2a7b715a2 2022-06-12 14:24:20 +02:00
Juergen Spitzmueller
7c561d68d9 de.po 2022-06-12 14:21:05 +02:00
Juergen Spitzmueller
c29f31e982 Merge branch 'master' of git.lyx.org:lyx 2022-06-12 13:35:52 +02:00
Daniel Ramoeller
b2a7b715a2 Make space names more standard
Fix for bug #12547.

- "Interword" becomes "Normal"
- "Protected" becomes "Non-Breaking"

Plus a minor fixes to the "Horizontal Space Settings" dialog:
- Indicate that when "Non-Breaking" is disabled, the space will be non-breaking
2022-06-12 13:35:29 +02:00
Scott Kostyshak
1e58d5cd4a ctests: log fix for an upstream LaTeX2e issue 2022-06-10 09:16:55 -04:00