]> git.lyx.org Git - lyx.git/log
lyx.git
8 years agoCorrect wrong path for included lyx-file
Kornel Benko [Thu, 26 May 2016 20:36:35 +0000 (22:36 +0200)]
Correct wrong path for included lyx-file

Although the fix affects only a content of a LyX note, it is
still surprising to get a dialog-window demanding creation
a new document if trying to edit the subdocument.

8 years agoFixup 1b2aad9 : Cleanup of spacing in mathed
Jean-Marc Lasgouttes [Wed, 25 May 2016 13:14:18 +0000 (15:14 +0200)]
Fixup 1b2aad9 : Cleanup of spacing in mathed

Now that 5mu are added on each side of : (because it is a relation), there is no need to do the same in the definition of \vcentcolon.

This is closer to what is done in mathtools.sty.

8 years agoCleanup of spacing in mathed
Jean-Marc Lasgouttes [Tue, 24 May 2016 10:08:24 +0000 (12:08 +0200)]
Cleanup of spacing in mathed

This is a first cleanup step. More complex rules have to be
implemented on top of this.

Use proper spacing \thinmuskip, \medmuskip and \thickmuskip instead of
ad-hoc values.

Rename isRelOp to isMathRel and introduce isMathBin and isMathPunct
(for InsetMathChar and InsetMathSymbol). Update the categories of
characters in InsetMathChar according to LaTeX source (fontmath.ltx).

Set correctly the spacing around mathrel, mathbin and mathpunct
elements. Use \thinmuskip around MathDelim instead of a hardcoded 4.

This is related to bug #8883.

8 years agoImprove documentation of LyX' "smart quotes" feature.
Günter Milde [Mon, 23 May 2016 19:14:28 +0000 (21:14 +0200)]
Improve documentation of LyX' "smart quotes" feature.

8 years agoRemove extra spacing around InsetCommand buttons
Jean-Marc Lasgouttes [Mon, 23 May 2016 14:16:05 +0000 (16:16 +0200)]
Remove extra spacing around InsetCommand buttons

There is already a spacing of 2 pixels on each side of a button (e.g. collapsed inset). There is no need to add one extra pixel for command insets.

Fixes part of bug #10149.

8 years agoFix drawing of buttonText (enforce same left/right spacing)
Jean-Marc Lasgouttes [Mon, 23 May 2016 13:24:13 +0000 (15:24 +0200)]
Fix drawing of buttonText (enforce same left/right spacing)

The computation of the width of the button was wrong. If <--> stands for TEXT_TO_INSET_OFFSET/2 spacing, and if `[]' marks the button's limits, then the intent is
  <-->[<-->button text<-->]<-->

Therefore the physical grey rectangle width is
   width - Inset::TEXT_TO_INSET_OFFSET

With this change, the spacing on the right of the button is not larger than the  left one.

Fixes bug #10147.

8 years agoCleanup handling of LFUN_LAYOUT_PARAGRAPH in getStatus
Jean-Marc Lasgouttes [Thu, 12 May 2016 15:31:47 +0000 (17:31 +0200)]
Cleanup handling of LFUN_LAYOUT_PARAGRAPH in getStatus

The way it works is:
* the inset defines allowParagraphCustomization() correctly
* Text::getStatus acts on it.

Note that, in Text::getStatus, testing for cur.inset().allowParagraphCustomization() does not make much sense, since one should pass the cursor idx as parameter. Actually, for some reason the safest bet is to use the owner of the Text object as inset.

8 years agoCleanup handling of LFUN_LAYOUT in getStatus
Jean-Marc Lasgouttes [Thu, 12 May 2016 12:10:30 +0000 (14:10 +0200)]
Cleanup handling of LFUN_LAYOUT in getStatus

The way it works is:
* the inset defines forcePlainLayout() correctly
* Text::getStatus acts on it.

Note that, in Text::getStatus, testing for cur.inset().forcePlainLayout() does not make much sense, since one should pass the cursor idx as parameter.

There are many other lfuns that do not have to be handled directly by insets. InsetScript in particular has tests for way too many lfuns.

8 years agoRename badly named variable
Jean-Marc Lasgouttes [Tue, 5 Apr 2016 12:27:30 +0000 (14:27 +0200)]
Rename badly named variable

8 years agoRemove variables set but not used
Jean-Marc Lasgouttes [Mon, 29 Feb 2016 13:27:51 +0000 (14:27 +0100)]
Remove variables set but not used

This was found by cppcheck.

8 years agoMove one Text::setCursor instance to CursorSlice
Jean-Marc Lasgouttes [Mon, 29 Feb 2016 12:47:23 +0000 (13:47 +0100)]
Move one Text::setCursor instance to CursorSlice

This method did access more CursorSlice than Text. It is only a setter for
CursorSlice with some bound checking. The new signature is
setPitPos(pit_type, pos_type).

8 years agoVariables of type pit_type should be named pit, not par
Jean-Marc Lasgouttes [Mon, 29 Feb 2016 12:29:06 +0000 (13:29 +0100)]
Variables of type pit_type should be named pit, not par

It is easier to use always the same conventions for naming.

8 years agoRename Cursor::setSelection(bool) to selection(bool)
Jean-Marc Lasgouttes [Sun, 28 Feb 2016 16:36:29 +0000 (17:36 +0100)]
Rename Cursor::setSelection(bool) to selection(bool)

The old name would be confusing wrt setSelection(), which does additional checks.
This one is a pure acessor, and the more complete methods are
* setSelection(), which avoids empty selections
* clearSelection(), which resets anchor, and sets word selection and mark more to false.

Most of the code should use these two instead of selection(bool), but this is for later.

8 years agoAvoid incorrect "Autocorrect Off" message
Jean-Marc Lasgouttes [Sun, 28 Feb 2016 16:21:26 +0000 (17:21 +0100)]
Avoid incorrect "Autocorrect Off" message

8 years agoFindAndReplace: reorder includes
Jean-Marc Lasgouttes [Sun, 28 Feb 2016 16:11:51 +0000 (17:11 +0100)]
FindAndReplace: reorder includes

8 years agoTextMetrics: Use shorter names for font metrics
Jean-Marc Lasgouttes [Sun, 28 Feb 2016 16:01:01 +0000 (17:01 +0100)]
TextMetrics: Use shorter names for font metrics

This keeps code easier to read.

8 years agoCleanup bruteFind.
Jean-Marc Lasgouttes [Sun, 28 Feb 2016 15:56:00 +0000 (16:56 +0100)]
Cleanup bruteFind.

8 years agoRemove unused bruteFind* functions
Jean-Marc Lasgouttes [Sun, 28 Feb 2016 15:48:11 +0000 (16:48 +0100)]
Remove unused bruteFind* functions

And rename bruteFind2 to bruteFind.

8 years agoRemove unused CursorData::logicalpos_
Jean-Marc Lasgouttes [Sun, 28 Feb 2016 15:44:00 +0000 (16:44 +0100)]
Remove unused CursorData::logicalpos_

This was introduced in 41ecabf5, probably by mistake.

8 years agoDirectly pass a Row::Element to RowPainter::paintInset
Jean-Marc Lasgouttes [Sun, 28 Feb 2016 15:42:35 +0000 (16:42 +0100)]
Directly pass a Row::Element to RowPainter::paintInset

8 years agoRemove unused TextMetrics::maxWidth()
Jean-Marc Lasgouttes [Sun, 28 Feb 2016 15:34:33 +0000 (16:34 +0100)]
Remove unused TextMetrics::maxWidth()

8 years agoUse isMainText() instead of doing explicit tests
Jean-Marc Lasgouttes [Sun, 28 Feb 2016 15:23:43 +0000 (16:23 +0100)]
Use isMainText() instead of doing explicit tests

8 years agoWe do not use <boost/scoped_array.hpp> anymore
Jean-Marc Lasgouttes [Fri, 20 May 2016 08:19:02 +0000 (10:19 +0200)]
We do not use <boost/scoped_array.hpp> anymore

The code using it  was removed at 81959251.

8 years agoRemove support/metahash.h
Jean-Marc Lasgouttes [Thu, 19 May 2016 15:13:07 +0000 (17:13 +0200)]
Remove support/metahash.h

It turns out that it did not take off since introduced in 2011. It is better to remove it and the associated boost headers (extract.sh was run against boost 1.60 to do the update).

Since we will move away from several boost classes when transitioning to C++11, it is good to start by removing lesser used ones.

8 years agoDo not use of boost::tokenizer
Jean-Marc Lasgouttes [Thu, 19 May 2016 13:28:39 +0000 (15:28 +0200)]
Do not use of boost::tokenizer

It is easier to use instead getVectorFromString for the use we have of this tokenizer. The two places are environment.cpp (path stuff) and qt_helpers (file fileters). The new code is much shorter.

This allow to remove boost/tokenizer.hpp and friends from our boost tree.

8 years agoRemove boost/format support
Jean-Marc Lasgouttes [Thu, 19 May 2016 10:01:08 +0000 (12:01 +0200)]
Remove boost/format support

Only ChkTex.cpp used it, whereas the rest of our code uses the simpler bformat.

8 years agoRemove declaration of classes that do not exist
Jean-Marc Lasgouttes [Thu, 19 May 2016 09:47:26 +0000 (11:47 +0200)]
Remove declaration of classes that do not exist

Some headers contain
  class Foo;
whereas there is no class Foo.

The list of class statements is given by
  classes=`git grep  '^\(class\|struct\) [a-zA-Z_:]*;' src | sed 's/^.* \(.*\);/\1/'|sort -u`

The ones that are useless are:
  for c in $classes ; do grep -r "\\<$c\\>" src| grep -vq '^[^:]*:\(class\|struct\) [a-zA-Z_:]*;' || echo "$c"; done

8 years ago\\pagebreak is a fragile command in general
Jean-Marc Lasgouttes [Fri, 22 Apr 2016 12:57:12 +0000 (14:57 +0200)]
\\pagebreak is a fragile command in general

As such, it shall be protected in moving arguments, such as sections.

Fixes bug #10092.

8 years agoFix getStatus for math-mutate and math-display
Jean-Marc Lasgouttes [Thu, 12 May 2016 07:24:55 +0000 (09:24 +0200)]
Fix getStatus for math-mutate and math-display

Those two functions used two different hackish and buggy
implementation to know when the function is disabled. Replace that by
asking the containing inset whether it accepts inserting display math
inset.

Fixes bug #10033.

8 years agoDo not use 'u' flag for ar
Jean-Marc Lasgouttes [Wed, 11 May 2016 15:09:34 +0000 (17:09 +0200)]
Do not use 'u' flag for ar

The Reproducible Builds effort (https://wiki.debian.org/ReproducibleBuilds) in Debian (at least) means that 'ar' is built in deterministic mode as default: all timestamps are set to 0.

This is not compatible with the use of the 'u' flag, and therefore ARFLAGS has to be changed from 'cru' to 'cr'.

This gets rid of the harmless but annoying warning
  ar: `u' modifier ignored since `D' is the default (see `U')

8 years agoRemove unused include file.
Stephan Witt [Tue, 10 May 2016 16:08:05 +0000 (18:08 +0200)]
Remove unused include file.

8 years agoCorrect path names were to look for RPM based dictionaries for hunspell on Linux.
Stephan Witt [Tue, 10 May 2016 16:06:48 +0000 (18:06 +0200)]
Correct path names were to look for RPM based dictionaries for hunspell on Linux.

8 years agoDisable LFUN_INSET_DISSOLVE in tabulars
Jean-Marc Lasgouttes [Tue, 10 May 2016 09:17:43 +0000 (11:17 +0200)]
Disable LFUN_INSET_DISSOLVE in tabulars

When in a tabular cell, "this" is just a lone InsetText, while cur.inset() is the whole tabular. This makes a big difference, especially when one wants to count cells.

Fixes bug "9954.

8 years agoSimplify .po file generation
Georg Baum [Tue, 10 May 2016 05:03:54 +0000 (07:03 +0200)]
Simplify .po file generation

We can generate the file with the cirrect line endings directly instead of
calling a helper script to convert them.

8 years agofix #9826: Outline disclosure of subsection content disappears one second after
Guillaume Munch [Sun, 8 May 2016 22:56:55 +0000 (23:56 +0100)]
fix #9826: Outline disclosure of subsection content disappears one second after
doubleclicking content item.

This is only meant as a workaround. See #6675 for more general issues regarding
unwanted collapse of the tree view.

8 years agoAlways use unix line ends in .pot files
Georg Baum [Sun, 8 May 2016 20:08:17 +0000 (22:08 +0200)]
Always use unix line ends in .pot files

Otherwise gettext creates files with stray '\r' in comment lines on windows.

8 years agoDescribe cross-compilation with MXE
Georg Baum [Sun, 8 May 2016 12:30:09 +0000 (14:30 +0200)]
Describe cross-compilation with MXE

MXE is really a great project: It provides a cross-compilation environment
for compiling windows binaries using mingw from any unix system, and includes
lots of prepackaged libraries. The latter distinguishes it from the mingw
cross-compilers packaged with some linux distros such as debian.

I was even able to run the resulting lyx.exe using wine!

8 years agoFix packaging for mingw crosscompilation
Georg Baum [Sun, 8 May 2016 11:46:35 +0000 (13:46 +0200)]
Fix packaging for mingw crosscompilation

The standard host triplet for mingw tools is is something like
x86_64-w64-mingw32 on debian and something like x86-64-w64-mingw32.shared for
mxe (http://mxe.cc). Detect windows packaging correctly for these build types.

8 years agoFix compiler warnings
Georg Baum [Sun, 8 May 2016 10:25:09 +0000 (12:25 +0200)]
Fix compiler warnings

8 years agoDo not redefine WINVER
Georg Baum [Sun, 8 May 2016 10:18:07 +0000 (12:18 +0200)]
Do not redefine WINVER

Compiling different parts of the sources with different WINVER may lead to
subtle and hard to detect problems. Better use the same value everywhere.
The existing error message suggests that this was wanted anyway, and it
fixes a compiler warning when cross-compiling for mingw on linux. Our code
does not require a specific value, only a minimum value of 0x5000, which
means the resulting executable will require at least Windows 2000.

8 years agoConfigure included hunspell with autotools
Georg Baum [Sun, 8 May 2016 09:53:34 +0000 (11:53 +0200)]
Configure included hunspell with autotools

The included hunspell should not be used on Linux or OS X, but (depending on
local configuration) it might be needed for crosscompiling a mingw target
from Linux. Now the user can choose whether to use the included hunspell or not.
cmake does already support that.

Now the only other dependency you need to cross-compile for mingw on debian
or ubuntu is qt.

8 years agoFix compiler warnings
Georg Baum [Sun, 8 May 2016 08:51:51 +0000 (10:51 +0200)]
Fix compiler warnings

Only the ones I understand (DWORD is always unsigned). There are more:

../../src/Server.cpp: In member function ‘bool lyx::LyXComm::pipeServer()’:
../../src/Server.cpp:280:10: warning: enumeration value ‘CONNECTING_STATE’ not handled in switch [-Wswitch]
   switch (pipe_[i].state) {
             ^
     ../../src/Server.cpp:347:8: warning: ‘success’ may be used uninitialized in this function [-Wmaybe-uninitialized]
             && status == pipe_[i].iobuf.length()) {
             ^

8 years agoProperly check for windres
Georg Baum [Sun, 8 May 2016 08:16:12 +0000 (10:16 +0200)]
Properly check for windres

Use the standard way to check for the resource compiler, as e.g.
libtool does it: AC_CHECK_TOOL does already provide some cross compiling
magic, and we do also get an error now at configure time if windres is not
found.

8 years agoEnsure unix line ends for configure.ac
Georg Baum [Sat, 7 May 2016 10:33:47 +0000 (12:33 +0200)]
Ensure unix line ends for configure.ac

On windows, configure.ac needs to have unix line ends if you want to run
autogen.sh (see #10053). It is no poblem to force unix line ends, since
you need to run autogen.sh under mingw or cygwin shell anyway, and if you
neither have mingw nor cygwin, then configure.ac is of no use for you.

8 years agoRemove special code for Qt5 to manage HiDPI. It's not needed anymore and leads to...
Stephan Witt [Sat, 7 May 2016 07:56:03 +0000 (09:56 +0200)]
Remove special code for Qt5 to manage HiDPI. It's not needed anymore and leads to strange icon scaling problems in mixed resolution environment.
For reference see the screen shots in bug tracker ticket #10114.

8 years agoShow review toolbar when outputting changes
Guillaume Munch [Thu, 5 May 2016 21:01:19 +0000 (22:01 +0100)]
Show review toolbar when outputting changes

"Output changes" alters the preamble even in the absence of tracked
changes. Therefore, not being able to notice when it is activated can possibly
yield hard-to-debug compilation failures.

8 years agoShow help for WINDRES in configure
Georg Baum [Thu, 5 May 2016 18:28:28 +0000 (20:28 +0200)]
Show help for WINDRES in configure

This is the official way to declare environment variables

8 years agoMake windres configurable
Georg Baum [Thu, 5 May 2016 18:13:56 +0000 (20:13 +0200)]
Make windres configurable

The windres program is typically not called windres for cross compilation.
Now you can call configure with the argument
WINDRES=x86_64-w64-mingw32-windres
in order to use the windres program on a standard debian installation.

8 years agoConfigure included iconv with autotools
Georg Baum [Thu, 5 May 2016 17:43:24 +0000 (19:43 +0200)]
Configure included iconv with autotools

The included iconv should not be used on Linux or OS X, but (depending on
local configuration) it might be needed for crosscompiling a mingw target
from Linux. Now the user can choose whether to use the included iconv or not.
cmake does already support that.

eilseq.m4 was taken from the original libiconv 1.14 package.

8 years agoFix include path for zconf.h
Georg Baum [Thu, 5 May 2016 17:41:16 +0000 (19:41 +0200)]
Fix include path for zconf.h

I forgot that in the previous commit, and compilation seemed to work because
I had another zconf.h lying around.

8 years agoUse c-style cast as in original
Georg Baum [Thu, 5 May 2016 17:28:11 +0000 (19:28 +0200)]
Use c-style cast as in original

static_cast does not work

8 years agoAdd forgotten zlib includes
Georg Baum [Thu, 5 May 2016 15:36:41 +0000 (17:36 +0200)]
Add forgotten zlib includes

I forgot this in 9b822b25ae5. Also remove a comment that is no longer true.

8 years agoAdd Shankar Giri Venkita Giri to CREDITS
Georg Baum [Thu, 5 May 2016 11:38:25 +0000 (13:38 +0200)]
Add Shankar Giri Venkita Giri to CREDITS

8 years agoDocument MinGW64 autotools build
Shankar Giri Venkita Giri [Thu, 5 May 2016 11:36:51 +0000 (13:36 +0200)]
Document MinGW64 autotools build

Update INSTALL.Win32 to describe compiling with GCC with
MinGW64 + MSYS2 Environment using autotools (see bug 10053)

8 years agoMingw-w64 build fixes for long long
Georg Baum [Thu, 5 May 2016 11:05:12 +0000 (13:05 +0200)]
Mingw-w64 build fixes for long long

On mingw-w64, long long (64bit wide) is larger than long (32bit wide).
Therefore we need some more specializations for string, docstring,
otextstream and << overloaded ostream functions. The configuration code
is by me, the source code changes by Shankar Giri Venkita Giri (bug 10053).

8 years agoFix linking with autotools and mingw-64
Shankar Giri Venkita Giri [Thu, 5 May 2016 10:58:01 +0000 (12:58 +0200)]
Fix linking with autotools and mingw-64

ole32.lib is not linked automatically, but needed for mingw-64.
Patch by Shankar Giri Venkita Giri (bug 10053).

8 years agoFix return types for mingw-w64
Shankar Giri Venkita Giri [Thu, 5 May 2016 10:54:53 +0000 (12:54 +0200)]
Fix return types for mingw-w64

This is needed for warning-free compilation with mingw-w64, and does not hurt
for other build configurations. Patch by Shankar Giri Venkita Giri (bug 10053).

8 years agoFix packaging for mingw-64
Georg Baum [Thu, 5 May 2016 10:46:59 +0000 (12:46 +0200)]
Fix packaging for mingw-64

See bug 10053 for details. Without this, the package is only set correctly
for 32bit mingw.
Thanks Enrico for suggesting this fix and Shankar Giri Venkita Giri for
testing it.

8 years agoDo not search for X in mingw builds
Georg Baum [Thu, 5 May 2016 10:41:24 +0000 (12:41 +0200)]
Do not search for X in mingw builds

The manual qt configuration did not work previously for mingw builds, since it
serached for X libraries, which are not used by LyX on mingw.

8 years agoConfigure included zlib with autotools
Georg Baum [Fri, 29 Apr 2016 06:21:51 +0000 (08:21 +0200)]
Configure included zlib with autotools

The included zlib should not be used on Linux or OS X, but (depending on
local configuration) it might be needed for crosscompiling a mingw target
from Linux. Now the user can choose whether to use the included zlib or not.
cmake does already support that.

zconf.h.in was taken from the original zlib 1.2.8 package. The generation of
zconf.h was made equivalent to the one generated by cmake.

8 years agoMore fixes for #9897 (wrong inset-icon size in PDF)
Günter Milde [Wed, 4 May 2016 21:34:37 +0000 (23:34 +0200)]
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.

8 years agotypo
Guillaume Munch [Wed, 4 May 2016 18:23:51 +0000 (19:23 +0100)]
typo

8 years agoDisable certain change tracking commands when there are no changes
Guillaume Munch [Tue, 3 May 2016 21:15:21 +0000 (22:15 +0100)]
Disable certain change tracking commands when there are no changes

Fix TODO

8 years agoGuiChanges: provide feedback when there are no more changes
Guillaume Munch [Tue, 3 May 2016 19:40:28 +0000 (20:40 +0100)]
GuiChanges: provide feedback when there are no more changes

Remove FIXMEs: date and time localisation

8 years agoAutomatically show the review toolbar if the document has tracked changes
Guillaume Munch [Sat, 30 Jan 2016 23:14:36 +0000 (23:14 +0000)]
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.

8 years agogetInnerText()
Guillaume Munch [Tue, 3 May 2016 20:09:15 +0000 (21:09 +0100)]
getInnerText()

8 years agoLet getPosNearX take horizontal scrolling into account
Jean-Marc Lasgouttes [Sat, 30 Apr 2016 23:27:13 +0000 (01:27 +0200)]
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.

8 years agoTocWidget: clean-up the timer logic
Guillaume Munch [Fri, 29 Apr 2016 21:48:53 +0000 (22:48 +0100)]
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...).

8 years agoTocWidget: Fix perf regression
Guillaume Munch [Fri, 29 Apr 2016 23:25:46 +0000 (00:25 +0100)]
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().

8 years agoWhitespace
Guillaume Munch [Fri, 29 Apr 2016 21:29:27 +0000 (22:29 +0100)]
Whitespace

8 years agoFix cursor position after redo
Jean-Marc Lasgouttes [Wed, 27 Apr 2016 19:16:34 +0000 (21:16 +0200)]
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.

8 years agoAmend d7d4f65b
Guillaume Munch [Sat, 23 Apr 2016 21:22:11 +0000 (22:22 +0100)]
Amend d7d4f65b

Thanks Richard

8 years agoSimplify class structure in TocBackend
Guillaume Munch [Fri, 8 Jan 2016 19:06:50 +0000 (19:06 +0000)]
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.

8 years agoRename InsetMathHull::isTable to allowsTabularFeatures
Jean-Marc Lasgouttes [Fri, 22 Apr 2016 13:50:51 +0000 (15:50 +0200)]
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.

8 years agoFix horizontal scrolling in full-width collapsable insets
Jean-Marc Lasgouttes [Fri, 22 Apr 2016 10:11:00 +0000 (12:11 +0200)]
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.

8 years agoLyXToolBox: a QToolBox with minimum size management
Guillaume Munch [Tue, 22 Mar 2016 21:57:17 +0000 (21:57 +0000)]
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.

8 years agofactor out lookup of loaded hunspell checkers and use it to reduce file system access...
Stephan Witt [Sun, 29 May 2016 19:17:08 +0000 (21:17 +0200)]
factor out lookup of loaded hunspell checkers and use it to reduce file system accesses when checking for available dictionaries

8 years agoInclude hunspell library version 1.3.3 for builds
Stephan Witt [Sun, 29 May 2016 18:38:57 +0000 (20:38 +0200)]
Include hunspell library version 1.3.3 for builds

8 years agoImplement some forgotten context menu items for arguments
Juergen Spitzmueller [Sun, 29 May 2016 10:32:53 +0000 (12:32 +0200)]
Implement some forgotten context menu items for arguments

* Dissolve context menu
* Label toggle (for conglomerate-styled arguments)

Fixes: #10150
8 years agoUpdates to splitting of consecutive environments.
Richard Heck [Thu, 21 Apr 2016 21:44:14 +0000 (17:44 -0400)]
Updates to splitting of consecutive environments.

From Enrico.

8 years agoCleanup bv-dependent variables in InsetCollapsable
Jean-Marc Lasgouttes [Tue, 19 Apr 2016 13:45:08 +0000 (15:45 +0200)]
Cleanup bv-dependent variables in InsetCollapsable

It makes sense to group all the variables in a common struct instead of having four maps.

8 years agoamend 5b7be5eb (typo+spacing)
Jean-Marc Lasgouttes [Tue, 19 Apr 2016 11:53:47 +0000 (13:53 +0200)]
amend 5b7be5eb (typo+spacing)

8 years agoMake inset-select-all select all cells only in tables
Jean-Marc Lasgouttes [Mon, 14 Mar 2016 10:46:28 +0000 (11:46 +0100)]
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.

8 years agoChange mouse cursor on tabular selection zones
Jean-Marc Lasgouttes [Tue, 2 Feb 2016 16:07:29 +0000 (17:07 +0100)]
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.

8 years agoFix display of InsetCollapsable with split views
Jean-Marc Lasgouttes [Wed, 3 Feb 2016 09:37:29 +0000 (10:37 +0100)]
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.

8 years agowhitespace only
Jean-Marc Lasgouttes [Wed, 3 Feb 2016 09:42:01 +0000 (10:42 +0100)]
whitespace only

8 years agoPass a BufferView to Inset::clickable
Jean-Marc Lasgouttes [Tue, 2 Feb 2016 16:17:10 +0000 (17:17 +0100)]
Pass a BufferView to Inset::clickable

8 years agoMake monolithic build code portable to Mac OS
Jean-Marc Lasgouttes [Wed, 13 Apr 2016 16:27:42 +0000 (18:27 +0200)]
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.

8 years agoAvoid narrow boxes when using \width as box width unit
Jean-Marc Lasgouttes [Tue, 5 Apr 2016 08:43:16 +0000 (10:43 +0200)]
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.

8 years agoMove the documentation changelogs out of attic
Jean-Marc Lasgouttes [Fri, 15 Apr 2016 16:17:26 +0000 (18:17 +0200)]
Move the documentation changelogs out of attic

They should not be hidden in this directory.

8 years agoWhen a counter is stepped, reset recursively all slaves
Jean-Marc Lasgouttes [Mon, 11 Apr 2016 10:00:19 +0000 (12:00 +0200)]
When a counter is stepped, reset recursively all slaves

Fixes bug #10063.

8 years agoInclude config.h in LyXToolBox.cpp
Guillaume Munch [Sun, 17 Apr 2016 14:16:31 +0000 (15:16 +0100)]
Include config.h in LyXToolBox.cpp

Amend 367a7a6dd.

8 years agoUpdate version in configure.ac.
Richard Heck [Sun, 17 Apr 2016 14:19:02 +0000 (10:19 -0400)]
Update version in configure.ac.

8 years agoFix compilation with qt5
Guillaume Munch [Sun, 17 Apr 2016 13:21:43 +0000 (14:21 +0100)]
Fix compilation with qt5

Amend 367a7a6d.

8 years agoAmend a5db05ae
Guillaume Munch [Sun, 17 Apr 2016 13:38:01 +0000 (14:38 +0100)]
Amend a5db05ae

Restore tabstops. I was mistaken about what tabstops are and thought they were
useless in this context.

8 years agoCitationUi.ui: Align "Selected citations" label to the left
Guillaume Munch [Thu, 17 Mar 2016 17:10:26 +0000 (17:10 +0000)]
CitationUi.ui: Align "Selected citations" label to the left

8 years agoLyXToolBox: a QToolBox with minimum size management
Guillaume Munch [Tue, 22 Mar 2016 21:57:17 +0000 (21:57 +0000)]
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.

8 years agoCorrect strange FIXME
Guillaume Munch [Sat, 16 Apr 2016 22:40:47 +0000 (23:40 +0100)]
Correct strange FIXME

8 years agoImprovements to the shortcuts preference dialog (#9174)
Guillaume Munch [Tue, 23 Feb 2016 20:46:19 +0000 (20:46 +0000)]
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.

8 years agoSanitize InsetMathHull and add a check for mutability in LFUN_MATH_MUTATE
Guillaume Munch [Mon, 14 Dec 2015 01:54:27 +0000 (01:54 +0000)]
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.)