Commit Graph

35361 Commits

Author SHA1 Message Date
Günter Milde
5fc431594f More fixes for #9897 (wrong inset-icon size in PDF)
Inset-icons are auto-scaled according to their width.
This is problematic, if converted from SVG
with the bounding box set to content (ignoring the page size)
and the content is not square.

OTOH, ignoring page size is done for good reasons - we usually want just
the drawing area when inserting an image into a document.

An invisible square with fixes this problem.

Some icons had spurious invisible elements outside the page -- leading
to too small results in the PDF. These were removed.
2016-05-29 17:55:43 -04:00
Guillaume Munch
3465bf4baf typo 2016-05-29 17:55:42 -04:00
Guillaume Munch
395d9e09e2 Disable certain change tracking commands when there are no changes
Fix TODO
2016-05-29 17:55:42 -04:00
Guillaume Munch
4154e088b0 GuiChanges: provide feedback when there are no more changes
Remove FIXMEs: date and time localisation
2016-05-29 17:55:42 -04:00
Guillaume Munch
6d4e6aad24 Automatically show the review toolbar if the document has tracked changes
(#8738)

For efficiency, we add a new flag to the buffer indicating when changes are
present. This flag is updated at each buffer update, and also when explicitly
requested via a dispatch result flag.
2016-05-29 17:55:42 -04:00
Guillaume Munch
9a09fe38bd getInnerText() 2016-05-29 17:55:42 -04:00
Jean-Marc Lasgouttes
1639abb8ed Let getPosNearX take horizontal scrolling into account
If we do not do that, it is not possible to position the cursor after
a long inset with the mouse.

To do this, it is necessary to add the pit information to the Row
object. This is a good idea in any case, and will allow to simplify
some code later on.

Fixes bug #10094.
2016-05-29 17:55:42 -04:00
Guillaume Munch
27607b76f5 TocWidget: clean-up the timer logic
The timer logic introduced to solve bug #7138 was not entirely reliable; in
particular it resulted in spurious updates (noticeable by the treeview
collapsing just after one opens a branch, in particular).

This commit cleans up the timer logic. I followed the original design decision
of having an immediate update followed by a delayed update. Now the updates are
appropriately compressed and done after a delay of 2s (as can be noticed with
the treeview still collapsing, unfortunately, but after a more predictable
delay...).
2016-05-29 17:55:42 -04:00
Guillaume Munch
2f9d323396 TocWidget: Fix perf regression
4d1ad336 fixed #9754 but caused perf issues by cancelling the gains of having a
timer (introduced after #7138). This introduces in GuiToc::enableView() a
lightweight check of whether the widget should be updated. The logic is inspired
from GuiViewSource::enableView().
2016-05-29 17:55:42 -04:00
Guillaume Munch
0e740018ff Whitespace 2016-05-29 17:55:42 -04:00
Jean-Marc Lasgouttes
5aa342ed75 Fix cursor position after redo
When document settings are modified, a command
  inset-forall Branch inset-toggle asign
is run to open as needed all branches. At the end of the said loop,
the cursor is reset to where it was. However, the cur_after undo
element member is not set because it already had a value.

To make this work as expected, it is necessary in LFUN_INSET_FORALL to
reset the cursor before ending the undo group and to insert a dummy
recordUndo call.

Fixes bug #10097.
2016-05-29 17:55:42 -04:00
Guillaume Munch
c47bfee231 Amend d7d4f65b
Thanks Richard
2016-05-29 17:55:42 -04:00
Guillaume Munch
e3540f33e1 Simplify class structure in TocBackend
Deriving from std::vector to provide helper functions appears a touch
excessive. Use typedef instead and move helper functions to the base class. New
header Toc.h provided to replace forward-declarations.

Remove TocIterator which is useless.
2016-05-29 17:55:42 -04:00
Jean-Marc Lasgouttes
d48d426c72 Rename InsetMathHull::isTable to allowsTabularFeatures
The old name conflicted with the newly introduced Inset::isTable.

Now the meaning is as follows.
* Inset::isTable() is true when the inset is composed of lines and columns
* InsetMathHull::allowsTabularFeatures is true when the current type of hull allows for tabular-like functions.
2016-05-29 17:55:42 -04:00
Jean-Marc Lasgouttes
a879bc2575 Fix horizontal scrolling in full-width collapsable insets
While a one paragraph large collapsable inset (containing for example a tabular) could be very wide and trigger horizontal scrolling, the code that makes collapsable insets wide when they contain several paragraphs would actually make them narrower in this case.

Typical example is a wide tabular and a caption in a table float, where horizontal scrolling would not trigger.
2016-05-29 17:55:42 -04:00
Guillaume Munch
6bd70011e9 LyXToolBox: a QToolBox with minimum size management
The purpose of this custom widget is to allow the use of a QToolBox in a limited
area. The stock QToolBox does not provide a minimum size hint that depends on
the size of the pages; it assumes that there is enough room.  This subclass sets
the minimal size of the QToolbox. Without this, the size of the QToolbox is only
determined by values in the ui file and therefore causes portability and
localisation issues. Note that the computation of the minimum size hint depends
on the minimum size hints of the page widgets. Therefore page widgets must have
a layout with layoutSizeContraint = SetMinimumSize or similar.
2016-05-29 17:55:41 -04:00
Stephan Witt
6799032e77 factor out lookup of loaded hunspell checkers and use it to reduce file system accesses when checking for available dictionaries 2016-05-29 21:17:08 +02:00
Stephan Witt
0d16434194 Include hunspell library version 1.3.3 for builds 2016-05-29 20:38:57 +02:00
Juergen Spitzmueller
8ed362fda7 Implement some forgotten context menu items for arguments
* Dissolve context menu
* Label toggle (for conglomerate-styled arguments)

Fixes: #10150
2016-05-29 12:32:53 +02:00
Richard Heck
0e1834f2d9 Updates to splitting of consecutive environments.
From Enrico.
2016-05-28 17:43:01 -04:00
Jean-Marc Lasgouttes
625e7609f0 Cleanup bv-dependent variables in InsetCollapsable
It makes sense to group all the variables in a common struct instead of having four maps.
2016-05-28 17:43:01 -04:00
Jean-Marc Lasgouttes
1ec605cbb2 amend 5b7be5eb (typo+spacing) 2016-05-28 17:43:01 -04:00
Jean-Marc Lasgouttes
d8f6e65ec7 Make inset-select-all select all cells only in tables
inset-select-all has 3 levels
1. select current cell
2. select all cells
3. select inset from outside.

The second level makes sense for tables (text and math), but not for things like a math fraction.

Introduce a new method Inset::isTable() that allows to detect this case properly and skip level 2.
2016-05-28 17:43:01 -04:00
Jean-Marc Lasgouttes
fd3a41e035 Change mouse cursor on tabular selection zones
This is done by implementing the clickable method. It is not possible yet to have the usual left and down arrows, because Qt does not implement them as far as I can see.

Factor the code that triggers row/column selection and fix the logic. Now it is possible to select also at the right of the tabular inset.
2016-05-28 17:43:01 -04:00
Jean-Marc Lasgouttes
fd6ae3539b Fix display of InsetCollapsable with split views
When several bufferviews exist for the same inset, the data that depends on the view width have to be BufferView-dependent. While this is the case for several mutable members of InsetCollapsable, some were missing.

This commit makes button_dim_ (renamed from button_dim) and openinlined_ bv-dependent.

Get rid of the hitButton function.

Remove the bv-independent geometry() method and implement editable() explicitely instead.

Fixes bug #9756.
2016-05-28 17:43:01 -04:00
Jean-Marc Lasgouttes
f23a8fed80 whitespace only 2016-05-28 17:43:01 -04:00
Jean-Marc Lasgouttes
ffe1d53cdb Pass a BufferView to Inset::clickable 2016-05-28 17:43:01 -04:00
Jean-Marc Lasgouttes
890a1efe47 Make monolithic build code portable to Mac OS
"echo -e" is definitely not portable. Use a plain loop instead.

Also use the automake silent rule mechanism to make the generation of monolithic source files visible.
2016-05-28 17:43:01 -04:00
Jean-Marc Lasgouttes
aef78c821f Avoid narrow boxes when using \width as box width unit
When the box has a special width, one should not consider that as a fixed width. Otherwise, due to implementation quirks, the width will be set on screen as 1 inch.

A better solution would be to actually set the width by taking in account the contents width, height ans total height. This is not very difficult, but I do not know whether it would workout well in the work area.

Fixes bug #10048.
2016-05-28 17:43:01 -04:00
Jean-Marc Lasgouttes
01bbac4738 Move the documentation changelogs out of attic
They should not be hidden in this directory.
2016-05-28 17:43:01 -04:00
Jean-Marc Lasgouttes
72e038f03e When a counter is stepped, reset recursively all slaves
Fixes bug #10063.
2016-05-28 17:43:01 -04:00
Guillaume Munch
efbc297b95 Include config.h in LyXToolBox.cpp
Amend 367a7a6dd.
2016-05-28 17:43:01 -04:00
Richard Heck
7ca8ffb7ef Update version in configure.ac. 2016-05-28 17:43:01 -04:00
Guillaume Munch
7e9d0a938b Fix compilation with qt5
Amend 367a7a6d.
2016-05-28 17:42:32 -04:00
Guillaume Munch
4e50cd809b Amend a5db05ae
Restore tabstops. I was mistaken about what tabstops are and thought they were
useless in this context.
2016-05-28 17:42:32 -04:00
Guillaume Munch
26c12dba8f CitationUi.ui: Align "Selected citations" label to the left 2016-05-28 17:42:32 -04:00
Guillaume Munch
576cb5df77 LyXToolBox: a QToolBox with minimum size management
The purpose of this custom widget is to allow the use of a QToolBox in a limited
area. The stock QToolBox does not provide a minimum size hint that depends on
the size of the pages; it assumes that there is enough room.  This subclass sets
the minimal size of the QToolbox. Without this, the size of the QToolbox is only
determined by values in the ui file and therefore causes portability and
localisation issues. Note that the computation of the minimum size hint depends
on the minimum size hints of the page widgets. Therefore page widgets must have
a layout with layoutSizeContraint = SetMinimumSize or similar.
2016-05-28 17:42:32 -04:00
Guillaume Munch
70fe2c618e Correct strange FIXME 2016-05-28 17:42:31 -04:00
Guillaume Munch
7faafd037e Improvements to the shortcuts preference dialog (#9174)
Ask the user for removing bindings when using the "restore" button (#9174).

Fix the already-bound-key detection logic.

Don't forget to trigger the search when initializing the search LineEdit with
its former value.
2016-05-28 17:42:31 -04:00
Guillaume Munch
935588f2de Sanitize InsetMathHull and add a check for mutability in LFUN_MATH_MUTATE
Remove in particular all comparisons < and >= involving HullType.

Add a guard to make sure that mutate() only operates on types it has been
designed for. Then I figured I could use this new knowledge to give feedback
when math-mutate is not implemented via getStatus(). (To test this, insert a
regexp in Advanced Search & Replace and try to change it into a standard
equation via the contextual menu.)
2016-05-28 17:42:31 -04:00
Guillaume Munch
1840b5992c Correct col spacing in Cases environment 2016-05-28 17:42:31 -04:00
Guillaume Munch
d4b56646b4 Fix the display of column spacing in AMS environments
AMS align environment should have some spacing between odd and even columns.

Add a new virtual method displayColSpace() to InsetMathGrid, InsetMathHull and
InsetMathSplit.
2016-05-28 17:42:31 -04:00
Guillaume Munch
f3b70fd2cd Display the correct horizontal alignment in AMS environments
A longstanding problem... (related: #1861)

The columns in AMS math environments have a fixed alignment (colAlign() in
InsetMathGrid.cpp). We set this alignment for display (Georg's
displayColAlign()) in InsetMathHull and InsetMathSplit. This is done according
to tests and documentation for the various environments.

There is also some mechanical code factoring via colAlign().

Finally, I disable setting the horizontal alignment in InsetMathSplit, which has
no impact on the LaTeX output, and has no longer any impact on the screen. (As
for vertical alignment I discovered that it was in fact customisable for
\aligned & friends! I hope that the more faithful interface will let other
users discover that too.)
2016-05-28 17:42:31 -04:00
Guillaume Munch
3a4af5a3e1 Do not omit the starting space when copying (#9995)
The offending code appears to have been introduced a long time ago. My
understanding is that it is no longer relevant. Notably, it only appears on copy
and not on cut, which tells us that: 1) it should be safe to remove it, 2) we
should remove it for consistency.
2016-05-28 17:42:31 -04:00
Guillaume Munch
77714e6db7 Raise the maxlastfiles cap
This only changes the maximum value that the user can choose in the UI, not the
default value.
2016-05-28 17:42:31 -04:00
Scott Kostyshak
97a3a64290 This is LyX 2.2.0 2016-05-23 19:49:15 -04:00
Scott Kostyshak
92615ce648 Update ANNOUNCE for 2.2.0
The https download URL is given now.
2016-05-23 18:54:50 -04:00
jpc
9e5198f4f5 * One more shortcut conflict solved
* fr.gmo updated
2016-05-23 23:15:10 +01:00
jpc
f5146e729b * Edit translation mistakes for icon sizes
* Resolve a shortcut conflict
* Provide fr.gmo using msgfmt
2016-05-23 22:43:39 +01:00
Enrico Forestieri
63153b8937 Add note about required svg support in Qt. 2016-05-23 03:05:36 +02:00