Commit Graph

28927 Commits

Author SHA1 Message Date
Scott Kostyshak
f14384ff91 Add "override" to fix warning
Otherwise we get the following warning:

src/frontends/qt/InsertTableWidget.h:44:7: error: 'hideEvent' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
        void hideEvent(QHideEvent * event);
             ^

Amends ca5a75b2.
2023-06-19 14:52:45 -04:00
Juergen Spitzmueller
2bbc420032 Disable LFUN_INDEX_TAG_ALL if there is noting to tag (#12812) 2023-06-18 12:45:25 +02:00
Daniel Ramoeller
ca5a75b23e Properly uncheck insert table toolbutton
Fix for bug #12801
2023-06-18 12:20:35 +02:00
Scott Kostyshak
eac460e438 Remove the mathed "BUGS" file (#3493)
Jürgen cleaned up the previous contents of this "BUGS" file. What
was left (before the rm in this commit) had been written in 2001 at
2dd1a460, and it is not clear if it is still relevant.
2023-06-15 05:15:32 -04:00
Daniel Ramoeller
c13c959974 Fix margins and spacing of InsetParamsUI
Fix for bug #12244.
2023-06-15 04:18:36 -04:00
Daniel Ramoeller
7371a99256 Fix for HiDPI logo in About
Fix for #12322.
2023-06-13 09:56:48 -04:00
Scott Kostyshak
67ff56c63a Whitespace 2023-06-13 09:55:53 -04:00
Pavel Sanda
152811a27d Activate work area by tab click.
Fix for #11835.
Patch by Daniel Ramoeller.
2023-06-13 12:11:11 +02:00
Yuriy Skalko
2475a6a616 Move Fullscreen preferences from Editing>Control section into Look & Feel>User Interface section 2023-06-13 11:28:31 +02:00
Pavel Sanda
afb918bf78 Fix for #12681.
Number Paste Recent menus entries as in toolbar.
Slightly improved patch from Daniel Ramoeller.
2023-06-13 10:07:56 +02:00
Richard Kimberly Heck
0c69a5eab2 Fix bug #12796 2023-06-12 19:38:40 -04:00
Daniel Ramoeller
8124e6c02e Fix bug #12795 2023-06-12 19:33:25 -04:00
Richard Kimberly Heck
c3f98d1fa4 The lyx2lyx for the previous commit. 2023-06-11 12:55:51 -04:00
Enrico Forestieri
c33f2f50a0 Do not output LaTeX for a macro if the LaTeX part is empty. 2023-06-11 12:55:51 -04:00
Juergen Spitzmueller
3be39de1f7 Address deprecation warning
QMutexRecursive has been introduced with Qt 5.14, the warning with
Qt 5.15.2
2023-06-11 13:15:55 +02:00
Juergen Spitzmueller
833f8c148e Limit QEvent::ApplicationPaletteChange casing to Mac
This is not needed on Linux and dramatically slows down runtime mode
change
2023-06-11 12:43:30 +02:00
Juergen Spitzmueller
3af906e9f3 Fix crash on OS-switch of dark/light mode (#12786)
At least for Mac and Linux. Windows needs testing and possibly its
own fix.
2023-06-10 08:30:31 +02:00
Jean-Marc Lasgouttes
24f4c51f0e inset-split should not be dispatched to inset at point
This functon does not make sense for a full inset.

Fixes second part of bug #12747.
2023-06-06 11:10:45 +02:00
Daniel Ramoeller
5a893d9862 Replace selection on insert LyX Document
Fix for bug #10390
2023-05-31 01:01:22 +02:00
Daniel Ramoeller
c0d7ac5b71 Split-inset fix
- Remember whether something has to be pasted

Fix for bug #12747
2023-05-31 00:05:23 +02:00
Daniel Ramoeller
2e966811d8 Center preview status message
Fix for bug #12724
2023-05-30 14:12:11 +02:00
Richard Kimberly Heck
9a4e44e7df Fix indentation 2023-05-27 11:38:19 -04:00
Richard Kimberly Heck
04fe6c89dc Fix typo 2023-05-27 11:37:00 -04:00
Daniel Ramoeller
4ed0312c51 Fix bug #12772 2023-05-26 23:39:28 -04:00
Jean-Marc Lasgouttes
3895c79879 Fixup 1d637b8a: do not set extra spacing for typewriter
This messed up rows with both normal and typewriter fonts.
2023-05-23 09:22:51 +02:00
Juergen Spitzmueller
ba659d0cfd Fix indentation 2023-05-22 16:32:49 +02:00
Juergen Spitzmueller
25ecd919fe Use proper (inset) font for normalizing purposes
Not all insets have a proper layout, but we have Inset::getFont()

Fixes #12729
2023-05-19 12:35:03 +02:00
Kornel Benko
f13808939b Advaced search: check for toString() before using it.
(#12783)
2023-05-18 18:07:40 +02:00
Juergen Spitzmueller
92f211d6b4 Replace deprecated function
activateWindow() is available back to Qt4 (at least)
2023-05-17 08:56:12 +02:00
Jean-Marc Lasgouttes
e0db6378c9 Revert "Do not return copies of string members"
This commit is very wrong when trivstrings are used (since what is
retirned is a temporary variable) and it turns out that cygwin
requires this for some reason.

This reverts commit 3ae5d6bdec.
2023-05-15 17:13:41 +02:00
Stephan Witt
ac286e54b7 #12769 correct line width based painting of wavy underline
With very tiny fonts the line width is 0 and the loop to construct the wavy line never ends.
2023-05-15 07:06:44 +02:00
Juergen Spitzmueller
90d40eb95e Add labels to encoding variant combo 2023-05-13 18:38:33 +02:00
Juergen Spitzmueller
75f628aec0 Replace removed signal
The used one has been removed from Qt6
2023-05-12 09:46:38 +02:00
Juergen Spitzmueller
120ba1d3ec Do not attempt to read bitmap icon with svg renderer
Pavel, this should cure your woes
2023-05-12 09:39:20 +02:00
Juergen Spitzmueller
0a040d18ad Some layout fixes
Layout was too squeezed and didn't properly expand on longer (l7n) strings
2023-05-11 17:46:16 +02:00
Pavel Sanda
918146addd Fix DocBook case 2023-05-11 15:29:14 +02:00
Jean-Marc Lasgouttes
6fbc8c6352 Fixup 7f1b1729: restore lazy caret handling
For some reason, the code that should have been put in
updateCaretGeometry() went to resetCaret(). I do not see how that made
sense.

I am not totally sure what the consequences of the patch are, though.
It just "looks right".
2023-05-11 10:13:27 +02:00
Pavel Sanda
b198a36a36 Less expensive OP first as this might be called often. 2023-05-10 12:43:14 +02:00
Pavel Sanda
52fd21f902 Handle stats for French guillemets 2023-05-10 12:23:56 +02:00
Pavel Sanda
63ff4f4431 Count quotes in document statistics as well.
Currently any quote counts as a single character.

https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg219697.html
2023-05-09 20:48:13 +02:00
Pavel Sanda
16da5ef010 * LanguageUi.ui - change layout.
This pane is responsible for horizontal excess size (at least in CZ
translation) of document settings panel. The reason is second encoding combo
which get very lengthy (there are actually 3 of them).
This patch moves them to separate line.

Beware, touching this panel is headache.
Qt Designer (5.15.2) does not know even how to load this ui
file correctly and it's impossible to move unicodeEncodingCO.
When breaking layout this CO is mysteriously deleted.

Finally I gave up and simply edited file in vim to get COs to the new row.
2023-05-09 20:33:42 +02:00
Pavel Sanda
75d731c9d8 * OutputUi.ui - Reorganize Output pane so it takes less vertical space. 2023-05-09 19:06:26 +02:00
Pavel Sanda
20b45cf028 * Document prefs: rename Format -> Output 2023-05-09 19:05:31 +02:00
Pavel Sanda
c3613f1f17 * PrefDocHandlingUi.ui - add naming for emergency file 2023-05-09 18:35:00 +02:00
Jean-Marc Lasgouttes
e620920fe2 Fix unitialized member warning by coverity
The members open_braces and close_wildcards of MatchStringAdv are not
initialized in case of early return and coverity complains about that.
2023-05-09 13:52:33 +02:00
Enrico Forestieri
ee9fca42bb Use black as default color for an inset button label text
It turns out that LyX was using red as default color for the
inset button text since ever. However, due to the use of "inherit",
the default button text color was black in practice. This was so
until [897ee2ed/lyxgit], which made the label font not inherited
by default anymore. Hence, all insets that didn't specify a specific
label button color started using red as default color.

This commit restores the previous behavior and introduces the
possibility of modifying this default color.

Fixes bug #12771
2023-05-09 11:33:13 +02:00
Richard Kimberly Heck
8fac7d7035 If the ending delimiter is at the end of the file, then the test
pimpl_->is
will return false no matter what. So we need a different way to
check if the delimiter was found.
2023-05-06 18:59:40 -04:00
Jean-Marc Lasgouttes
e454deba2c Revert "Move Fullscreen preferences from Editing>Control section into Look & Feel>User Interface section"
I pushed it by mistake.

This reverts commit 4d31e20d7d.
2023-05-05 21:23:21 +02:00
Jean-Marc Lasgouttes
3ae5d6bdec Do not return copies of string members
This fixes the g++ 12 warnings below.

../../master/src/Converter.cpp:714:55: warning: possibly dangling reference to a temporary [-Wdangling-reference]
  714 |                                         Mover const & mover = getMover(conv.to());
      |                                                       ^~~~~
../../master/src/Converter.cpp:714:71: note: the temporary was destroyed at the end of the full expression ‘lyx::getMover(lyx::Converter::to() const())’
  714 |                                         Mover const & mover = getMover(conv.to());
      |                                                               ~~~~~~~~^~~~~~~~~~~
../../master/src/Converter.cpp:786:39: warning: possibly dangling reference to a temporary [-Wdangling-reference]
  786 |                         Mover const & mover = getMover(conv.from());
      |                                       ^~~~~
../../master/src/Converter.cpp:786:55: note: the temporary was destroyed at the end of the full expression ‘lyx::getMover(lyx::Converter::from() const())’
  786 |                         Mover const & mover = getMover(conv.from());
2023-05-05 20:35:23 +02:00
Yuriy Skalko
4d31e20d7d Move Fullscreen preferences from Editing>Control section into Look & Feel>User Interface section 2023-05-05 19:21:37 +02:00
Jean-Marc Lasgouttes
43b24085fb Merge files Text{,2,3}.cpp
This is done at the end of the release cycle to avoid backporting issues.

The goal is to simplify development, since it was difficult to guess
in which file a given method could be found.

There is some effect on compilation time, but it is not too bad:

* before merge

  lapinot: time make Text.o Text3.o Text2.o
    CXX      Text.o
    CXX      Text3.o
    CXX      Text2.o

  real	0m32,504s
  user	0m31,027s
  sys	0m1,446s
  lapinot: rm Text*.o
  lapinot: time make -j8 Text.o Text3.o Text2.o
    CXX      Text.o
    CXX      Text3.o
    CXX      Text2.o

  real	0m21,282s
  user	0m32,661s
  sys	0m1,424s

* after merge

  lapinot: time make Text.o
    CXX      Text.o

  real	0m26,731s
  user	0m25,706s
  sys	0m1,020s
2023-05-04 16:28:09 +02:00
Jean-Marc Lasgouttes
21dcb4782f Never not show caret when window does not have focus
A non blinking cursor could appear when hovering on inset button.

Fixes bug #12762.
2023-05-03 12:22:52 +02:00
Jean-Marc Lasgouttes
e533118b38 spacing 2023-05-03 12:15:26 +02:00
Jean-Marc Lasgouttes
89db357cd6 Code factoring: introduce BufferView::busy()
The WorkArea should not have to look at details of the undo stack.
No change intended.
2023-05-03 11:57:31 +02:00
Daniel Ramoeller
dfc3db773a Fixup 89394bcd: handle cursor keys from keypad
Due to a macOS peculiarity, it is necessary to handle KeypadModifier.
We do it unconditionnally, although only macOS seems to be affected.

"Note: On macOS, [...] The KeypadModifier value will also be set when
an arrow key is pressed as the arrow keys are considered part of the
keypad." (​https://doc.qt.io/qt-6/qt.html#KeyboardModifier-enum)

Related to bug #12572.
2023-05-03 11:25:06 +02:00
Jean-Marc Lasgouttes
ee5dcc9d47 Fixup e1261817: place cursor correctly in RtL
In an RtL paragraph, the cursor should be placed to the right of the
end-of-paragraph indicator.
2023-05-02 16:44:40 +02:00
Jean-Marc Lasgouttes
97ccb8c8c9 Make inset info icons tight again!
This is a follow-up to 5be391b2, which increased the space on
left/right of graphics inset. This extra space makes sense in normal
graphics editing, but is weird in the case of InsetInfo, which has its
own spacing.

Create a special tight graphics inset class, and use that for icons.
2023-05-02 14:49:47 +02:00
Enrico Forestieri
17b24cf480 Re-enable QWindowsMimeMetafile with Qt6
Qt 6.5.0 has dropped support for the QWindowsMime class
in favor of a new QWindowsMimeConverter class. They say:
  "If you have implementations of QWindowsMime or QMacMime in Qt 5,
   then those will almost directly translate to the new APIs but
   require less boiler-plate code to register the converters with Qt."
This may be true, but in practice they break binary compatibility with
previous versions. If you used the QWindowsMime class until Qt 6.4 by
using boiler-plate code to register the converters with Qt, you now
need to modify the sources and recompile. Fantastic!
2023-04-28 23:34:01 +02:00
Pavel Sanda
c6a190d480 Centralize use of "all files" wildcard in dialogs so it's consistent. 2023-04-28 21:59:37 +02:00
Pavel Sanda
a42a57a0b6 Increase hint verbosity, otherwise difficult to understand. 2023-04-27 21:24:49 +02:00
Pavel Sanda
5be391b274 Do not let cursor overlap with inserted graphics.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg219612.html
2023-04-27 20:37:32 +02:00
Scott Kostyshak
1dc55bd88b Fix compiler warning about unused string consts
These trigger a warning with Clang:

src/Session.cpp:34:14: error: unused variable 'sec_session' [-Werror,-Wunused-const-variable]
string const sec_session = "[session info]";
             ^
src/Session.cpp:35:14: error: unused variable 'sec_toolbars' [-Werror,-Wunused-const-variable]
string const sec_toolbars = "[toolbars]";
             ^
2023-04-26 14:06:25 -04:00
Pavel Sanda
72eb386af0 Improve error msg. 2023-04-21 23:15:16 +02:00
Jean-Marc Lasgouttes
f7afcc31fe Fix undo with cell-plit
This function modifies several cells.

Fixes bug #12746.
2023-04-21 14:42:51 +02:00
Pavel Sanda
18be0ec7f8 Few changes in GUI color strings to improve grouping. 2023-04-19 22:25:18 +02:00
Juergen Spitzmueller
a15bc829d1 Do not load mathrsfs if unicode-math is required (#12734)
The latter provides \mathscr and the packages clash
2023-04-15 12:35:22 +02:00
Pavel Sanda
3dd79b1c4e comment only 2023-04-14 23:58:59 +02:00
Pavel Sanda
4b736a19f2 Add few color comments 2023-04-14 23:16:54 +02:00
Juergen Spitzmueller
9ec80456fe tex2lyx: fix import of umlauts and ß in math (#12739) 2023-04-14 19:13:23 +02:00
Pavel Sanda
7f614397ed typo 2023-04-14 10:53:37 +02:00
Pavel Sanda
32209c9845 Typo in metadata glyphs check.
So I belive, but someone please double check.
2023-04-13 21:55:57 +02:00
Pavel Sanda
6b7da5ec8c typo 2023-04-13 21:50:43 +02:00
Pavel Sanda
f664498ba7 typo 2023-04-13 21:36:17 +02:00
Jean-Marc Lasgouttes
d828728cc9 Revert "Automatically adjust tab stop width"
The fix is more complicated than that

This reverts commit bb16efc07e.
2023-04-11 14:19:20 +02:00
Daniel Ramoeller
bb16efc07e Automatically adjust tab stop width
Extend tab stops to the same indentation point instead of a fixed number of spaces.

Fix for bug #12736
2023-04-11 13:36:52 +02:00
Scott Kostyshak
7368e5be2b Amend 1dc66608
Declare override, otherwise we get the following warning:

src/insets/InsetListings.h:42:7: error: 'isEnvironment' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
        bool isEnvironment() const { return !params().isInline(); }
             ^
src/insets/Inset.h:606:15: note: overridden virtual function is here
        virtual bool isEnvironment() const { return getLayout().latextype() == InsetLaTeXType::ENVIRONMENT; }
                     ^
1 error generated.
2023-04-10 13:14:15 -04:00
Juergen Spitzmueller
b42e978080 Do not switch dir with numbers and babel in full unicode
Patch by Udi Fogiel
2023-04-10 15:31:26 +02:00
Juergen Spitzmueller
8917cb3cc8 luabidi's \\LR[E] needs to be embraced (possibly a LuaTeX bug)
without the grouping, trailing text disappears
2023-04-10 15:16:20 +02:00
Juergen Spitzmueller
2abde5d162 Inset::forceLTR() only determines whether explicit switches are needed
(as opposed to InsetLayout::forceLTR()). So properly set this for ERT
and remove downstream special casing
2023-04-10 10:20:11 +02:00
Juergen Spitzmueller
767f3e5b81 Fix spacing in forceLTR for classic latex 2023-04-10 08:37:04 +02:00
Juergen Spitzmueller
e9c8b10c1d Do not forceLTR math with Xe/Lua (part of #12731) 2023-04-10 08:24:46 +02:00
Juergen Spitzmueller
f058442be9 Put forceLTR (display) environments in LRE environment rather than command
This fixes whitespace issues.
2023-04-10 08:10:51 +02:00
Juergen Spitzmueller
1dc666082e Add Inset::isEnvironment()
This usually returns InsetLayout::isEnvironment(), but listings has
specific conditions (depending on whether it is inline or not)
2023-04-10 08:09:32 +02:00
Juergen Spitzmueller
61f2cd27a8 Fix indentation 2023-04-09 15:01:17 +02:00
Juergen Spitzmueller
7b6707fc52 Properly resolve undefined citations with Xe/Lua and bibliography environment
These need an extra LaTeX run
2023-04-08 19:25:30 +02:00
Juergen Spitzmueller
6ec6db8cd9 Fix crash when copying multiple cells in table
while having done "backwards" selection (selBegin() in a later
column/row than selEnd())
2023-04-08 16:55:41 +02:00
Juergen Spitzmueller
849d0c81ca Record babel use for single par preview 2023-04-02 14:51:47 +02:00
Juergen Spitzmueller
84dde6aeb9 Fix indentation 2023-04-02 12:31:41 +02:00
Daniel Ramoeller
211554d0df Fix bug #12721. 2023-03-30 16:12:08 -04:00
Juergen Spitzmueller
3a02e477a0 Sync doc CT settings with dialog-external change of status (#12703) 2023-03-21 10:24:34 +01:00
Jean-Marc Lasgouttes
1d637b8af0 Spaces in typewriter font never expand in justified text
This fixes on-screen appearance of things like code with lines longer
than the window width.

The TeXbook makes it clear by indicating that \fontdimen3 == 0 for
these fonts.
2023-03-18 21:03:42 +01:00
Jean-Marc Lasgouttes
f24bb4a919 Remove indentation on screen after a plain separator inset
Fixes bug #12700.
2023-03-18 19:47:42 +01:00
Juergen Spitzmueller
5ad6cbb1d8 Fix signal order (#12712) 2023-03-18 15:58:04 +01:00
Juergen Spitzmueller
81d6965c81 Do not swap parens and stuff with babel and Xe/LuaTeX 2023-03-17 18:11:38 +01:00
Jean-Marc Lasgouttes
e2011856bc Fixup a2378c1182: handle the monospace case
When the font is tt, the stretch space is null. Change the display
rendering to accomodate that.
2023-03-17 14:27:15 +01:00
Jean-Marc Lasgouttes
98b5a16793 Fix completion in math when inline completion was not yet shown (take 2)
Better version of b4211ef2: we handle the case of a unique completion early.

Fixes bug #12674.
2023-03-16 11:58:49 +01:00
Jean-Marc Lasgouttes
fb1c4494ea Revert "Fix completion in math when inline completion was not yet shown"
A better fix is in the works.

This reverts commit b4211ef206.
2023-03-16 11:58:49 +01:00
Richard Kimberly Heck
7bcf201f40 Fix bug #12707 2023-03-15 23:24:47 -04:00
Jean-Marc Lasgouttes
175bcc6efc Fixup 00c39208: initialise ParagraphMetrics::id_ in default constructor
This was missing. Spotted by coverity.
2023-03-15 23:38:16 +01:00
Jean-Marc Lasgouttes
a2378c1182 Improve display of ellipsis special char
Follow the TeXbook and use a half space as separation.
2023-03-15 12:25:19 +01:00
Jean-Marc Lasgouttes
05469a053f revert/fixup 309f8f4b: setFilterRegularExpression was introduced in Qt 5.12. 2023-03-12 13:05:58 +01:00
Juergen Spitzmueller
7cde89ece7 Remobe static icon sizing which seems to play bad with HiDpi 2023-03-11 18:30:44 +01:00
Juergen Spitzmueller
466e6eb613 Remove workaround for Qt version which is no longer supported 2023-03-11 16:43:08 +01:00
Juergen Spitzmueller
31a197d88c Fix signals 2023-03-11 16:25:25 +01:00
Juergen Spitzmueller
548c5ba92d Two more icon scale fixes 2023-03-11 16:10:52 +01:00
Juergen Spitzmueller
8863d6d785 Properly scale some icons for HiDPI (#12695) 2023-03-11 14:49:07 +01:00
Yuriy Skalko
2b6b20ff69 Include QScreen header to fix compilation with Qt 5.14
Needed after e2e1fd6ea9.
2023-03-10 09:18:59 +01:00
Daniel Ramoeller
2ed5b4a705 Fix text color of "file changed on disk" notification
Adjusts the label color of the notification to the background.

Fix for #12690.
2023-03-09 16:13:00 +01:00
Pavel Sanda
4cccec60ca Improve tooltip. 2023-03-09 10:23:46 +01:00
Juergen Spitzmueller
c227a4af41 Check for invalid indexes in Module selection
This should fix crashes when moving with pressed mouse buttons on
category nods
2023-03-08 08:24:38 +01:00
Jean-Marc Lasgouttes
e2e1fd6ea9 QDesktopWidget is not required in Qt5, the Qt6 code works 2023-03-05 21:54:08 +01:00
Jean-Marc Lasgouttes
9156843ec2 QWidget::setContentsMargins is supported in Qt5 2023-03-05 21:37:01 +01:00
Jean-Marc Lasgouttes
7d78078838 When a displayed inset is aligned left, align it left
The use of LYX_ALIGN_BLOCK was a mistake.

Fixes bug #12683.
2023-03-05 20:59:35 +01:00
Jean-Marc Lasgouttes
f7de345f85 Avoid row breaking at inconvenient places.
The test that was used to avoid breaking a string that was followed
by a too long element was not correct (especially the part that
compared with total row width).

Typical example here is:
- a word with a part that has a font change like /un/breakable;
- a longish sentence after it.

Use a new test that is good enough for this particular case, although
with sortcomings. I do not want to overcomplicate and prefer to wait
for other complaints (this code is already more complicated that I
would like).

Document known shortcoming.

Fix ticket #12660.
2023-03-03 17:24:06 +01:00
Juergen Spitzmueller
e6966647fd Fix intitle context checking for info insets 2023-03-03 14:54:52 +01:00
Juergen Spitzmueller
739905862f Address deprecation
See https://doc.qt.io/qt-6/qbytearray-obsolete.html
2023-03-03 11:37:39 +01:00
Jean-Marc Lasgouttes
309f8f4b40 Remove two remaining snippets from the QRegExp era. 2023-03-03 11:17:58 +01:00
Jean-Marc Lasgouttes
263da2fa20 Remove use of QRegExp
QRegexp has been replaced with QRegularExpression in Qt5. Now that we
have dropped support for Qt4, there is no need for keeping it around.
2023-03-03 10:49:32 +01:00
Jean-Marc Lasgouttes
88c1ed9e32 Remove dead code which is deprecated in Qt6 2023-03-03 10:48:51 +01:00
Pavel Sanda
06928c914f * SpellcheckerUi fix casing in tooltip 2023-03-03 10:45:46 +01:00
Jean-Marc Lasgouttes
00c39208ac At metrics time, store paragraph id too
Instead of actually fixing the messiness of InsetInfo, let's just fix
the symptom and avoid the access to Paragraph::id() that was crashing
LyX every time updateBuffer/validate/metrics/draw did not happen in
the right order.

Fixes bug #12639.
2023-03-03 10:34:18 +01:00
Pavel Sanda
190d2ba2c3 * doxy - correct whitespacing. 2023-03-02 22:03:09 +01:00
Pavel Sanda
96eb65dc32 Spellcheck - more verbose tooltip. 2023-03-02 22:01:17 +01:00
Juergen Spitzmueller
5cb8733660 trim trailing linebreak 2023-02-27 12:16:04 +01:00
Pavel Sanda
9bbec4a75a Fix #12678. 2023-02-26 22:30:17 +01:00
Pavel Sanda
2b6ef1257a Infoinset - better specification of few strings 2023-02-25 18:52:31 +01:00
Pavel Sanda
b4ed627ecc Fogotten case for replacing $$python.
Patch from Jose.
https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg219385.html
2023-02-24 19:44:37 +01:00
Juergen Spitzmueller
c5e4043fa3 Warn user when OUTLINE_IN/OUT is about to flatten the structure (#11178) 2023-02-22 17:31:32 +01:00
Scott Kostyshak
83af3dfd29 Fix equation numbers after row operation (#12665)
After removing/adding rows, the corresponding equation numbers in
the LyX display were not updated (although if you clicked outside
the math inset they were).

Now they are updated immediately after the operation.
2023-02-22 11:12:56 -05:00
Juergen Spitzmueller
8fd1aaa46e Fix another old outliner bug (#9375)
Parts, chapters and sections have different LabelTypes, but this does
not mean they cannot be transformed into each other while doing
OUTLINE_IN/OUT

Not sure why the labeltype check is here anyway, but let's keep it.
2023-02-22 16:33:37 +01:00
Juergen Spitzmueller
41d95a45d9 Properly reset tree depth in outliner with keep when outliner is re-filled
Fixes a 13 year old bug (#6675)
2023-02-22 15:24:15 +01:00
Juergen Spitzmueller
08fc56486e Whitespace 2023-02-22 14:53:25 +01:00
Juergen Spitzmueller
ceb03b1815 Amend 4cd568d312 2023-02-22 14:35:53 +01:00
Juergen Spitzmueller
4cd568d312 Do not change outliner tree depth when not appropriate
This fixes expansion/collapsing on double-click (#12672)
2023-02-22 14:23:04 +01:00
Jean-Marc Lasgouttes
b4211ef206 Fix completion in math when inline completion was not yet shown
It is necessary to set finish=true when the completion is unique.
Otherwise, one gets \upsilon instead of the proper glyph.

Fixes bug #12674.
2023-02-22 12:02:10 +01:00
Jean-Marc Lasgouttes
ab8ea2543d Revert "Fixup 0cbe0d7a: avoid double redraw when completion is finished"
This is my 635th lesson that trying to be too clever is not that good.
This change interferes with the yet-to-come fix to #12674.

This reverts commit cc6dae1363.
2023-02-22 12:00:14 +01:00
Jean-Marc Lasgouttes
cc6dae1363 Fixup 0cbe0d7a: avoid double redraw when completion is finished 2023-02-22 11:32:11 +01:00
Jean-Marc Lasgouttes
0cbe0d7a3e Make sure that screen is updated when completing math
There was a missing update there.

Fixes part of bug #12674.
2023-02-22 11:23:10 +01:00
Juergen Spitzmueller
1e99920b35 Disable zoom in/out buttons when threshold is reached (#12676) 2023-02-22 11:16:46 +01:00
Jean-Marc Lasgouttes
e181474e6c Fixup 04ece4f0: handle case where openinlined_ is not set
When computing the width of the button, some code has been added in
04ece4f0 to shorten the space in LeftButton geometry. It turns out
that the Left/Top-button-ness is not always known at this point (since
it depends on the width itself!).

Therefore, it is better to make the button narrower also in the
TopButton case.
2023-02-22 10:58:22 +01:00
Jean-Marc Lasgouttes
a3d58d2884 Fixup 04ece4f0d6: fix cursor position 2023-02-22 10:32:24 +01:00
Pavel Sanda
39fddce26e comment typo & one line 2023-02-21 11:29:40 +01:00
Juergen Spitzmueller
eb294eadb5 Strip et al. for citation search 2023-02-21 08:12:59 +01:00
Jean-Marc Lasgouttes
92178fe457 Add commented-out code that might prove useful one day
The code in the dead branch looks reasonable to me, but I was not able
to prove that it solves a problem (yet).
2023-02-20 14:53:07 +01:00
Pavel Sanda
3a72e2c76b lyxpaperview - fix viewer calls with additional arguments 2023-02-19 22:35:21 +01:00
Pavel Sanda
be0341edd3 typo 2023-02-19 21:41:40 +01:00
Pavel Sanda
5b69f6899f Another case of statusTip 2023-02-19 19:22:48 +01:00
Pavel Sanda
c629d11c43 citationSearchCB statusTip -> toolTip 2023-02-19 19:15:25 +01:00
Juergen Spitzmueller
8deb05f7a7 Mark empty bib(la)tex insets (i.e., with no databases defined) (#12668) 2023-02-19 12:15:45 +01:00
Juergen Spitzmueller
da1d6d03eb Amend 2987530434
This is more readable (and fixes a thinko)
2023-02-18 17:04:43 +01:00
Juergen Spitzmueller
2987530434 Address an edge case where we need to loaf fontspec also with babel 2023-02-18 16:12:49 +01:00
Juergen Spitzmueller
29a8097c3c Make string-widget combination more l7n friendly
This allows to adjust the minutes widget within the syntax of the language
2023-02-16 15:25:33 +01:00
Juergen Spitzmueller
536bcb0d7b Amend ef2ca233d6 2023-02-16 14:55:55 +01:00
Juergen Spitzmueller
ef2ca233d6 Differentiate backups from autosave files (#12659) 2023-02-16 14:42:44 +01:00
Pavel Sanda
76daf33dd5 * Adv FindAndReplace - add spacer to visually distinguish groupbox. 2023-02-15 21:25:22 +01:00
Pavel Sanda
065f125b61 Disentangle tooltip in Character dialog and FindAndReplace pane. 2023-02-15 21:18:11 +01:00
Pavel Sanda
dce4ff82b4 * ui: Latex -> LaTeX 2023-02-15 21:16:39 +01:00
Juergen Spitzmueller
c1168f35d7 tiny correction 2023-02-15 11:46:37 +01:00
Juergen Spitzmueller
bfab8f9435 Escape single quotes in bformat string 2023-02-15 11:45:16 +01:00
Juergen Spitzmueller
879aa03a3e Add some tooltips wrt document backup 2023-02-15 11:22:19 +01:00
Juergen Spitzmueller
03ced49d9f whitespace 2023-02-12 14:37:35 +01:00
Juergen Spitzmueller
ced6c591fb Silence warning when unappropriate 2023-02-12 14:33:27 +01:00
Juergen Spitzmueller
a218450aa4 tex2lyx: support documentclass in path (#12284) 2023-02-11 09:57:32 +01:00
Juergen Spitzmueller
8c6db95135 Add missing empty line (par break) between pars with differing line spacing (#12638) 2023-02-09 17:23:18 +01:00
Jean-Marc Lasgouttes
2a626f76fd Revert "Fix crash with info inset and dialogs"
This reverts commit 17e60e2e85.
2023-02-08 12:53:39 +01:00
Jean-Marc Lasgouttes
f0b60d0b4e fix comment. 2023-02-08 12:28:01 +01:00
Juergen Spitzmueller
713264ae2b Disable "search in selection only" with instant search
These two do not go well together. Making it work requires some major
overhaul of selection while searching (see #12655)
2023-02-07 14:48:09 +01:00
Jean-Marc Lasgouttes
17e60e2e85 Fix crash with info inset and dialogs
See the thread
  2.4 Crash (was: Updated LaTeXConfig.lyx (bxjsclasses added))
on lyx-devel (26/01/2023).

The backtrace imply a problem like:
1/ metrics are computed for some info inset
2/ the info inset is regenerated (and thus the paragraph it held is now invalid)
3/ We draw the inset and because of the new (disabled by default)
   bookmark display code, we access the id() of the invalid paragraph.
4/ boom!

To fix the issue, introduce a new boolean member that indicates when
the Row object of the metrics should not be used. In this case, the
draw() method returns early.
2023-02-06 21:34:08 +01:00
Jean-Marc Lasgouttes
04ece4f0d6 Remove space between button and text with inlines collapsible insets
Typically there are two sources of spacing:
* the button has two pixels added to the left and to the right
* the frame around the text also has 2 pixels to the left and to the right

Note that this value of two pixels is given here for simplicity, but
these are parameterized by methods like textOffset or leftOffset.

What we want to remove is the space after the button and the space
before the frame. This is done in 3 places

In dimensionCollapsed(), the extra space is removed from the dimension
after its computation

In metrics(), the space avoided before the frame is removed from width.

In draw, the whome text inset is drawn with a negative offset.

Fixes #12335.
2023-02-06 20:28:37 +01:00
Juergen Spitzmueller
fb37682d74 Check whether we have a selection before issuing warning (#12655) 2023-02-06 11:47:14 +01:00
Juergen Spitzmueller
97a5433bed Update tex2lyx tests 2023-02-04 17:48:57 +01:00
Juergen Spitzmueller
ac6314b834 Properly fix acknowledgment issue part 1/2
Bump file format and convert/revert styles to unique spelling
2023-02-04 17:47:52 +01:00
Jean-Marc Lasgouttes
418fd911f8 Revert "Extended comment and indentation for source code"
This was pushed by mistake. A different version of this patch will
eventually be committed.

This reverts commit 439c099124.
2023-02-01 00:12:14 +01:00
Jean-Marc Lasgouttes
1081893e97 Fixup 0fed10e4: make sure redraw happens as needed
This commit had had an additional not documented change: redraws
happen only when they are needed. This did not help fix the bug, but
looked smart on first sight. Alas, I find that these smart changes
added because "why not?" tend to come back to haunt me eventually.

In particular this case, the problem was that the code tested whether
the offset of anchor paragraph had changed, but not whether the
paragraph itself had changed. This means that, when switching from one
section to another with the outliner, the view was not updated.
2023-02-01 00:09:49 +01:00
Daniel Ramoeller
439c099124 Extended comment and indentation for source code
- automatically inherit indentation from previous block
- (un)indent blocks
- (un)comment blocks
- add feature to show tabs and spaces
2023-02-01 00:09:49 +01:00
Juergen Spitzmueller
2371bfdf15 Fix font combos with Qt6 (#12630)
Use CategorizedCombos methods to properly access the model
2023-01-30 08:46:36 +01:00
Juergen Spitzmueller
b260ff8b27 Allow to hide categories in CategorizedCombo
font combos do not need that
2023-01-30 08:45:58 +01:00
Enrico Forestieri
d213df2f2e Amend 891ba726
Avoid an assertion when the cursor is at the start of a math hull.
2023-01-29 18:32:23 +01:00
Enrico Forestieri
07150cd928 Amend 16e67d4e
A docstring is not 0-terminated...
2023-01-27 21:10:02 +01:00
Enrico Forestieri
16e67d4ebb Fix bug #12633
Avoid recursion when validating a macro that is defined recursively.
This avoids a crash but the latex engine will choke on it, of course.
2023-01-27 20:34:24 +01:00
Scott Kostyshak
2ccaefa8a1 Fix -Winconsistent-missing-override
Fix the following warning:

src/frontends/qt/GuiDocument.h:377:7: error: 'eventFilter' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
        bool eventFilter(QObject * sender, QEvent * event);
             ^
/usr/include/x86_64-linux-gnu/qt5/QtCore/qobject.h:139:18: note: overridden virtual function is here
    virtual bool eventFilter(QObject *watched, QEvent *event);
                 ^

Amends 62413580de.
2023-01-25 10:56:40 -05:00
Daniel Ramöller
62413580de Fix bug #12061. 2023-01-23 18:05:26 -05:00
Thibaut Cuvelier
fca8e54289 InsetMathHull: add a missing const (plus strange indentation fixed). 2023-01-22 02:45:25 +01:00
Thibaut Cuvelier
d066a66a51 MathML: make InsetMathHull::mathmlize easier to read while doing less work
If `havetable == true`, a lot of the code didn't make any sense: in particular, it was outputting a level of <m:mrow> too many.

Also, add some comments and rewrite the comment about mlabeledtr.

Contributed by lynx: https://www.lyx.org/trac/ticket/12629
2023-01-22 01:49:03 +01:00
Thibaut Cuvelier
e7d57338b9 InsetMathHull: replace 0 by nullptr. 2023-01-22 01:25:03 +01:00
Thibaut Cuvelier
bf0da33c9a MathML: use standard {M/E}Tag{,Inline} instead of bespoke constructs
Also, replace lspace='thinmathspace' by constructs that are not deprecated.

Contributed by lynx: https://www.lyx.org/trac/ticket/12629
2023-01-20 02:56:55 +01:00
Thibaut Cuvelier
598c6a0a87 MathML in HTML: in case of conversion failure, add a comment 2023-01-20 02:45:35 +01:00
Thibaut Cuvelier
f9fd652aae MathML: improve formatting of formula in XHTML hull
Contributed by lynx: https://www.lyx.org/trac/ticket/12629
2023-01-20 02:45:35 +01:00
Thibaut Cuvelier
0c227d3dfa MathML: remove extraneous <mrow> in fractions
Contributed by lynx: https://www.lyx.org/trac/ticket/12629
2023-01-20 02:30:43 +01:00
Thibaut Cuvelier
66fab70388 MathML: replace HTML entities with XML ones in more places
This part should have been committed with bc73a857 in the first place.
2023-01-20 02:25:37 +01:00
Thibaut Cuvelier
5f7c26fbe5 MathML: remove useless code
Contributed by lynx: https://www.lyx.org/trac/ticket/12629
2023-01-20 02:19:33 +01:00
Juergen Spitzmueller
d213b72978 Introduce pkglist format
This allows us to check and reconfigure if the pkglist format is not
current
2023-01-14 10:45:57 +01:00
Thibaut Cuvelier
861af2b84f LyXHTML: remove meta content-type, it is only for HTML5, not XHTML5 (LyX is generating XML-compatible HTML, i.e. XHTML5). 2023-01-11 01:12:22 +01:00
Thibaut Cuvelier
fb70f89983 InsetTabular LyXHTML: fix wrong escape. 2023-01-11 00:26:28 +01:00
Jean-Marc Lasgouttes
8ec3397da3 Correct the description of Lexer::getLongString
The fact that it does not work with tabs has been fixed long ago.
2023-01-10 16:25:48 +01:00
Jean-Marc Lasgouttes
6093e7d661 Fix warning
This was:
../../master/src/mathed/InsetMathBox.cpp:116:20: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::__cxx11::basic_string<wchar_t> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
  116 |  for (int i = 0; i < parts.size(); i += 2) {
      |                  ~~^~~~~~~~~~~~~~
../../master/src/mathed/InsetMathBox.cpp:120:20: warning: comparison of integer expressions of different signedness: ‘std::vector<std::__cxx11::basic_string<wchar_t> >::size_type’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
2023-01-09 16:06:38 +01:00
Daniel Ramoeller
f608328059 Allow multiple selections in the file open dialog
Fix for bug #4315.
2023-01-09 15:52:33 +01:00
Juergen Spitzmueller
689962b8d5 Fix grammar in, and try to clarify, warning
I suppose many users won't know what a "python interpreter" is and how
they could install one.
2023-01-09 07:28:49 +01:00
Thibaut Cuvelier
9ae793c607 LyXHTML: avoid using v/align HTML attributes in tables, they are deprecated (like most attributes for td).
Also implement alignment at character in CSS.
2023-01-09 04:04:57 +01:00
Thibaut Cuvelier
1f370a3353 LyXHTML: avoid using v/align HTML attributes in tables, they are deprecated (like most attributes for td).
Also implement alignment at character in CSS.
2023-01-09 01:50:05 +01:00