]> git.lyx.org Git - lyx.git/log
lyx.git
6 years agolayouttranslations.review: "it" was obviously checked by Enrico (coming from minted)
Pavel Sanda [Wed, 19 Jul 2017 11:53:57 +0000 (13:53 +0200)]
layouttranslations.review: "it" was obviously checked by Enrico (coming from minted)

6 years agoWe have new translation which slipped through the cracks.
Pavel Sanda [Wed, 19 Jul 2017 11:36:06 +0000 (13:36 +0200)]
We have new translation which slipped through the cracks.

6 years agolayouttranslations: new untracked movements for "List of listings".
Pavel Sanda [Wed, 19 Jul 2017 11:27:31 +0000 (13:27 +0200)]
layouttranslations: new untracked movements for "List of listings".

Likely follow-up from ab47e48dcc.

6 years agoUpdate some translation by Jari-Matti Mäkelä
Kornel Benko [Wed, 19 Jul 2017 10:39:10 +0000 (12:39 +0200)]
Update some translation by Jari-Matti Mäkelä

6 years agoTypo in lib/layouttranslations makefile machinery.
Pavel Sanda [Wed, 19 Jul 2017 10:38:13 +0000 (12:38 +0200)]
Typo in lib/layouttranslations makefile machinery.

6 years agoUpdate fi.po
Kornel Benko [Wed, 19 Jul 2017 10:02:01 +0000 (12:02 +0200)]
Update fi.po

Translations from Jari-Matti Mäkelä <jmjmak@utu.fi>

6 years agoSome minor polishment and comments.
Juergen Spitzmueller [Wed, 19 Jul 2017 08:22:13 +0000 (10:22 +0200)]
Some minor polishment and comments.

6 years agoScripts for connecting LyX with evince for backward/forward search
Juergen Spitzmueller [Tue, 18 Jul 2017 17:08:44 +0000 (19:08 +0200)]
Scripts for connecting LyX with evince for backward/forward search

The scripts have been initially developed by Benjamin Kellermann (2011)
as a derivation of gedit-synctex-plugin by José Aliste
(https://github.com/jaliste/gedit-synctex-plugin, 2010) and published on
https://ubuntuforums.org/showthread.php?t=1716268.

The work here is based on a further derivation of this work for Sublime
Text LaTeX Tools
(https://github.com/SublimeText/LaTeXTools/tree/master/evince).

Adaptations for the use with LyX as well as the initial translation of
the evince_sync bash script to python have been done by myself.

The python code (particularly evince_sync_lyx) needs audit!

6 years agoFix minor whitespace error.
Christian Ridderström [Mon, 17 Jul 2017 20:23:17 +0000 (22:23 +0200)]
Fix minor whitespace error.

Fix the whitespace in e.g. 'QString&' to 'QString &' as this
incorrect, but primarily to simplify a comparison related to
later possibly introducing the use of .clang-format.

6 years agoAccept modifications in R examples
Guillaume MM [Mon, 17 Jul 2017 20:15:12 +0000 (22:15 +0200)]
Accept modifications in R examples

6 years agoDefine theorem counter for acmart layout
Guillaume MM [Sat, 1 Jul 2017 21:02:54 +0000 (23:02 +0200)]
Define theorem counter for acmart layout

6 years agoAdd some notes on forward/reverse search with evince.
Juergen Spitzmueller [Mon, 17 Jul 2017 08:26:43 +0000 (10:26 +0200)]
Add some notes on forward/reverse search with evince.

Evince is a special case, since it provides f/r search not via command
line switches and pref settings, but via DBUS. On Linux at least, this
can be used by LyX via some external scripts. The possibility is now
mentioned here, the details (and the scripts) are provided on the wiki.

6 years agoUpdate lib/Makefile.am
Enrico Forestieri [Sun, 16 Jul 2017 09:22:05 +0000 (11:22 +0200)]
Update lib/Makefile.am

6 years agoFix comment
Jean-Marc Lasgouttes [Sat, 15 Jul 2017 16:41:56 +0000 (18:41 +0200)]
Fix comment

6 years agoClassic icon for toolbar-toggle-review
Enrico Forestieri [Sat, 15 Jul 2017 14:43:18 +0000 (16:43 +0200)]
Classic icon for toolbar-toggle-review

6 years agoAvoid multiple execution of AddToPreamble and friends
Jean-Marc Lasgouttes [Thu, 13 Jul 2017 17:03:06 +0000 (19:03 +0200)]
Avoid multiple execution of AddToPreamble and friends

When trying to read a textclass, read(Lexer, Readtype) parses and
executes the first token and only then verifies that its effect was to
set format properly. Otherwise it exits.

This is wrong, because if the first tag is "AddToPreamble", then it will
have modified the preamble by the time we notice it was not "Format" and
therefore exit.

The new code starts by requiring a correct "Format" tag.

Fixes bug #10725.

6 years agoOxygen icon for toolbar-toggle-review
Enrico Forestieri [Sat, 15 Jul 2017 14:12:40 +0000 (16:12 +0200)]
Oxygen icon for toolbar-toggle-review

6 years agoTweak some icons
Enrico Forestieri [Sat, 15 Jul 2017 13:27:36 +0000 (15:27 +0200)]
Tweak some icons

- Move down the ERT icon
- Remove the transparent background from note icons as it turns out
  not to be transparent on some combinations of platform/Qt version

6 years agoBetter icon for toolbar-toggle-review
Enrico Forestieri [Sat, 15 Jul 2017 13:04:00 +0000 (15:04 +0200)]
Better icon for toolbar-toggle-review

6 years agosv.po: translation update from Jim Rotmalm
Scott Kostyshak [Sat, 15 Jul 2017 08:45:07 +0000 (04:45 -0400)]
sv.po: translation update from Jim Rotmalm

6 years agoUpdate of Swedish splash.lyx from Jim Rotmalm
Scott Kostyshak [Sat, 15 Jul 2017 08:22:33 +0000 (04:22 -0400)]
Update of Swedish splash.lyx from Jim Rotmalm

6 years agouk.gmo: update to match latest po
Scott Kostyshak [Sat, 15 Jul 2017 08:08:50 +0000 (04:08 -0400)]
uk.gmo: update to match latest po

This amends ca0ba098 and f01ca45d.

6 years agoCmake build: Use the same destination for lyx-tex-files as in automake
Kornel Benko [Fri, 14 Jul 2017 09:24:20 +0000 (11:24 +0200)]
Cmake build: Use the same destination for lyx-tex-files as in automake

6 years agode.po: address shortcut clash
Juergen Spitzmueller [Fri, 14 Jul 2017 07:23:22 +0000 (09:23 +0200)]
de.po: address shortcut clash

6 years agoFix generation of lyx_commit_hash.h
Jean-Marc Lasgouttes [Thu, 13 Jul 2017 15:58:49 +0000 (17:58 +0200)]
Fix generation of lyx_commit_hash.h

The code in the Makefile was incorrect.

6 years ago Copy documentation of new features of Additional.lyx in de, es, fr and ja document...
jpc [Wed, 12 Jul 2017 20:31:30 +0000 (22:31 +0200)]
   Copy documentation of new features of Additional.lyx in de, es, fr and ja documentation files
   as change tracking and remove chnage tracking in Additional.lyx

6 years ago Translations of backports from 2.2 from Uwe
jpc [Wed, 12 Jul 2017 19:44:05 +0000 (21:44 +0200)]
       Translations of backports from 2.2 from Uwe

6 years ago Typo in fr.po
jpc [Wed, 12 Jul 2017 16:20:08 +0000 (18:20 +0200)]
        Typo in fr.po

6 years agoTextMetrics::leftMargin does not need a max_width parameter
Jean-Marc Lasgouttes [Wed, 12 Jul 2017 08:25:54 +0000 (10:25 +0200)]
TextMetrics::leftMargin does not need a max_width parameter

Additionally move it to private: section.

6 years agoWhen cleaning up before quitting, take care of exceptions
Jean-Marc Lasgouttes [Tue, 11 Jul 2017 13:28:06 +0000 (15:28 +0200)]
When cleaning up before quitting, take care of exceptions

We do not want the cleanup work to be interrupted by a buffer exception.

Spotted by coverity. See bug #9979 for discussion.

6 years agoRemove copy-and-paste error
Jean-Marc Lasgouttes [Tue, 11 Jul 2017 11:43:32 +0000 (13:43 +0200)]
Remove copy-and-paste error

6 years agoDo not record undo when typing two spaces has been blocked
Jean-Marc Lasgouttes [Tue, 11 Jul 2017 10:15:29 +0000 (12:15 +0200)]
Do not record undo when typing two spaces has been blocked

Move the code that forbids character insertion in its own helper function.

Call this function before doing a recordUndo. This avoids to mark the
document dirty in cases where nothing happens.

Part of bug #10721.

6 years agoLoad color before polyglossia also in preview snippets
Juergen Spitzmueller [Tue, 11 Jul 2017 08:03:03 +0000 (10:03 +0200)]
Load color before polyglossia also in preview snippets

This fixes an error in the preview generation with polyglossia
and bidi that prevents snippet generation (and consequently also
"math as image" xhtml output).

Fixes: #10716.
6 years agoCmake build: Install lyx-provided fonts to where GuiFontLoader.cpp expects them
Kornel Benko [Mon, 10 Jul 2017 11:17:29 +0000 (13:17 +0200)]
Cmake build: Install lyx-provided fonts to where GuiFontLoader.cpp expects them

6 years ago Forgot 1 fuzzy in fr.po
jpc [Mon, 10 Jul 2017 09:45:31 +0000 (11:45 +0200)]
      Forgot 1 fuzzy in fr.po

6 years ago Update fr.po for beta
jpc [Mon, 10 Jul 2017 09:08:26 +0000 (11:08 +0200)]
      Update fr.po for beta

6 years agoFix bug #10718
Enrico Forestieri [Sun, 9 Jul 2017 20:27:06 +0000 (22:27 +0200)]
Fix bug #10718

Due to the peculiarities of Windows, it may happen that
pdftocairo is built without png support when compiled on this
platform. Unless explicitly requested (maybe for some peculiar
application and certainly not for usual distros), this is
highly improbable to occur on other platforms.

6 years agoAmend f01ca45: uk.po: translation update from Yuri Chornoivan
Kornel Benko [Sun, 9 Jul 2017 06:58:00 +0000 (08:58 +0200)]
Amend f01ca45: uk.po: translation update from Yuri Chornoivan

6 years agouk.po: translation update from Yuri Chornoivan
Scott Kostyshak [Fri, 7 Jul 2017 14:06:32 +0000 (10:06 -0400)]
uk.po: translation update from Yuri Chornoivan

6 years agoRewrite stripName without regex
Jean-Marc Lasgouttes [Thu, 6 Jul 2017 13:26:32 +0000 (15:26 +0200)]
Rewrite stripName without regex

Using a regular expression to find /src/ or \src\ in a string is overkill,
and since regexes can throw exceptions, it makes coverity nervous.

The new code is simpler anyway.

6 years agoFix uninitialized members outfd and infd
Jean-Marc Lasgouttes [Thu, 6 Jul 2017 12:46:03 +0000 (14:46 +0200)]
Fix uninitialized members outfd and infd

Also move initialization of some variables to initializers list.

Only the non-win32 part has been tested, but it should be OK.

Spotted by coverity.

6 years agoFix unitialized member
Jean-Marc Lasgouttes [Thu, 6 Jul 2017 12:45:21 +0000 (14:45 +0200)]
Fix unitialized member

Spotted by coverity.

6 years agoRemove test that is not needed.
Jean-Marc Lasgouttes [Thu, 6 Jul 2017 12:14:43 +0000 (14:14 +0200)]
Remove test that is not needed.

We know that buf is not null at this point.

Spotted by coverity.

6 years agoh_use_minted is a bool, not a string
Jean-Marc Lasgouttes [Thu, 6 Jul 2017 12:09:18 +0000 (14:09 +0200)]
h_use_minted is a bool, not a string

We have a mix in this file of boolean stored as such or as strings.
This translates to values written as true/false or 1/0 in .lyx files.

In this case, the value of use_minted could only be true, since the
char * pointer is non null.

Also add some else clauses.

Spotted by coverity.

6 years agoRename some macro-related insets
Jean-Marc Lasgouttes [Wed, 5 Jul 2017 12:31:28 +0000 (14:31 +0200)]
Rename some macro-related insets

These classes should have names that start with "Inset". Renaming done:
MathMacro => InsetMathMacro
MathMacroTemplate => InsetMathMacroTemplate
MathMacroArgument => InsetMathMacroArgument
ArgumentProxy => InsetArgumentProxy
DisplayLabelBox => InsetDisplayLabelBox
CommandInset => InsetMathCommand

6 years agoDo not use toobar menu as fallback context menu
Jean-Marc Lasgouttes [Wed, 5 Jul 2017 10:28:26 +0000 (12:28 +0200)]
Do not use toobar menu as fallback context menu

This is a consequence of e91572a0, although it is not clear why. The
contextMenuEvent code of the workarea should not delegate context
menu when it cannot honor it.

Also fix a small memory leak.

Fixes bug #10616.

6 years ago New file recollecting changes in the 2.3 doc
jpc [Wed, 5 Jul 2017 07:34:13 +0000 (09:34 +0200)]
        New file recollecting changes in the 2.3 doc

6 years agoUse the proper buffer when recording undo
Jean-Marc Lasgouttes [Tue, 4 Jul 2017 14:34:34 +0000 (16:34 +0200)]
Use the proper buffer when recording undo

The code in InsetLabel::updateReferences code changes reference insets
in potentially several buffers. When recording undo, it is important
to use the right undo stack, otherwise crashes can ensue.

Once it is done, it is neccessary to create undo groups as needed.
This is done using UndoGroupHelper. This demonstrates a shortcoming of
UndoGroup helper: if a buffer is encountered in two seperate
occasions, two undo groups will be created for this buffer. This is
not correct.

Fixes bug #10643.

6 years agoFix whitespace in some more files.
Richard Heck [Mon, 3 Jul 2017 18:46:27 +0000 (14:46 -0400)]
Fix whitespace in some more files.

6 years agoFix trailing whitespace in txt files.
Richard Heck [Mon, 3 Jul 2017 17:53:41 +0000 (13:53 -0400)]
Fix trailing whitespace in txt files.

6 years agoFix trailing whitespace in cpp files.
Richard Heck [Mon, 3 Jul 2017 17:53:14 +0000 (13:53 -0400)]
Fix trailing whitespace in cpp files.

6 years agoFix whitespace at EOL.
Richard Heck [Mon, 3 Jul 2017 17:45:58 +0000 (13:45 -0400)]
Fix whitespace at EOL.

6 years agonatbibapa.module: Do not overwrite preamble.
Juergen Spitzmueller [Sun, 2 Jul 2017 08:54:39 +0000 (10:54 +0200)]
natbibapa.module: Do not overwrite preamble.

Also add author information.

Candidate for stable.

7 years agoDon't give users dangerous instructions
Enrico Forestieri [Tue, 27 Jun 2017 22:30:56 +0000 (00:30 +0200)]
Don't give users dangerous instructions

7 years agoSort images file list also for cmake
Kornel Benko [Tue, 27 Jun 2017 17:18:24 +0000 (19:18 +0200)]
Sort images file list also for cmake

This is not needed for recent cmake versions, but since we expect
also older cmake version be used, sort the list nevertheless.
See https://reproducible-builds.org/ for why this matters.

Amends b8e3615

7 years agoFixup the fixup d0acc3e57044: use editable()/isActive()
Jean-Marc Lasgouttes [Fri, 23 Jun 2017 18:32:32 +0000 (20:32 +0200)]
Fixup the fixup d0acc3e57044: use editable()/isActive()

While 522516d9 was too strong and broke mathed, d0acc3e57044 is too
lenient and can accept insets (mathed/CommandInset, InsetInfo) that
have a positive nargs() but are not editable (because they encapsulate
something).

Therefore the best solution for now is to use editable() in text and
isActive() in mathed, until those two things are merged.

Part of #10667.

7 years agosort svgz file list
Bernhard M. Wiedemann [Thu, 22 Jun 2017 13:52:43 +0000 (15:52 +0200)]
sort svgz file list

(required because filesystems return listings in undeterministic order)
to generate Resources.qrc and thereby Resources.cpp and the lyx binary
in a reproducible way

Setting LC_ALL=C because sort order might vary with locales.

See https://reproducible-builds.org/ for why this matters.

Fixes #10711.

7 years agoCmake export tests: Ignore missing glyphs on some tests
Kornel Benko [Tue, 27 Jun 2017 08:26:27 +0000 (10:26 +0200)]
Cmake export tests: Ignore missing glyphs on some tests

Could not find a suitable tex font for the following tests:
export/doc/uk/Intro_pdf4_texF
export/examples/uk/splash_pdf4_texF
export/examples/minted-filelisting_pdf4_texF

7 years agoDon't enclose in braces minted languages
Enrico Forestieri [Mon, 26 Jun 2017 22:58:07 +0000 (00:58 +0200)]
Don't enclose in braces minted languages

This is because the braces would be part of the language name.

7 years agoAmend 28be7d55 to avoid an exception
Enrico Forestieri [Mon, 26 Jun 2017 22:09:51 +0000 (00:09 +0200)]
Amend 28be7d55 to avoid an exception

This was occurring during validation when trying to enter the
language name in the advanced tab.

7 years agoAccount for old versions of Pygments
Enrico Forestieri [Mon, 26 Jun 2017 21:23:23 +0000 (23:23 +0200)]
Account for old versions of Pygments

Pygments versions prior to 2.0 only accept lower case names for lexers.
This commit makes sure to always use lower case names for the language
that is written in the LaTeX file, while retaining the proper casing
for the presentation in the GUI, which is dictated by compatibility
with the listings package. Moreover, if one switches from listings
to minted in a document, the language combo is properly updated even
if the used language had attached a dialect (a concept not shared by
minted), or even when importing a LaTeX document with tex2lyx.

7 years agoFix bug #10705
Enrico Forestieri [Mon, 26 Jun 2017 14:14:27 +0000 (16:14 +0200)]
Fix bug #10705

Seemingly, std::regex does not account for newlines in the string.

7 years agoClarify the status of thread local storage on OSX
Enrico Forestieri [Mon, 26 Jun 2017 12:41:34 +0000 (14:41 +0200)]
Clarify the status of thread local storage on OSX

The __thread local storage is supported on OSX since 10.7 (Lion),
released in 2012. For example, see:
http://forum.dlang.org/post/mailman.3439.1452269142.22025.digitalmars-d-bugs@puremagic.com

7 years agoCatch xdvipdfmx driver error (that breaks XeTeX compilation).
Juergen Spitzmueller [Sun, 25 Jun 2017 08:29:19 +0000 (10:29 +0200)]
Catch xdvipdfmx driver error (that breaks XeTeX compilation).

This prevents an assertion due to an unrecognized error.

Fixes: #10076.
7 years agoFixup 9c92494e1a486: avoid crash in Inset::dissolve()
Jean-Marc Lasgouttes [Fri, 23 Jun 2017 17:44:54 +0000 (19:44 +0200)]
Fixup 9c92494e1a486: avoid crash in Inset::dissolve()

The code path when the inset is empty did not fixup the cursor
position correctly.

Part of bug #10667.

7 years agoCmake export tests: Missed second parameter for writeConverters()
Kornel Benko [Tue, 20 Jun 2017 22:09:50 +0000 (00:09 +0200)]
Cmake export tests: Missed second parameter for writeConverters()

Unfortunatelly the prototype checking in perl is not very
sophisticated.

7 years agoFixup 522516d9 : editable() is unusable in mathed
Jean-Marc Lasgouttes [Tue, 20 Jun 2017 07:41:48 +0000 (09:41 +0200)]
Fixup 522516d9 : editable() is unusable in mathed

This is a relic from IU (Inset Unification): editable() is for text
insets and isActive() for mathed. This needs to be cleaned up.

Part of bug #10667.

7 years agoFix bug #10546
Enrico Forestieri [Mon, 19 Jun 2017 23:14:55 +0000 (01:14 +0200)]
Fix bug #10546

A labeled equation is also numbered.

7 years agoAvoid crash when selecting long text
Jean-Marc Lasgouttes [Mon, 19 Jun 2017 10:23:17 +0000 (12:23 +0200)]
Avoid crash when selecting long text

In some (not yet understood) situations, the paragraph metrics cache
is empty in generateSyntheticMouseEvent(). We just avoid a crash in
this case, but there is probably an underlying problem that deserves
being fixed.

Fixes bug #10324.

7 years agoCmake export tests: Modularisation of prefTest.pl
Kornel Benko [Sun, 18 Jun 2017 10:13:57 +0000 (12:13 +0200)]
Cmake export tests: Modularisation of prefTest.pl

Also added a parameter to easier switch between standard settings in
preferences and settings to use in export tests.

7 years agoPrune white space after the separating comma of options
Enrico Forestieri [Sat, 17 Jun 2017 18:41:29 +0000 (20:41 +0200)]
Prune white space after the separating comma of options

Both listings and minted allow for many complex options. So, a latex
source can be easily written as

\documentclass{article}
\usepackage{minted}
\usepackage{graphicx}
\usepackage{dingbat}
\begin{document}
\begin{minted}[breaklines=true,
               breakautoindent=false,
               breaksymbolleft=\raisebox{0.8ex}{
                   \small\reflectbox{\carriagereturn}},
               breaksymbolindentleft=0pt,
               breaksymbolsepleft=0pt,
               breaksymbolright=\small\carriagereturn,
               breaksymbolindentright=0pt,
               breaksymbolsepright=0pt]{Python}
def f(x):
    return 'Some text' + str(x) + 'some more text' + str(x) + 'even more text that goes on for a while'
\end{minted}
\end{document}

The used text editor can therefore add a mixture of tabs and spaces.
The white space after the options is not a problem and the imported
file compiles just fine, but the validator gets confused and doesn't
validate them. This would entail a difficult editing of the options
only to have them validated. So, better remove the white space.

7 years agoAmend 9b2b51a4
Enrico Forestieri [Sat, 17 Jun 2017 17:35:10 +0000 (19:35 +0200)]
Amend 9b2b51a4

runtests.py was being forgotten and a string transliterated.

7 years agoTex2lyx tests: Added minted testcase from Enrico Forestieri
Kornel Benko [Sat, 17 Jun 2017 14:55:57 +0000 (16:55 +0200)]
Tex2lyx tests: Added minted testcase from Enrico Forestieri

7 years agoDon't allow raw newlines in options
Enrico Forestieri [Sat, 17 Jun 2017 17:05:02 +0000 (19:05 +0200)]
Don't allow raw newlines in options

This happens if the options are split over multiple lines in the
latex source. A newline here confuses the lexer when reading the
converted LyX file.

7 years agoCorrect a default english layout translation
Enrico Forestieri [Sat, 17 Jun 2017 13:09:06 +0000 (15:09 +0200)]
Correct a default english layout translation

Of course, the default english translation for "List of Listings"
is "List of Listings", not "Listing".

7 years agoCorrectly skip a bottom caption
Enrico Forestieri [Sat, 17 Jun 2017 12:01:42 +0000 (14:01 +0200)]
Correctly skip a bottom caption

The getArg() method stops at the first closing brace, whether it
matches the opening one or not, so properly parse the caption and
then throw it away.

7 years agoUpdate parent buffer as soon as a child has been released
Juergen Spitzmueller [Sat, 17 Jun 2017 07:43:01 +0000 (09:43 +0200)]
Update parent buffer as soon as a child has been released

This prevents dangling pointers that might crash LyX.

Fixes: #9979.
Candidate for stable.

7 years agotex2lyx: import minted listings
Enrico Forestieri [Sat, 17 Jun 2017 00:23:00 +0000 (02:23 +0200)]
tex2lyx: import minted listings

This commit updates tex2lyx in order to also import minted listings.
For the floating version of a listing, minted uses the listing
environment, a concept that is not shared with the listings package,
towards which our listings inset is geared.
For this reason, a kludge is necessary when importing minted listings
not previously exported by LyX itself.
If the floating listing contains only a caption and a label (other
than the listing itself), everything is fine and the import is (or
aims to be) perfect. But, as in all other floating ebvironments,
one can also stick there other elements, which don't have a place
in the listings inset. So, in order to avoid a data loss, tex2lyx
sticks everything into the caption. In this way, things may be
rearranged in the GUI, if necessary. There is no other way, apart
from a complete redesign of the listings inset, of course. However,
I think that this is an acceptable compromise.

7 years agoCmake export tests: Adapt to minted listings
Kornel Benko [Fri, 16 Jun 2017 09:39:26 +0000 (11:39 +0200)]
Cmake export tests: Adapt to minted listings

1.) Handle also 'LatexCommand inputminted' in lyxStatus.pm
2.) Add '-shell-escape' to the appropriate converters.
  This applies only to the ctest-environment iff calling
  the script 'prefTest.pl' in the build directory.

7 years agoUse the same code for editable and non-editable buttons
Jean-Marc Lasgouttes [Thu, 15 Jun 2017 13:30:23 +0000 (15:30 +0200)]
Use the same code for editable and non-editable buttons

This removes the use of rectText in RenderButton. The fact that this
gave different spacing than buttonText was a problem.

Now buttonText requires to specify
* the offset, so that INSET_TO_TEXT_OFFSET is not used anymore in
  src/frontends/, which will be useful later.
* the background and frame color, in replacement for the hover state.

Remove the methods button() and buttonFrame() from GuiPainter.

Remove some unused header files.

Fixes bug #10704.

7 years agoAlso catch "! Incomplete \\if"
Juergen Spitzmueller [Thu, 15 Jun 2017 13:29:40 +0000 (15:29 +0200)]
Also catch "! Incomplete \\if"

7 years agoCatch "! Incomplete \\ifx" error
Juergen Spitzmueller [Thu, 15 Jun 2017 13:07:03 +0000 (15:07 +0200)]
Catch "! Incomplete \\ifx" error

Fixes: #10666
7 years agoMake fixIfBroken() more robust
Jean-Marc Lasgouttes [Thu, 15 Jun 2017 09:49:49 +0000 (11:49 +0200)]
Make fixIfBroken() more robust

Chop slice when its inset is not editable.

Fixes bug #10667.

7 years agoAvoid memory reuse problems with inset-dissolve
Jean-Marc Lasgouttes [Thu, 15 Jun 2017 09:37:40 +0000 (11:37 +0200)]
Avoid memory reuse problems with inset-dissolve

If
 1. the inset is deleted before pasting its contents in the outer text, and
 2. the inset contents begins with an inset, and
 3. the clone of this inner inset is allocated at the memory location just
    made free,
then bad things can happen.

To avoid this, we delete the inset only after its contents has been pasted.

Fixes bug #10667.

7 years agoGive 4 edit markers to all Frac-like insets
Jean-Marc Lasgouttes [Wed, 14 Jun 2017 13:38:47 +0000 (15:38 +0200)]
Give 4 edit markers to all Frac-like insets

Part of bug #10688.

7 years agoWhen entering an inset by cursor, reset boundary
Jean-Marc Lasgouttes [Wed, 14 Jun 2017 13:08:27 +0000 (15:08 +0200)]
When entering an inset by cursor, reset boundary

This happesn when cursor-left/right enters an inset.

Fixes bug #10630.

7 years agoUpdate it.po
Enrico Forestieri [Tue, 13 Jun 2017 17:57:41 +0000 (19:57 +0200)]
Update it.po

7 years agoAdd lower corners for BOX_MARKER too
Jean-Marc Lasgouttes [Tue, 13 Jun 2017 10:17:21 +0000 (12:17 +0200)]
Add lower corners for BOX_MARKER too

Let's see whether this helps Guillaume.

Part of bug #8883.

7 years agoUpdate sk.po
Kornel Benko [Tue, 13 Jun 2017 09:18:17 +0000 (11:18 +0200)]
Update sk.po

7 years agode.po
Juergen Spitzmueller [Tue, 13 Jun 2017 08:09:48 +0000 (10:09 +0200)]
de.po

7 years agoUpdate it.po
Enrico Forestieri [Tue, 13 Jun 2017 00:34:03 +0000 (02:34 +0200)]
Update it.po

7 years agoremerge po files, except sk.{po,gmo} as requested
Enrico Forestieri [Tue, 13 Jun 2017 00:11:51 +0000 (02:11 +0200)]
remerge po files, except sk.{po,gmo} as requested

7 years agoAvoid a crash if an external template is not installed
Enrico Forestieri [Mon, 12 Jun 2017 19:24:52 +0000 (21:24 +0200)]
Avoid a crash if an external template is not installed

7 years agoSet cursor properly after double/triple click in mathed
Jean-Marc Lasgouttes [Mon, 12 Jun 2017 16:00:43 +0000 (18:00 +0200)]
Set cursor properly after double/triple click in mathed

Without this setCurrentFont() is not correctly called on the
BufferView cursor and the cursor could appear in L-form.

Fixes bug #10686.

7 years agoUse a combo box instead of a check box for selecting the listings package
Enrico Forestieri [Mon, 12 Jun 2017 15:24:26 +0000 (17:24 +0200)]
Use a combo box instead of a check box for selecting the listings package

7 years agoImprovements to inset edit markers
Jean-Marc Lasgouttes [Mon, 12 Jun 2017 15:09:58 +0000 (17:09 +0200)]
Improvements to inset edit markers

Draw also upper markers when editing macros in MACRO_EDIT_INLINE_BOX mode.

Use MARKER2 for inline editing of macros.

7 years agoUse proper markers for display version of the math macro template.
Jean-Marc Lasgouttes [Mon, 12 Jun 2017 13:14:23 +0000 (15:14 +0200)]
Use proper markers for display version of the math macro template.

This avoids ghost white corners when the macro does not have a display
version.

Part of bug #8883.

7 years agoAvoid rounding issue when painting selection
Jean-Marc Lasgouttes [Mon, 12 Jun 2017 12:39:03 +0000 (14:39 +0200)]
Avoid rounding issue when painting selection

This is the same issue that was addressed in the all_sel case at
695b0cc3. The rounding issue only happens at specific zoom and
jusification values.

Fixes part of #8883.

7 years agoFix bad cursor positioning when entering an inset
Jean-Marc Lasgouttes [Thu, 8 Jun 2017 09:35:05 +0000 (11:35 +0200)]
Fix bad cursor positioning when entering an inset

The test added at 359aef92 was incorrect. Actually, Inset::editXY
returns the inset when it is edited and also when it is not, which
can be confusing. So if we are unlucky and the slices positions in the
text area and in the inner inset match, the code below triggers and
many bad things can happen.

Also improve the documentation of Inset::editXY and TextMetrics::editXY.

Fixes #10691.

7 years agoSwitch parameters validation even before applying the changes
Enrico Forestieri [Mon, 12 Jun 2017 09:54:59 +0000 (11:54 +0200)]
Switch parameters validation even before applying the changes

In the document settings allow to immediately switch from one
package to the other for parameters validation without the need
of first applying the changes.