[LyX/master] Arabic UserGuide.lyx: update from Hatim

2018-03-19 Thread Uwe Stöhr
commit e8678bc6060fd88c74bac15eda22118f96264c6f
Author: Uwe Stöhr 
Date:   Tue Mar 20 03:32:13 2018 +0100

Arabic UserGuide.lyx: update from Hatim

 lib/doc/ar/UserGuide.lyx | 3845 --
 1 files changed, 1004 insertions(+), 2841 deletions(-)


[LyX/master] Fix problem with conversion of stmary10.lyx.

2018-03-19 Thread Richard Kimberly Heck
commit 5912f25f461cb520bed67cc62402e92a45abb07c
Author: Richard Kimberly Heck 
Date:   Mon Mar 19 18:42:46 2018 -0400

Fix problem with conversion of stmary10.lyx.
---
 lib/fonts/test/stmary10.lyx |   16 +++-
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/lib/fonts/test/stmary10.lyx b/lib/fonts/test/stmary10.lyx
index c896672..b86fa3e 100644
--- a/lib/fonts/test/stmary10.lyx
+++ b/lib/fonts/test/stmary10.lyx
@@ -1,5 +1,5 @@
-#LyX 2.2 created this file. For more info see http://www.lyx.org/
-\lyxformat 504
+#LyX 2.3 created this file. For more info see http://www.lyx.org/
+\lyxformat 544
 \begin_document
 \begin_header
 \save_transient_properties true
@@ -22,8 +22,10 @@
 \use_non_tex_fonts false
 \font_sc false
 \font_osf false
-\font_sf_scale 100
-\font_tt_scale 100
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\use_microtype false
+\use_dash_ligatures true
 \graphics default
 \default_output_format default
 \output_sync 0
@@ -53,6 +55,7 @@
 \suppress_date false
 \justification true
 \use_refstyle 0
+\use_minted 0
 \index Index
 \shortcut idx
 \color #008000
@@ -61,7 +64,10 @@
 \tocdepth 3
 \paragraph_separation indent
 \paragraph_indentation default
-\quotes_language english
+\is_math_indent 0
+\math_numbering_side default
+\quotes_style english
+\dynamic_quotes 0
 \papercolumns 1
 \papersides 1
 \paperpagestyle default


[LyX/2.3.x] Fix problem with conversion of stmary10.lyx.

2018-03-19 Thread Richard Kimberly Heck
commit 0209f2faffcf2626d5ca36ed844e1af8789ebf4f
Author: Richard Kimberly Heck 
Date:   Mon Mar 19 18:42:46 2018 -0400

Fix problem with conversion of stmary10.lyx.
---
 lib/fonts/test/stmary10.lyx |   16 +++-
 status.23x  |3 +++
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/lib/fonts/test/stmary10.lyx b/lib/fonts/test/stmary10.lyx
index c896672..b86fa3e 100644
--- a/lib/fonts/test/stmary10.lyx
+++ b/lib/fonts/test/stmary10.lyx
@@ -1,5 +1,5 @@
-#LyX 2.2 created this file. For more info see http://www.lyx.org/
-\lyxformat 504
+#LyX 2.3 created this file. For more info see http://www.lyx.org/
+\lyxformat 544
 \begin_document
 \begin_header
 \save_transient_properties true
@@ -22,8 +22,10 @@
 \use_non_tex_fonts false
 \font_sc false
 \font_osf false
-\font_sf_scale 100
-\font_tt_scale 100
+\font_sf_scale 100 100
+\font_tt_scale 100 100
+\use_microtype false
+\use_dash_ligatures true
 \graphics default
 \default_output_format default
 \output_sync 0
@@ -53,6 +55,7 @@
 \suppress_date false
 \justification true
 \use_refstyle 0
+\use_minted 0
 \index Index
 \shortcut idx
 \color #008000
@@ -61,7 +64,10 @@
 \tocdepth 3
 \paragraph_separation indent
 \paragraph_indentation default
-\quotes_language english
+\is_math_indent 0
+\math_numbering_side default
+\quotes_style english
+\dynamic_quotes 0
 \papercolumns 1
 \papersides 1
 \paperpagestyle default
diff --git a/status.23x b/status.23x
index 1a4b409..888abe8 100644
--- a/status.23x
+++ b/status.23x
@@ -84,6 +84,9 @@ What's new
 
 * DOCUMENTATION AND LOCALIZATION
 
+- Fix old problem with lib/fonts/test/stmary10.lyx, and update that file
+  to current format.
+
 
 * LYXHTML
 


[LyX/2.3.2-staging] Some improvements to the graphics dialog

2018-03-19 Thread Juergen Spitzmueller
commit d9314d15dc427b9baa2f17fd744c67a279f99aac
Author: Juergen Spitzmueller 
Date:   Fri Oct 13 11:25:55 2017 +0200

Some improvements to the graphics dialog

* Describe the viewport/bb situation more accurate
* Use generic term "coordinates", since bb and viewport are flavor-specific
* Add some tooltips
* Increase the width of the options widget.

(cherry picked from commit c462fadff57373744e27ac38df04bac2c651b67c)
---
 src/frontends/qt4/ui/GraphicsUi.ui |  682 +++
 status.23x |2 +
 2 files changed, 372 insertions(+), 312 deletions(-)

diff --git a/src/frontends/qt4/ui/GraphicsUi.ui 
b/src/frontends/qt4/ui/GraphicsUi.ui
index 3942651..83d0d09 100644
--- a/src/frontends/qt4/ui/GraphicsUi.ui
+++ b/src/frontends/qt4/ui/GraphicsUi.ui
@@ -1,109 +1,133 @@
-
+
+
  GraphicsUi
- 
-  
+ 
+  

 0
 0
-482
-383
+654
+512

   
-  
-   
-0
-0
+  
+   
 0
 0

   
-  
+  

   
-  
+  
true
   
-  
-   
+  
+   
 9

-   
+   
+9
+   
+   
+9
+   
+   
+9
+   
+   
 6

-   
-
- 
+   
+
+ 
   
  
- 
+ 
   0
  
- 
-  
+ 
+  
Graphics
   
-  
-   
+  
+   
+9
+   
+   
+9
+   
+   
+9
+   
+   
 9

-   
+   
 6

-   
-
- 
+   
+
+ 
   Select an image file
  
- 
+ 
   Browse...
  
 

-   
-
- 
+   
+
+ 
   Output Size
  
- 
+ 
   true
  
- 
-  
+ 
+  
+   9
+  
+  
+   9
+  
+  
+   9
+  
+  
9
   
-  
+  
6
   
-  
-   
+  
+   
   
-  
-   
+  
+   
   
-  
-   
-
+  
+   
+
  true
 
-
- 
-  0
-  0
+
+ 
   0
   0
  
 
-
+
  Width of image in output
 

   
-  
+  

-
+
  Qt::Horizontal
 
-
+
  
   61
   20
@@ -111,69 +135,67 @@
 

   
-  
-   
+  
+   
   
-  
-   
-
+  
+   
+
  true
 
-
- 
-  0
-  0
+
+ 
   0
   0
  
 
-
+
  Height of image in output
 

   
-  
-   
-
+  
+   
+
  true
 
-
+
  Sets height of graphic. Leave unchecked to set 
automatically.
 
-
+
  Set height:
 

   
-  
-   
-
+  
+   
+
  Scale graphics (%):
 

   
-  
-   
-
+  
+   
+
  true
 
-
+
  Sets width of graphic. Leave unchecked to set 
automatically.
 
-
+
  Set width:
 

   
-  
-   
-
+  
+   
+
  true
 
-
+
  Scale image to maximum size not exceeding width and 
height
 
-
+
  Maintain aspect ratio
 

@@ -181,75 +203,82 @@
  
 

-   
-
- 
+   
+
+ 
   Rotate Graphics
  
- 
+ 
   true
  
- 
-  
+ 
+  
9
   
-  
+  
+   9
+  
+  
+   9
+  
+  
+   9
+  
+  
6
   
-  
-   
-
+  
+   
+
  Check to change the order of rotating and scaling
 
-
+
  Rotate after scaling
 
   

[LyX/2.3.x] Add support for enchant 2.x

2018-03-19 Thread Juergen Spitzmueller
commit b3cca8086d2fafad1aeea2cdfb6639100952b3c5
Author: Jean-Marc Lasgouttes 
Date:   Wed Jan 24 16:19:34 2018 +0100

Add support for enchant 2.x

As of enchant 2.x, it is required to create a Broker instance instead
of relying on a static one provided by the library.

Add autoconf and cmake (courtesy of Kornel) tests that check whether
one can indeed instantiate a Broker object, and act on the result in a
new broker() helper function.

Fixes bug #10986.

(cherry picked from commit 63a4e82874fddcec00a1733c14ad4525d155f19f)
---
 config/spell.m4 |   37 +-
 development/cmake/ConfigureChecks.cmake |   18 +++
 development/cmake/config.h.cmake|3 ++
 src/EnchantChecker.cpp  |   17 +++---
 4 files changed, 60 insertions(+), 15 deletions(-)

diff --git a/config/spell.m4 b/config/spell.m4
index a15f9f6..f494da8 100644
--- a/config/spell.m4
+++ b/config/spell.m4
@@ -23,7 +23,21 @@ AC_DEFUN([CHECK_WITH_ASPELL],
fi
])
 
-# Macro to add for using enchant spellchecker libraries! -*- sh -*-
+AC_DEFUN([LYX_HAVE_ENCHANT2],
+[
+  AC_MSG_CHECKING([whether enchant is version 2.x at least])
+  save_CXXFLAGS=$CXXFLAGS
+  CXXFLAGS="$ENCHANT_CFLAGS $AM_CXXFLAGS $CXXFLAGS"
+
+  AC_TRY_COMPILE([#include ],
+  [enchant::Broker broker;],
+  [AC_MSG_RESULT(yes)
+   AC_DEFINE(HAVE_ENCHANT2, 1, [Define to 1 if enchant 2.x is detected])
+  ],
+  [AC_MSG_RESULT(no)])
+  CXXFLAGS=$save_CXXFLAGS
+])
+
 AC_DEFUN([CHECK_WITH_ENCHANT],
 [
lyx_use_enchant=true
@@ -31,16 +45,17 @@ AC_DEFUN([CHECK_WITH_ENCHANT],
test "$with_enchant" = "no" && lyx_use_enchant=false
 
if $lyx_use_enchant; then
-   PKG_CHECK_MODULES([ENCHANT], [enchant], [], [lyx_use_enchant=false])
-   AC_MSG_CHECKING([whether to use enchant])
-   if $lyx_use_enchant ; then
-   AC_MSG_RESULT(yes)
-   AC_DEFINE(USE_ENCHANT, 1, [Define as 1 to use the enchant library])
-   lyx_flags="$lyx_flags use-enchant"
-   else
-   AC_MSG_RESULT(no)
-   fi
-fi
+   PKG_CHECK_MODULES([ENCHANT], [enchant], [], 
[lyx_use_enchant=false])
+   AC_MSG_CHECKING([whether to use enchant])
+   if $lyx_use_enchant ; then
+   AC_MSG_RESULT(yes)
+   AC_DEFINE(USE_ENCHANT, 1, [Define as 1 to use the enchant 
library])
+   LYX_HAVE_ENCHANT2
+   lyx_flags="$lyx_flags use-enchant"
+   else
+   AC_MSG_RESULT(no)
+   fi
+   fi
 ])
 
 # Macro to add for using hunspell spellchecker libraries! -*- sh -*-
diff --git a/development/cmake/ConfigureChecks.cmake 
b/development/cmake/ConfigureChecks.cmake
index f09ba8b..d2695b0 100644
--- a/development/cmake/ConfigureChecks.cmake
+++ b/development/cmake/ConfigureChecks.cmake
@@ -195,6 +195,24 @@ check_cxx_source_compiles(
   "
 LYX_USE_STD_CALL_ONCE)
 
+if (ENCHANT_FOUND)
+  set(CMAKE_REQUIRED_INCLUDES ${ENCHANT_INCLUDE_DIR})
+  set(CMAKE_REQUIRED_LIBRARIES ${ENCHANT_LIBRARY})
+  # Check, whether enchant is version 2.x at least
+  check_cxx_source_compiles(
+"
+#include 
+enchant::Broker broker;
+int main() {
+  return(0);
+}
+"
+  HAVE_ENCHANT2)
+  if (HAVE_ENCHANT2)
+message(STATUS "ENCHANT2 found")
+  endif()
+endif()
+
 set(USE_LLVM_LIBCPP)
 set(STD_STRING_USES_COW)
 set(USE_GLIBCXX_CXX11_ABI)
diff --git a/development/cmake/config.h.cmake b/development/cmake/config.h.cmake
index 7fac0b0..fd08c45 100644
--- a/development/cmake/config.h.cmake
+++ b/development/cmake/config.h.cmake
@@ -88,6 +88,9 @@ ${Include_used_spellchecker}
 // Define to 1 if std::call_once is supported by the compiler
 #cmakedefine LYX_USE_STD_CALL_ONCE 1
 
+// Define to 1 if enchant is version 2.x at least
+#cmakedefine HAVE_ENCHANT2 1
+
 #endif // config.h guard
 
 #define MYTHES_H_LOCATION <${MYTHES_DIR}/mythes.hxx>
diff --git a/src/EnchantChecker.cpp b/src/EnchantChecker.cpp
index 5ef399a..47eb35e 100644
--- a/src/EnchantChecker.cpp
+++ b/src/EnchantChecker.cpp
@@ -30,6 +30,17 @@ namespace lyx {
 
 namespace {
 
+enchant::Broker & broker()
+{
+#ifdef HAVE_ENCHANT2
+   static enchant::Broker thebroker;
+   return thebroker;
+#else
+   return *enchant::Broker::instance();
+#endif
+}
+
+
 struct Speller {
enchant::Dict * speller;
 };
@@ -68,12 +79,11 @@ EnchantChecker::Private::~Private()
 
 enchant::Dict * EnchantChecker::Private::addSpeller(string const & lang)
 {
-   enchant::Broker * instance = enchant::Broker::instance();
Speller m;
 
try {
LYXERR(Debug::FILES, "request enchant speller for language " << 
lang);
-   m.speller = instance->request_dict(lang);
+   m.speller = broker().request_dict(lang);
}
catch 

[LyX/2.3.x] Change lookup order for enchant-2 vs. enchant (prefer the former)

2018-03-19 Thread Juergen Spitzmueller
commit 27a871499f304832dcb5da55ae7954cb229ff862
Author: Juergen Spitzmueller 
Date:   Mon Mar 19 09:56:53 2018 +0100

Change lookup order for enchant-2 vs. enchant (prefer the former)

(cherry picked from commit 1ae537c5437d0f1abbf877e40a09ad59385f621b)
---
 config/spell.m4 |4 ++--
 status.23x  |2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/config/spell.m4 b/config/spell.m4
index 5bf36fc..2a03026 100644
--- a/config/spell.m4
+++ b/config/spell.m4
@@ -45,8 +45,8 @@ AC_DEFUN([CHECK_WITH_ENCHANT],
test "$with_enchant" = "no" && lyx_use_enchant=false
 
if $lyx_use_enchant; then
-   PKG_CHECK_MODULES([ENCHANT], [enchant], [],
-   [PKG_CHECK_MODULES([ENCHANT], [enchant-2], [],
+   PKG_CHECK_MODULES([ENCHANT], [enchant-2], [],
+   [PKG_CHECK_MODULES([ENCHANT], [enchant], [],
[lyx_use_enchant=false])])
AC_MSG_CHECKING([whether to use enchant])
if $lyx_use_enchant ; then
diff --git a/status.23x b/status.23x
index 126e5c1..1a4b409 100644
--- a/status.23x
+++ b/status.23x
@@ -29,6 +29,8 @@ What's new
 
 * BUILD/INSTALLATION
 
+- Add support for v.2 of the enchant spell checker (bug 10986).
+
 
 
 ** Bug fixes:


[LyX/2.3.x] check for enchant-2

2018-03-19 Thread Juergen Spitzmueller
commit 2d647cb0e66c10cb1bd620ee7272c271d2e419f3
Author: Juergen Spitzmueller 
Date:   Mon Mar 19 09:03:35 2018 +0100

check for enchant-2

Fixes rest of #10986

(cherry picked from commit 71977769ec5168eda6f49697b570bbd1dd6991d8)
---
 config/spell.m4 |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/config/spell.m4 b/config/spell.m4
index f494da8..5bf36fc 100644
--- a/config/spell.m4
+++ b/config/spell.m4
@@ -45,7 +45,9 @@ AC_DEFUN([CHECK_WITH_ENCHANT],
test "$with_enchant" = "no" && lyx_use_enchant=false
 
if $lyx_use_enchant; then
-   PKG_CHECK_MODULES([ENCHANT], [enchant], [], 
[lyx_use_enchant=false])
+   PKG_CHECK_MODULES([ENCHANT], [enchant], [],
+   [PKG_CHECK_MODULES([ENCHANT], [enchant-2], [],
+   [lyx_use_enchant=false])])
AC_MSG_CHECKING([whether to use enchant])
if $lyx_use_enchant ; then
AC_MSG_RESULT(yes)


[LyX/2.3.x] Fix default spellchecker when only Enchant is available

2018-03-19 Thread Jean-Marc Lasgouttes
commit 0ddb1435c910b76c7939ee8c9d8273c7d36718b8
Author: Jean-Marc Lasgouttes 
Date:   Mon Mar 19 14:07:03 2018 +0100

Fix default spellchecker when only Enchant is available

This has been annoying me for ages.

(cherry picked from commit ae473b012a9c7605919f3f3bfad35710cab29566)
---
 src/LyXRC.cpp |2 ++
 status.23x|6 +-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp
index 7cfa2a3..104dcfb 100644
--- a/src/LyXRC.cpp
+++ b/src/LyXRC.cpp
@@ -283,6 +283,8 @@ void LyXRC::setDefaults()
 // FIXME: this check should test the target platform (darwin)
 #if defined(USE_MACOSX_PACKAGING)
spellchecker = "native";
+#elif defined(USE_ENCHANT)
+   spellchecker = "enchant";
 #elif defined(USE_ASPELL)
spellchecker = "aspell";
 #elif defined(USE_HUNSPELL)
diff --git a/status.23x b/status.23x
index d1728d6..126e5c1 100644
--- a/status.23x
+++ b/status.23x
@@ -68,7 +68,11 @@ What's new
 
 - Fix list of viewable formats in view/update menu (bug 11044).
 
-- Fix encoding problems with listings insets and non-TeX fonts (bug 11056).
+- Fix encoding problems with listings insets and non-TeX fonts (bug
+  11056).
+
+- When only Enchant is configured as a spell checker, configure it
+  properly as default.
 
 
 * INTERNALS


[LyX/2.3.x] Update to accept automake 1.16

2018-03-19 Thread Jean-Marc Lasgouttes
commit 3abfd72b2720c21eba51bb2338f0b8b835dae720
Author: Joel A. Kulesza 
Date:   Sun Mar 18 17:43:25 2018 -0600

Update to accept automake 1.16

(cherry picked from commit 61db4af82dfd8c24bb3099160274bf6c6d4e7cce)
---
 INSTALL|2 +-
 autogen.sh |4 ++--
 status.23x |2 ++
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/INSTALL b/INSTALL
index 592c542..c18d140 100644
--- a/INSTALL
+++ b/INSTALL
@@ -37,7 +37,7 @@ Note for Git checkouts
 -
 
 If you have checked this out from Git, you need to have:
-* automake (supported versions are 1.14--1.15)
+* automake (supported versions are 1.14--1.16)
 * autoconf (supported versions are 2.65--2.69)
 Then type "./autogen.sh" to build the needed configuration
 files and proceed as stated above/below.
diff --git a/autogen.sh b/autogen.sh
index 2cacc5c..54f57ae 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -16,11 +16,11 @@ test "$automake_version" != "" && {
 }
 
 case $automake_version in
-*' '1.1[45]*)
+*' '1.1[456]*)
;;
 *)
echo "This automake version is not supported by LyX."
-   echo "LyX only supports automake 1.14 to 1.15."
+   echo "LyX only supports automake 1.14 through 1.16."
exit 1
;;
 esac
diff --git a/status.23x b/status.23x
index eb02564..d1728d6 100644
--- a/status.23x
+++ b/status.23x
@@ -95,3 +95,5 @@ What's new
 
 
 * BUILD/INSTALLATION
+
+- Add support for automake 1.16.


[LyX/master] Fix initialzation order in FuncRequest

2018-03-19 Thread Jean-Marc Lasgouttes
commit c2456ae609d6cdb2bff02c378b545a07dee2e8f0
Author: Jean-Marc Lasgouttes 
Date:   Mon Mar 19 14:59:43 2018 +0100

Fix initialzation order in FuncRequest

Fixes bug #11080.
---
 src/FuncRequest.cpp |   27 ++-
 1 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/src/FuncRequest.cpp b/src/FuncRequest.cpp
index ef357ee..88cd8af 100644
--- a/src/FuncRequest.cpp
+++ b/src/FuncRequest.cpp
@@ -30,40 +30,41 @@ FuncRequest const FuncRequest::unknown(LFUN_UNKNOWN_ACTION);
 FuncRequest const FuncRequest::noaction(LFUN_NOACTION);
 
 FuncRequest::FuncRequest(Origin o)
-   : action_(LFUN_NOACTION), origin_(o), x_(0), y_(0),
- button_(mouse_button::none), modifier_(NoModifier), view_origin_(0)
+   : action_(LFUN_NOACTION), origin_(o), view_origin_(0), x_(0), y_(0),
+ button_(mouse_button::none), modifier_(NoModifier)
 {}
 
 
 FuncRequest::FuncRequest(FuncCode act, Origin o)
-   : action_(act), origin_(o), x_(0), y_(0),
-   button_(mouse_button::none), modifier_(NoModifier), view_origin_(0)
+   : action_(act), origin_(o), view_origin_(0), x_(0), y_(0),
+   button_(mouse_button::none), modifier_(NoModifier)
 {}
 
 
 FuncRequest::FuncRequest(FuncCode act, docstring const & arg, Origin o)
-   : action_(act), argument_(arg), origin_(o), x_(0), y_(0),
- button_(mouse_button::none), modifier_(NoModifier), view_origin_(0)
+   : action_(act), argument_(arg), origin_(o), view_origin_(0), x_(0), 
y_(0),
+ button_(mouse_button::none), modifier_(NoModifier)
 {}
 
 
 FuncRequest::FuncRequest(FuncCode act, string const & arg, Origin o)
-   : action_(act), argument_(from_utf8(arg)), origin_(o), x_(0), y_(0),
- button_(mouse_button::none), modifier_(NoModifier), view_origin_(0)
+   : action_(act), argument_(from_utf8(arg)),
+ origin_(o), view_origin_(0), x_(0), y_(0),
+ button_(mouse_button::none), modifier_(NoModifier)
 {}
 
 
 FuncRequest::FuncRequest(FuncCode act, int ax, int ay,
 mouse_button::state but, KeyModifier modifier, Origin 
o)
-   : action_(act), origin_(o), x_(ax), y_(ay), button_(but),
- modifier_(modifier), view_origin_(0)
+   : action_(act), origin_(o), view_origin_(0), x_(ax), y_(ay),
+ button_(but), modifier_(modifier)
 {}
 
 
 FuncRequest::FuncRequest(FuncRequest const & cmd, docstring const & arg, 
Origin o)
-   : action_(cmd.action()), argument_(arg), origin_(o),
- x_(cmd.x_), y_(cmd.y_), button_(cmd.button_), modifier_(NoModifier),
- view_origin_(0)
+   : action_(cmd.action()), argument_(arg),
+ origin_(o), view_origin_(0), x_(cmd.x_), y_(cmd.y_),
+ button_(cmd.button_), modifier_(NoModifier)
 {}
 
 


[LyX/master] Fix default spellchecker when only Enchant is available

2018-03-19 Thread Jean-Marc Lasgouttes
commit ae473b012a9c7605919f3f3bfad35710cab29566
Author: Jean-Marc Lasgouttes 
Date:   Mon Mar 19 14:07:03 2018 +0100

Fix default spellchecker when only Enchant is available

This has been annoying me for ages.
---
 src/LyXRC.cpp |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp
index 471873d..7e2dab8 100644
--- a/src/LyXRC.cpp
+++ b/src/LyXRC.cpp
@@ -284,6 +284,8 @@ void LyXRC::setDefaults()
 // FIXME: this check should test the target platform (darwin)
 #if defined(USE_MACOSX_PACKAGING)
spellchecker = "native";
+#elif defined(USE_ENCHANT)
+   spellchecker = "enchant";
 #elif defined(USE_ASPELL)
spellchecker = "aspell";
 #elif defined(USE_HUNSPELL)


Re: [LyX/master] Make it possible to select (not)native file dialogs at run time

2018-03-19 Thread Kornel Benko
Am Montag, 19. März 2018 11:51:49 CET schrieb Jean-Marc Lasgouttes 
:
> commit af795b80d8512926261e2457bc5f2e0ac017bec4
> Author: Jean-Marc Lasgouttes 
> Date:   Tue Jan 30 14:32:53 2018 +0100
> 
> Make it possible to select (not)native file dialogs at run time
> 
> Add a new LyXRC variable use_native_filedialog (true by default) that
> allows to select the kind of FileDialog we want at runtime.

Works nice. ubuntu 16.04.

Kornel


signature.asc
Description: This is a digitally signed message part.


[LyX/master] Make it possible to select (not)native file dialogs at run time

2018-03-19 Thread Jean-Marc Lasgouttes
commit af795b80d8512926261e2457bc5f2e0ac017bec4
Author: Jean-Marc Lasgouttes 
Date:   Tue Jan 30 14:32:53 2018 +0100

Make it possible to select (not)native file dialogs at run time

Add a new LyXRC variable use_native_filedialog (true by default) that
allows to select the kind of FileDialog we want at runtime.
---
 src/LyXRC.cpp|   16 
 src/LyXRC.h  |3 +
 src/frontends/qt4/FileDialog.cpp |  177 +++---
 3 files changed, 106 insertions(+), 90 deletions(-)

diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp
index f0f8262..471873d 100644
--- a/src/LyXRC.cpp
+++ b/src/LyXRC.cpp
@@ -195,6 +195,7 @@ LexerKeyword lyxrcTags[] = {
{ "\\use_converter_needauth", LyXRC::RC_USE_CONVERTER_NEEDAUTH },
{ "\\use_converter_needauth_forbidden", 
LyXRC::RC_USE_CONVERTER_NEEDAUTH_FORBIDDEN },
{ "\\use_lastfilepos", LyXRC::RC_USELASTFILEPOS },
+   { "\\use_native_filedialog", LyXRC::RC_USE_NATIVE_FILEDIALOG },
{ "\\use_pixmap_cache", LyXRC::RC_USE_PIXMAP_CACHE },
// compatibility with versions older than 1.4.0 only
{ "\\use_system_colors", LyXRC::RC_USE_SYSTEM_COLORS },
@@ -272,6 +273,7 @@ void LyXRC::setDefaults()
num_lastfiles = 20;
check_lastfiles = true;
use_lastfilepos = true;
+   use_native_filedialog = true;
load_session = false;
make_backup = true;
save_compressed = false;
@@ -871,6 +873,9 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool 
check_format)
case RC_ACCEPT_COMPOUND:
lexrc >> spellchecker_accept_compound;
break;
+   case RC_USE_NATIVE_FILEDIALOG:
+   lexrc >> use_native_filedialog;
+   break;
case RC_USE_SYSTEM_COLORS:
lexrc >> use_system_colors;
break;
@@ -2405,6 +2410,16 @@ void LyXRC::write(ostream & os, bool 
ignore_system_lyxrc, string const & name) c
if (tag != RC_LAST)
break;
// fall through
+   case RC_USE_NATIVE_FILEDIALOG:
+   if (ignore_system_lyxrc ||
+   use_native_filedialog != 
system_lyxrc.use_native_filedialog) {
+   os << "\\use_native_filedialog "
+  << convert(use_native_filedialog)
+  << '\n';
+   }
+   if (tag != RC_LAST)
+   break;
+   // fall through
case RC_USE_SYSTEM_COLORS:
if (ignore_system_lyxrc ||
use_system_colors != system_lyxrc.use_system_colors) {
@@ -3015,6 +3030,7 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC 
const & lyxrc_new)
case LyXRC::RC_USE_CONVERTER_CACHE:
case LyXRC::RC_USE_CONVERTER_NEEDAUTH_FORBIDDEN:
case LyXRC::RC_USE_CONVERTER_NEEDAUTH:
+   case LyXRC::RC_USE_NATIVE_FILEDIALOG:
case LyXRC::RC_USE_SYSTEM_COLORS:
case LyXRC::RC_USE_TOOLTIP:
case LyXRC::RC_USE_PIXMAP_CACHE:
diff --git a/src/LyXRC.h b/src/LyXRC.h
index 3da93ac..5376673 100644
--- a/src/LyXRC.h
+++ b/src/LyXRC.h
@@ -172,6 +172,7 @@ public:
RC_USE_CONVERTER_CACHE,
RC_USE_CONVERTER_NEEDAUTH_FORBIDDEN,
RC_USE_CONVERTER_NEEDAUTH,
+   RC_USE_NATIVE_FILEDIALOG,
RC_USE_SYSTEM_COLORS,
RC_USE_TOOLTIP,
RC_USE_PIXMAP_CACHE,
@@ -332,6 +333,8 @@ public:
bool use_tooltip;
/// Use the colors from current system theme?
bool use_system_colors;
+   /// use native file dialog or our own ?
+   bool use_native_filedialog;
/// Use pixmap cache?
bool use_pixmap_cache;
/// Spellchecker engine: aspell, hunspell, etc
diff --git a/src/frontends/qt4/FileDialog.cpp b/src/frontends/qt4/FileDialog.cpp
index f115634..ee5f350 100644
--- a/src/frontends/qt4/FileDialog.cpp
+++ b/src/frontends/qt4/FileDialog.cpp
@@ -16,6 +16,8 @@
 #include "LyXFileDialog.h"
 #include "qt_helpers.h"
 
+#include "LyXRC.h"
+
 #include "support/debug.h"
 #include "support/FileName.h"
 #include "support/filetools.h"
@@ -24,7 +26,9 @@
 
 #include 
 
-/** when this is defined, the code will use
+#include 
+
+/** when LyXRC::use_native_filedialog is true, we use
  * QFileDialog::getOpenFileName and friends to create filedialogs.
  * Effects:
  * - the dialog does not use the quick directory buttons (Button
@@ -35,13 +39,6 @@
  *
  * Therefore there is a tradeoff in enabling or disabling this (JMarc)
  */
-#if defined(Q_OS_MAC) || defined(Q_OS_WIN)
-#define USE_NATIVE_FILEDIALOG 1
-#endif
-
-#ifdef USE_NATIVE_FILEDIALOG
-#include 
-#endif
 
 namespace lyx {
 
@@ -91,38 +88,38 @@ FileDialog::Result FileDialog::save(QString const & path,
FileDialog::Result result;
result.first = 

[LyX/master] Update to accept automake 1.16

2018-03-19 Thread Jean-Marc Lasgouttes
commit 61db4af82dfd8c24bb3099160274bf6c6d4e7cce
Author: Joel A. Kulesza 
Date:   Sun Mar 18 17:43:25 2018 -0600

Update to accept automake 1.16
---
 INSTALL|2 +-
 autogen.sh |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/INSTALL b/INSTALL
index 2addec5..067b12e 100644
--- a/INSTALL
+++ b/INSTALL
@@ -36,7 +36,7 @@ Note for Git checkouts
 -
 
 If you have checked this out from Git, you need to have:
-* automake (supported versions are 1.14--1.15)
+* automake (supported versions are 1.14--1.16)
 * autoconf (supported versions are 2.65--2.69)
 Then type "./autogen.sh" to build the needed configuration
 files and proceed as stated above/below.
diff --git a/autogen.sh b/autogen.sh
index bee1ab4..edc6c40 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -16,11 +16,11 @@ else
 fi
 
 case $automake_version in
-*' '1.1[45]*)
+*' '1.1[456]*)
;;
 *)
echo "This automake version is not supported by LyX."
-   echo "LyX only supports automake 1.14 to 1.15."
+   echo "LyX only supports automake 1.14 through 1.16."
exit 1
;;
 esac


[LyX/master] Change lookup order for enchant-2 vs. enchant (prefer the former)

2018-03-19 Thread Juergen Spitzmueller
commit 1ae537c5437d0f1abbf877e40a09ad59385f621b
Author: Juergen Spitzmueller 
Date:   Mon Mar 19 09:56:53 2018 +0100

Change lookup order for enchant-2 vs. enchant (prefer the former)
---
 config/spell.m4 |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/config/spell.m4 b/config/spell.m4
index 8d98331..27b79d3 100644
--- a/config/spell.m4
+++ b/config/spell.m4
@@ -45,8 +45,8 @@ AC_DEFUN([CHECK_WITH_ENCHANT],
test "$with_enchant" = "no" && lyx_use_enchant=false
 
if $lyx_use_enchant; then
-   PKG_CHECK_MODULES([ENCHANT], [enchant], [],
-   [PKG_CHECK_MODULES([ENCHANT], [enchant-2], [],
+   PKG_CHECK_MODULES([ENCHANT], [enchant-2], [],
+   [PKG_CHECK_MODULES([ENCHANT], [enchant], [],
[lyx_use_enchant=false])])
AC_MSG_CHECKING([whether to use enchant])
if $lyx_use_enchant ; then


[LyX/master] check for enchant-2

2018-03-19 Thread Juergen Spitzmueller
commit 71977769ec5168eda6f49697b570bbd1dd6991d8
Author: Juergen Spitzmueller 
Date:   Mon Mar 19 09:03:35 2018 +0100

check for enchant-2

Fixes rest of #10986
---
 config/spell.m4 |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/config/spell.m4 b/config/spell.m4
index 5810f17..8d98331 100644
--- a/config/spell.m4
+++ b/config/spell.m4
@@ -45,7 +45,9 @@ AC_DEFUN([CHECK_WITH_ENCHANT],
test "$with_enchant" = "no" && lyx_use_enchant=false
 
if $lyx_use_enchant; then
-   PKG_CHECK_MODULES([ENCHANT], [enchant], [], 
[lyx_use_enchant=false])
+   PKG_CHECK_MODULES([ENCHANT], [enchant], [],
+   [PKG_CHECK_MODULES([ENCHANT], [enchant-2], [],
+   [lyx_use_enchant=false])])
AC_MSG_CHECKING([whether to use enchant])
if $lyx_use_enchant ; then
AC_MSG_RESULT(yes)