Le 24/07/2017 à 18:16, Jean-Marc Lasgouttes a écrit :
I could do that indeed. I'll propose another iteration.
Here it is. I also removed all traces of (LYX_)DEVEL_VERSION in cmake.
Kornel, does it look OK?
Can I apply this?
JMarc
>From 18da500ecfdd70fea22bc385ab1a68fc57818633 Mon Sep 17 00:00:00 2001
From: Jean-Marc Lasgouttes
Date: Mon, 24 Jul 2017 00:21:43 +0200
Subject: [PATCH] Make "devel mode" configurable at run time
Traditionally LyX behaves differently when the directive DEVEL_VERSION
is defined at compile time. This covers
* more detailed description of current position in status bar
* the help files are open in read/write mode
* more detailed debug output in the View Source panel
This patch introduces the new function devel-mode-toggle that allows
to use devel mode in stable releases, and vice versa.
The information is saved in the session file. The default is to
disable devel mode.
Remove all traces of DEVEL_VERSION in autoconf and cmake
---
CMakeLists.txt | 1 -
INSTALL.cmake | 1 -
config/lyxinclude.m4 | 1 -
development/cmake/TODO.txt | 2 --
development/cmake/config.h.cmake | 6 --
src/BufferView.cpp | 2 +-
src/Cursor.cpp | 23 ---
src/Cursor.h | 4 ++--
src/FuncCode.h | 1 +
src/LyXAction.cpp | 13 +
src/Text.cpp | 34 +-
src/Text.h | 4 ++--
src/frontends/qt4/GuiApplication.cpp | 7 +--
src/frontends/qt4/GuiCommandBuffer.cpp | 6 --
src/frontends/qt4/GuiCommandBuffer.h | 3 ---
src/frontends/qt4/GuiView.cpp | 18 --
src/frontends/qt4/GuiView.h| 5 +
src/frontends/qt4/GuiViewSource.cpp| 27 ++-
src/mathed/InsetMathHull.cpp | 2 +-
19 files changed, 85 insertions(+), 75 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3c737c7ba2..7490545c1d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -117,7 +117,6 @@ LYX_OPTION(REQUIRE_SPELLCHECK "Abort if no spellchecker available" OFF ALL)
LYX_OPTION(ASPELL "Require aspell" OFF ALL)
LYX_OPTION(ENCHANT "Require Enchant" OFF ALL)
LYX_OPTION(HUNSPELL "Require Hunspell" OFF ALL)
-LYX_OPTION(DEVEL_VERSION"Build developer version" OFF ALL)
LYX_OPTION(RELEASE "Build release version, build debug when disabled" OFF ALL)
LYX_OPTION(DEBUG"Enforce debug build" OFF ALL)
LYX_OPTION(NO_OPTIMIZE "Don't use any optimization/debug flags" OFF ALL)
diff --git a/INSTALL.cmake b/INSTALL.cmake
index ffe5866b00..4c8d4789f3 100644
--- a/INSTALL.cmake
+++ b/INSTALL.cmake
@@ -141,7 +141,6 @@ Build options
-- LYX_ASPELL = OFF: Require aspell
-- LYX_ENCHANT = OFF: Require Enchant
-- LYX_HUNSPELL = OFF: Require Hunspell
--- LYX_DEVEL_VERSION= OFF: Build developer version
-- LYX_RELEASE = OFF: Build release version, build debug when disabled
-- LYX_PACKAGE_SUFFIX = ON : Use version suffix for packaging
-- LYX_PCH = OFF: Use precompiled headers
diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4
index b07bf38f24..ead704b166 100644
--- a/config/lyxinclude.m4
+++ b/config/lyxinclude.m4
@@ -33,7 +33,6 @@ AC_MSG_RESULT([$build_type])
lyx_flags="$lyx_flags build=$build_type"
case $build_type in
development) lyx_devel_version=yes
- AC_DEFINE(DEVEL_VERSION, 1, [Define if you are building a development version of LyX])
LYX_DATE="not released yet" ;;
prerelease) lyx_prerelease=yes ;;
esac
diff --git a/development/cmake/TODO.txt b/development/cmake/TODO.txt
index 45c1e0df84..32cf54b292 100644
--- a/development/cmake/TODO.txt
+++ b/development/cmake/TODO.txt
@@ -26,8 +26,6 @@ Bug fixing
Documentation
* Better documentation, variable naming, more automake-like
- * what does LYX_DEVEL_VERSION do?
- * What is the difference with LYX_RELEASE=OFF?
* how do I specify whether I want debug informations (-g flag) for unix?
diff --git a/development/cmake/config.h.cmake b/development/cmake/config.h.cmake
index f0a504a81a..7fac0b00b5 100644
--- a/development/cmake/config.h.cmake
+++ b/development/cmake/config.h.cmake
@@ -24,12 +24,6 @@
#endif
-#cmakedefine LYX_DEVEL_VERSION 1
-#if defined(LYX_DEVEL_VERSION)
- #define DEVEL_VERSION 1
-#else
- #undef DEVEL_VERSION
-#endif
#cmakedefine PACKAGE "${PACKAGE}"
#cmakedefine PACKAGE_VERSION "${PACKAGE_VERSION}"
#define PACKAGE_STRING "LyX ${PACKAGE_VERSION}"
diff --git a/src/BufferView.cpp b/src/BufferView.cpp
index 2f256369f6..03e7723fd1 100644
--- a/src/BufferView.cpp
+++ b/src/BufferView.cpp
@@ -1391,7 +1391,7 @@ void