]> git.lyx.org Git - lyx.git/log
lyx.git
7 years agoA more radical approach to inset background painting
Jean-Marc Lasgouttes [Wed, 17 Aug 2016 09:21:38 +0000 (11:21 +0200)]
A more radical approach to inset background painting

Now by default all insets paint their own background when needed. This
means that 63cf3297 and part of 9940acc5 can be reverted.

To avoid extra painting, background drawing is disabled for
InsetCommand and InsetCollapsable. These insets draw background as
part of their normal drawing activity.

This will avoid drawing artifacts with InsetNewpage, InsetVSpace and
probably some others.

7 years agoA PainterInfo variable should be named `pi'.
Jean-Marc Lasgouttes [Tue, 16 Aug 2016 12:29:58 +0000 (14:29 +0200)]
A PainterInfo variable should be named `pi'.

7 years agoAssertions when doing Export As... (#10321)
Guillaume Munch [Thu, 4 Aug 2016 16:00:21 +0000 (17:00 +0100)]
Assertions when doing Export As... (#10321)

Fix assertion with gcc 6: The comparison function must be a strict weak
orderings and not give x < x.

Fix assertion when a custom exportable document format is given a non-ASCII
name. Use qt_ to be consistent with the rest of the code.

Use Qt's locale-aware comparison for appropriate sorting.

7 years agoAdapt code to comment
Enrico Forestieri [Mon, 15 Aug 2016 01:22:01 +0000 (03:22 +0200)]
Adapt code to comment

7 years agoCorrect comment
Enrico Forestieri [Sat, 13 Aug 2016 15:43:03 +0000 (17:43 +0200)]
Correct comment

According to C++11 rules, static locals are thread safe for
the first-time initialization.

See also:
http://stackoverflow.com/questions/12302057/c11-safe-double-checked-locking-for-lazy-initialization-possible

7 years agoCommands to select the posix variant for the mingw cross-compilation script
Guillaume Munch [Sun, 7 Aug 2016 12:13:08 +0000 (13:13 +0100)]
Commands to select the posix variant for the mingw cross-compilation script

The win32 thread model of gcc does not support the <thread> and <mutex> headers
yet.

7 years agoFoils.lyx: fix output of author
Scott Kostyshak [Tue, 9 Aug 2016 16:53:56 +0000 (12:53 -0400)]
Foils.lyx: fix output of author

By moving date and author above the standard layouts, author is now
output in the PDF and the terminal error from LyX about mixing an
InTitle layout with non-InTitle layouts is gone.

7 years agoLiterate.lyx: move date with other InTitle layouts
Scott Kostyshak [Tue, 9 Aug 2016 03:43:15 +0000 (23:43 -0400)]
Literate.lyx: move date with other InTitle layouts

This leads to the date being output in the PDF and gets rid of the
terminal error from LyX about mixing an InTitle layout with
non-InTitle layouts.

7 years agoImprove a layout LYXERR0 message
Scott Kostyshak [Tue, 9 Aug 2016 03:41:59 +0000 (23:41 -0400)]
Improve a layout LYXERR0 message

The name of the layout is now included in an error message about
layouts. This will help with finding the root issue of several
documents we have.

7 years agoUpdate tex2lyx tests.
Richard Heck [Mon, 8 Aug 2016 20:47:06 +0000 (16:47 -0400)]
Update tex2lyx tests.

7 years agoCmake build: Ignore also files with extension .patch --
Kornel Benko [Mon, 8 Aug 2016 19:23:20 +0000 (21:23 +0200)]
Cmake build: Ignore also files with extension .patch --

These files should not be installed.

7 years agoFix dviluatex exports of Sweave/knitr/Lily/noweb
Scott Kostyshak [Sun, 7 Aug 2016 17:31:41 +0000 (13:31 -0400)]
Fix dviluatex exports of Sweave/knitr/Lily/noweb

After the fix at fe06ef0e, several converter chains to DVI
(dviluatex) were broken because they had previously gone through an
incorrect link in the chain.

This commit adds converters for the above formats to dviluatex and
fixes the following ctests:

  export/examples/Literate_dvi3_texF
  export/examples/Literate_dvi3_systemF
  export/examples/knitr_dvi3_texF
  export/examples/knitr_dvi3_systemF
  export/examples/lilypond_dvi3_texF
  export/examples/lilypond_dvi3_systemF
  export/examples/noweb2lyx_dvi3_texF
  export/examples/noweb2lyx_dvi3_systemF
  export/examples/sweave_dvi3_texF
  export/examples/sweave_dvi3_systemF
  export/templates/RJournal_dvi3_texF

7 years agoCmake build: Amend 41e409f8: Use std::call_once only if it is actually available
Kornel Benko [Sun, 7 Aug 2016 09:32:53 +0000 (11:32 +0200)]
Cmake build: Amend 41e409f8: Use std::call_once only if it is actually available

7 years agoUse std::call_once only if it is actually available
Enrico Forestieri [Sun, 7 Aug 2016 02:58:41 +0000 (04:58 +0200)]
Use std::call_once only if it is actually available

7 years agoRemove debugging code.
Richard Heck [Sat, 6 Aug 2016 01:39:58 +0000 (21:39 -0400)]
Remove debugging code.

7 years agoFix XHTML export of German Additional Features manual.
Richard Heck [Fri, 5 Aug 2016 02:43:17 +0000 (22:43 -0400)]
Fix XHTML export of German Additional Features manual.

There was an oddity in the manual that exposed a problem with the
test for the "special case" of an inset all by itself in a pargraph.
If a font change is applied to that inset, we still need to open the
paragraph.

7 years agoInsetNote is not output for XHTML.
Richard Heck [Fri, 5 Aug 2016 02:17:09 +0000 (22:17 -0400)]
InsetNote is not output for XHTML.

Also fixes whitespace.

7 years agoDebugging code.
Richard Heck [Fri, 5 Aug 2016 02:00:24 +0000 (22:00 -0400)]
Debugging code.

7 years agoWe don't need to crash here, but can try to continue in release
Richard Heck [Fri, 5 Aug 2016 01:57:13 +0000 (21:57 -0400)]
We don't need to crash here, but can try to continue in release
mode.

7 years agoRemove stray "typewriter" font.
Richard Heck [Fri, 5 Aug 2016 01:40:37 +0000 (21:40 -0400)]
Remove stray "typewriter" font.

7 years agoSpecial characters should be output to the TOC.
Richard Heck [Fri, 5 Aug 2016 01:09:32 +0000 (21:09 -0400)]
Special characters should be output to the TOC.

7 years agoFix bug #10320.
Richard Heck [Thu, 4 Aug 2016 21:45:10 +0000 (17:45 -0400)]
Fix bug #10320.

Layout::write needs to allow for the possility that the name of the
style may contain a space. It seems sufficient just always to quote it.

7 years agoLet InsetSpecialChar draw its background when necessary
Jean-Marc Lasgouttes [Thu, 4 Aug 2016 21:20:18 +0000 (23:20 +0200)]
Let InsetSpecialChar draw its background when necessary

This is the same fix as in 9940acc5 for auote inset and math macro template.

7 years agoPartially revert "Replace static with thread_local when used for caching"
Guillaume Munch [Thu, 4 Aug 2016 12:30:47 +0000 (13:30 +0100)]
Partially revert "Replace static with thread_local when used for caching"

As noticed by Stephan, clang on Mac is nowhere near to support thread_local for
some reason:
http://stackoverflow.com/questions/28094794/why-does-apple-clang-disallow-c11-thread-local-when-official-clang-supports

It does not look realistic to me to provide a configure-based alternative. The
solution is to not use thread_local until it is reasonably supported on
Mac. According to sources, this means requiring Xcode >= 8.

This reverts commit 82d4f1a446260333ef1590f3622196e7c76e414d partially.

7 years agoWhitespace
Juergen Spitzmueller [Thu, 4 Aug 2016 10:49:33 +0000 (12:49 +0200)]
Whitespace

7 years agoDocument file format change
Juergen Spitzmueller [Thu, 4 Aug 2016 10:41:11 +0000 (12:41 +0200)]
Document file format change

7 years agoInclude all [scr]article styles in beamer article layouts.
Juergen Spitzmueller [Thu, 4 Aug 2016 09:42:06 +0000 (11:42 +0200)]
Include all [scr]article styles in beamer article layouts.

File format change. On format reversion, we need to put some extra code
in the local layout that emulates the 2.3 behavior.
Simply Input'ing the respective layouts is unfortunately not enough,
due to the insertion order.

See #9977

7 years agoCorrect default font of beamer article layouts
Juergen Spitzmueller [Thu, 4 Aug 2016 08:27:10 +0000 (10:27 +0200)]
Correct default font of beamer article layouts

Fixes: #9977
7 years agoCorrect backends() allocation with japanese encoding
Juergen Spitzmueller [Thu, 4 Aug 2016 08:01:06 +0000 (10:01 +0200)]
Correct backends() allocation with japanese encoding

Fixes error introduced by ad9887da9c18.

7 years agoActivate LyX window after reverse search (#10196)
Scott Kostyshak [Thu, 4 Aug 2016 05:25:36 +0000 (01:25 -0400)]
Activate LyX window after reverse search (#10196)

"lyxclient -g" now calls the just implemented lyx-activate (see
previous commit) after server-goto-file-row. This allows the PDF
viewer to switch to LyX after executing a reverse search.

7 years agoNew LFUN lyx-activate to focus LyX window
Scott Kostyshak [Thu, 4 Aug 2016 05:20:14 +0000 (01:20 -0400)]
New LFUN lyx-activate to focus LyX window

On Linux and Mac OS, this action brings the LyX window into focus.
Such behavior is not allowed by Windows OS so instead the color of
the taskbar entry is changed to indicate that the window has changed
in some way.

The action is hidden in the shortcuts menu because it would make
sense to assign a shortcut to it. The only way to execute shortcut
would be if the LyX window is already activated.

lyx-activate will be used (see next commit) to allow the PDF viewer
to switch to LyX after executing a reverse search.

7 years agoRELEASE-NOTES: add the new LFUN branch-invert
Scott Kostyshak [Thu, 4 Aug 2016 05:44:04 +0000 (01:44 -0400)]
RELEASE-NOTES: add the new LFUN branch-invert

7 years agoFix embarrassing logic mistake
Guillaume Munch [Wed, 3 Aug 2016 21:11:00 +0000 (22:11 +0100)]
Fix embarrassing logic mistake

Thanks Richard for pointing at it.

7 years agode.po: fix meta data
Juergen Spitzmueller [Wed, 3 Aug 2016 12:57:57 +0000 (14:57 +0200)]
de.po: fix meta data

7 years agode.po: minor fixes
Juergen Spitzmueller [Wed, 3 Aug 2016 12:53:09 +0000 (14:53 +0200)]
de.po: minor fixes

7 years agoCmake build: Specify the correct value of 'PACKAGE' define in config.h
Kornel Benko [Wed, 3 Aug 2016 10:09:04 +0000 (12:09 +0200)]
Cmake build: Specify the correct value of 'PACKAGE' define in config.h

This was wrong in case where no program suffix was allowed
Spotted by Scott.

7 years agoFix problem noticed by Scott.
Richard Heck [Tue, 2 Aug 2016 22:54:31 +0000 (18:54 -0400)]
Fix problem noticed by Scott.

7 years agoNo need to display contents of the branch when it is open.
Richard Heck [Tue, 2 Aug 2016 20:33:18 +0000 (16:33 -0400)]
No need to display contents of the branch when it is open.

Thanks to Vincent for noticing.

7 years agode.po: update
Juergen Spitzmueller [Tue, 2 Aug 2016 11:20:50 +0000 (13:20 +0200)]
de.po: update

7 years agoReplace static with thread_local when used for caching
Guillaume Munch [Sat, 30 Jul 2016 23:42:51 +0000 (00:42 +0100)]
Replace static with thread_local when used for caching

thread_local is a per-thread static variable, so it is thread-safe and can be
used for caching purpose.

Remove the cache for parameter lists as discussed on the list
http://mid.gmane.org/6e871431-0e87-ed2a-3e31-b63356c2391e@lyx.org.

(requires gcc >= 4.8)

7 years agoFix aliasing logic for polylines
Guillaume Munch [Mon, 1 Aug 2016 19:50:46 +0000 (20:50 +0100)]
Fix aliasing logic for polylines

7 years agoEnable to specify the target format for converting the local layout
Guillaume Munch [Sat, 23 Jul 2016 14:29:40 +0000 (15:29 +0100)]
Enable to specify the target format for converting the local layout

* New constant LYXFILE_LAYOUT_FORMAT in src/TextClass.cpp. This determines the
  layout format corresponding to the current lyx file format.

* The Local Layout pane is changed so that the "Convert" button does not convert
  to the internal layout format but to the current lyx file format, to make sure
  that the file does not become unreadable with a specified earlier version of
  LyX.

* If LYXFILE_LAYOUT_FORMAT == LAYOUT_FORMAT then LyX behaves as before. This is
  the value defined in master.

7 years agoAdd an option to layout2layout to convert to a particular format
Guillaume Munch [Fri, 22 Jul 2016 19:52:29 +0000 (20:52 +0100)]
Add an option to layout2layout to convert to a particular format

7 years agoPerf comments: getFormatFromFile slows LyX startup considerably
Guillaume Munch [Thu, 28 Jul 2016 15:52:14 +0000 (16:52 +0100)]
Perf comments: getFormatFromFile slows LyX startup considerably

It is currently called on hundreds of files: settings, layouts, icons, cached
graphics files (incl. graphics from files that are not opened on startup).

According to callgrind, fixing the FIXME comments could speed up startup by more
than 30%.

7 years agoUse call_once to ensure something is only called once
Guillaume Munch [Sat, 30 Jul 2016 19:46:29 +0000 (20:46 +0100)]
Use call_once to ensure something is only called once

This is thread-safe.

7 years agoMake static counters atomic
Guillaume Munch [Sun, 10 Jul 2016 15:50:19 +0000 (16:50 +0100)]
Make static counters atomic

This ensures thread-safety

(requires: gcc >= 4.6, MSVC >= 2015)

7 years agoC++11 supports thread-safe initialization of statics
Guillaume Munch [Sat, 30 Jul 2016 19:28:44 +0000 (20:28 +0100)]
C++11 supports thread-safe initialization of statics

A static local variable is guaranteed to be initialized only once, and in time.

Lambda expressions can be used to perform complex initialization of those static
variables on the spot.

(starting from: gcc >= 4.8, msvc >= 2015)

7 years agoFix "scroll here" feature of scrollbar (#10311)
Guillaume Munch [Fri, 29 Jul 2016 20:27:13 +0000 (21:27 +0100)]
Fix "scroll here" feature of scrollbar (#10311)

Prevent setRange() from causing a recursive call to scrollTo(). Reduces three
calls of scrollTo() to one call for all scrolling functions of the scroll bar
(e.g. clicking on the arrow, dragging, or clicking somewhere on the scrollbar).

7 years agoBasic implementation of QSignalBlocker for qt4
Guillaume Munch [Fri, 29 Jul 2016 20:18:43 +0000 (21:18 +0100)]
Basic implementation of QSignalBlocker for qt4

7 years agoFix typo in new dia converter.
Richard Heck [Sun, 31 Jul 2016 16:46:12 +0000 (12:46 -0400)]
Fix typo in new dia converter.

7 years agoCustomization.lyx: port recent changes to master
Uwe Stöhr [Sun, 31 Jul 2016 08:43:00 +0000 (10:43 +0200)]
Customization.lyx: port recent changes to master

7 years agoCustomization.lyx: accept Richards changes
Uwe Stöhr [Sun, 31 Jul 2016 08:37:28 +0000 (10:37 +0200)]
Customization.lyx: accept Richards changes

Richard, please do everything that does not depend on LyX 2.3 this in the 2.2.x branch. Also don't upgrade the fileformat if not necessary.

7 years agoFix output of floats, etc, inside environments.
Richard Heck [Sun, 31 Jul 2016 07:18:32 +0000 (03:18 -0400)]
Fix output of floats, etc, inside environments.

Fixes bug #9094.

7 years agoRename, for a little clarity.
Richard Heck [Sun, 31 Jul 2016 07:03:26 +0000 (03:03 -0400)]
Rename, for a little clarity.

7 years agoAdd 'dir="auto"' to the body tag for XHTML export. This should take
Richard Heck [Sun, 31 Jul 2016 06:52:30 +0000 (02:52 -0400)]
Add 'dir="auto"' to the body tag for XHTML export. This should take
care of much of what we need to do for RTL languages. It does not
take care of inline language changes, probably.

7 years agoAlignment
Richard Heck [Sun, 31 Jul 2016 06:49:38 +0000 (02:49 -0400)]
Alignment

7 years agoFix display of code listings in XHTML.
Richard Heck [Sun, 31 Jul 2016 05:47:30 +0000 (01:47 -0400)]
Fix display of code listings in XHTML.

Fixes bug #8362.

7 years agoEnable export of spreadsheets with XHTML.
Richard Heck [Sun, 31 Jul 2016 05:20:16 +0000 (01:20 -0400)]
Enable export of spreadsheets with XHTML.

7 years agoDummy export for spreadsheets: plaintext and DocBook.
Richard Heck [Sun, 31 Jul 2016 04:53:12 +0000 (00:53 -0400)]
Dummy export for spreadsheets: plaintext and DocBook.

7 years agoExport external raster graphics as png for XHTML.
Richard Heck [Sun, 31 Jul 2016 04:41:23 +0000 (00:41 -0400)]
Export external raster graphics as png for XHTML.

7 years agoExport external vector graphics as svg for XHTML.
Richard Heck [Sun, 31 Jul 2016 04:40:16 +0000 (00:40 -0400)]
Export external vector graphics as svg for XHTML.

7 years agoEnable SVG export of XFig figures for XHTML.
Richard Heck [Sun, 31 Jul 2016 04:28:37 +0000 (00:28 -0400)]
Enable SVG export of XFig figures for XHTML.

7 years agoActivate export of chess diagrams for XHTML.
Richard Heck [Sun, 31 Jul 2016 03:17:15 +0000 (23:17 -0400)]
Activate export of chess diagrams for XHTML.

7 years agoEnable XHTML export of LilyPond files.
Richard Heck [Sun, 31 Jul 2016 04:36:46 +0000 (00:36 -0400)]
Enable  XHTML export of LilyPond files.

7 years agoAllow XHTML export of Dia diagrams.
Richard Heck [Sun, 31 Jul 2016 04:52:22 +0000 (00:52 -0400)]
Allow XHTML export of Dia diagrams.

7 years agoActivate export of external material for XHTML.
Richard Heck [Sun, 31 Jul 2016 02:42:01 +0000 (22:42 -0400)]
Activate export of external material for XHTML.

As of this commit, this is ineffective, since no changes have been
made to external_templates.

7 years agoFix some wrongly converted "LaTeX" logos.
Richard Heck [Sun, 31 Jul 2016 04:37:50 +0000 (00:37 -0400)]
Fix some wrongly converted "LaTeX" logos.

7 years agoFix substitution for $$Contents.
Richard Heck [Sun, 31 Jul 2016 04:15:48 +0000 (00:15 -0400)]
Fix substitution for $$Contents.

The second argument here is the length of the string to replace,
not the position of the final character.

7 years agowhitespace
Richard Heck [Sun, 31 Jul 2016 04:15:42 +0000 (00:15 -0400)]
whitespace

7 years agoFix preview of external material with plaintext and DocBook.
Richard Heck [Sun, 31 Jul 2016 03:48:27 +0000 (23:48 -0400)]
Fix preview of external material with plaintext and DocBook.

7 years agoFix indentation of fen2ascii script so it will run.
Richard Heck [Sun, 31 Jul 2016 03:17:30 +0000 (23:17 -0400)]
Fix indentation of fen2ascii script so it will run.

7 years agoUse scaling factor in XHTML output.
Richard Heck [Sun, 31 Jul 2016 01:57:52 +0000 (21:57 -0400)]
Use scaling factor in XHTML output.

7 years agoIf we cannot find the input format for a graphic, we cannot convert it.
Richard Heck [Sun, 31 Jul 2016 01:51:25 +0000 (21:51 -0400)]
If we cannot find the input format for a graphic, we cannot convert it.

Also includes some minor code cleanup.

7 years agoFix some symbols that are displayed incorrectly in MathML export.
Richard Heck [Sun, 31 Jul 2016 01:08:06 +0000 (21:08 -0400)]
Fix some symbols that are displayed incorrectly in MathML export.

7 years agoFix output of table borders for XHTML. Fixes bug #10154.
Richard Heck [Sat, 30 Jul 2016 23:41:51 +0000 (19:41 -0400)]
Fix output of table borders for XHTML. Fixes bug #10154.

7 years agoRevert most of dd7863b6.
Richard Heck [Sat, 30 Jul 2016 05:42:08 +0000 (01:42 -0400)]
Revert most of dd7863b6.

I did not mean to commit the caption-related stuff.

7 years agoWhitespace.
Richard Heck [Sat, 30 Jul 2016 05:35:22 +0000 (01:35 -0400)]
Whitespace.

7 years agoFix thinko from earlier commit.
Richard Heck [Sat, 30 Jul 2016 05:29:06 +0000 (01:29 -0400)]
Fix thinko from earlier commit.

We need to output the deferred material AFTER the paragraph is closed.

7 years agoFix HTML display of math matrices.
Richard Heck [Sat, 30 Jul 2016 04:25:09 +0000 (00:25 -0400)]
Fix HTML display of math matrices.

7 years agoFix CSS for math cases.
Richard Heck [Sat, 30 Jul 2016 04:15:33 +0000 (00:15 -0400)]
Fix CSS for math cases.

Fixes bug #8755.

7 years agoSimplify CSS classes for floats.
Richard Heck [Sat, 30 Jul 2016 04:03:35 +0000 (00:03 -0400)]
Simplify CSS classes for floats.

Fixes bug #8605 and probably parts of #8755 and #9328.

7 years agoBe more careful with braces, due to comments.
Richard Heck [Sat, 30 Jul 2016 03:59:24 +0000 (23:59 -0400)]
Be more careful with braces, due to comments.

7 years agoSimplify and unify code for special handling in argument insets.
Richard Heck [Sat, 30 Jul 2016 03:38:51 +0000 (23:38 -0400)]
Simplify and unify code for special handling in argument insets.

7 years agoFix display of colors in labels of arguments.
Richard Heck [Sat, 30 Jul 2016 03:36:48 +0000 (23:36 -0400)]
Fix display of colors in labels of arguments.

We need to handle this specially, just as we do the main font.

7 years agoFix display of branch buttons and tooltips.
Richard Heck [Sat, 30 Jul 2016 02:58:03 +0000 (22:58 -0400)]
Fix display of branch buttons and tooltips.

7 years agoUpdate sk.po
Kornel Benko [Fri, 29 Jul 2016 18:25:22 +0000 (20:25 +0200)]
Update sk.po

7 years agoRemove the now unused lyx::support::expandPath()
Scott Kostyshak [Fri, 29 Jul 2016 17:15:41 +0000 (13:15 -0400)]
Remove the now unused lyx::support::expandPath()

The function is no longer used in LyX's sources (as of the previous
comit, 9b64d7bd) and is thus removed with this commit. Perhaps the
advantage this function had over other path functions we have has
disappeared over time (see e.g. 1a7b7f65).

7 years agoRel. path in paths prefs preserved as rel. paths
Scott Kostyshak [Fri, 29 Jul 2016 17:13:55 +0000 (13:13 -0400)]
Rel. path in paths prefs preserved as rel. paths

Before this commit, in the paths preferences tab if you put a
relative path, LyX would convert it behind the scenes to an absolute
path by evaluating the relative path with respect to the working
directory of the LyX instance where the preference change is taking
place. This seems confusing because (1) it is done behind the scenes
(after the preferences dialog is closed) and (2) if the user chooses
to enter a relative path, the safest thing to do is to preserve it
as a relative path, instead of making the assumption that the user
intended for it to be expanded to an absolute path.

An explanation of how relative paths are handled is given at the
bottom of the paths tab. Note that the height/width of the
preferences window is not changed as a result of adding this
explanatory comment because the height of the preferences dialog is
already stretched by other tabs.

This commit improves consistency in the sense that the behavior of
LyX is now the same when a relative path is specified in the
preferences dialog as when it is manually specified in the
preferences file. Before, if the preferences file were manually
edited and a relative path were inserted, the next time the user
made a change to preferences with the GUI (even if the preference
change was a different preference, e.g. instant preview), the
relative path would be silently converted to an absolute path,
evaluated with respect to the working directory of that instance.

Beyond improving clarity and consistency (IMO), this commit allows
for a new feature to be implemented of using relative paths in the
paths preferences. For example, the user may now enter '.' as the
"Working directory" path and now whenever they start LyX from a
directory and create a new file, the default location of the file
will be the directory from which they started LyX, instead of the
user's home directory which is LyX's default and is less intuitive.

No prefs2prefs work is needed because if a relative path were
entered in the preferences dialog before this commit, it was
converted to an absolute path before being stored in preferences. If
a relative path were specified by manually editing the preferences
file, then (unless the path were already automatically converted to
an absolute path by a GUI preferences change, as described above)
the behavior will be the same (the path will be treated as a
relative path).

For related discussion, see the lyx-devel thread here:
https://www.mail-archive.com/search?l=mid&q=20160616003010.bnymtcouar7g55ti%40cotopaxi

This commit removes the last use of lyx::support::expandPath() in
LyX's sources.

7 years agoConst a function parameter
Scott Kostyshak [Fri, 29 Jul 2016 17:07:00 +0000 (13:07 -0400)]
Const a function parameter

7 years agoImprove implementation of TabWorkArea::posIsTab()
Scott Kostyshak [Fri, 29 Jul 2016 17:06:49 +0000 (13:06 -0400)]
Improve implementation of TabWorkArea::posIsTab()

The Qt documentation states that tabAt() returns -1 if the position
is not over a tab. This behavior has been consistent since Qt 4.3
[1]. This commit's improvement likely makes the code faster in two
ways:

(1) we do not need to loop through potentially all tabs
(2) we only need to look up the tab index corresponding with one
position

posIsTab() is not currently used intensively so no practical gain in
speed is achieved, but it protects against future use.

[1] https://doc.qt.io/archives/4.3/qtabbar.html#tabAt

7 years agoTypo
Kornel Benko [Wed, 27 Jul 2016 05:58:56 +0000 (07:58 +0200)]
Typo

7 years agoCmake build: Make missing polib less destructive.
Kornel Benko [Wed, 27 Jul 2016 05:34:50 +0000 (07:34 +0200)]
Cmake build: Make missing polib less destructive.

Configure still whines, but proceeds succesfull.
Only the target 'layouttranslations1' will fail.

7 years agowin installer: port recent changes from branch
Uwe Stöhr [Tue, 26 Jul 2016 21:41:23 +0000 (23:41 +0200)]
win installer: port recent changes from branch

7 years agoCmake build: Added check for pythons polib module
Kornel Benko [Sun, 24 Jul 2016 09:20:08 +0000 (11:20 +0200)]
Cmake build: Added check for pythons polib module

Idea stolen from http://public.kitware.com/pipermail/cmake/2011-January/041666.html

7 years agoAdd comment + factor out the error checking
Kornel Benko [Sun, 24 Jul 2016 07:30:14 +0000 (09:30 +0200)]
Add comment + factor out the error checking

7 years agoDocument closing a tab with middle-click
Scott Kostyshak [Sun, 24 Jul 2016 05:37:33 +0000 (01:37 -0400)]
Document closing a tab with middle-click

This commit documents the feature introduced at 4803c769, which
fixed #10288.

The User Guide already has a section on closing tabs, so this fits
in well.

7 years agoCmake build: Make sure that a sequence of commands to recreate layouttranslations...
Kornel Benko [Sat, 23 Jul 2016 18:30:45 +0000 (20:30 +0200)]
Cmake build: Make sure that a sequence of commands to recreate layouttranslations failes

Factored out the sequence into one cmake-script.
Previously it could happen that the python script failed, but the following
command was successfull and so the error was hidden.

7 years agoFix hang reported at #10307.
Richard Heck [Sat, 23 Jul 2016 17:42:54 +0000 (13:42 -0400)]
Fix hang reported at #10307.

Also, add a FIXME explaining what we'd need to do to fix the
convert_TeX_brace_to_Argument routine properly.

7 years agoClose a tab on middle-click (#10288)
Scott Kostyshak [Wed, 13 Jul 2016 06:42:35 +0000 (02:42 -0400)]
Close a tab on middle-click (#10288)

This is the default behavior of Chromium and Firefox. The main
appeal is that instead of having to precisely click on the 'x' to
close a tab, one can more easily middle-click anywhere in the tab.

The tab is closed if the middle button is pressed on a tab and is
relased on the same tab. After pressing, the user may move the mouse
over other tabs but as long as they move it back to the tab where
they initiated the press before they release, the close will
execute. This is how the feature works in Chromium and Firefox.

Nothing is done if the user middle-clicks on the blank part of the
tab bar. This is consistent with Chromium. Firefox, on the other
hand, opens a new tab. In LyX one can already double-click the blank
part to open a new tab, and in feedback from lyx-users [1] most
expected and desired that nothing be done in this case.

[1] https://www.mail-archive.com/search?l=mid&q=20160720063306.6fyarf3kywexbxvd%40steph

7 years agoFactor out useful code into a function
Scott Kostyshak [Thu, 21 Jul 2016 23:16:19 +0000 (19:16 -0400)]
Factor out useful code into a function

This code will be shared by TabWorkArea::mouseReleaseEvent,
which will be implemented shortly.