[LyX/master] unicodesymbols: amend fec498d6, there was an O (capital letter O) instead of an 0 (zero).

2022-02-20 Thread Thibaut Cuvelier
commit fb70452086747fad09ce6f1e56e9373a330b3373
Author: Thibaut Cuvelier 
Date:   Sun Feb 20 22:28:48 2022 +0100

unicodesymbols: amend fec498d6, there was an O (capital letter O) instead 
of an 0 (zero).
---
 lib/unicodesymbols |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/unicodesymbols b/lib/unicodesymbols
index ab27e31..62bd8eb 100644
--- a/lib/unicodesymbols
+++ b/lib/unicodesymbols
@@ -70,7 +70,7 @@
 0x00a7 "\\textsection""textcomp" 
"force=cp1255;cp1256;iso8859-7;euc-cn;euc-jp;euc-kr;euc-tw;gbk;jis;shift-jis-platex"
 "\\mathsection" "" # SECTION SIGN
 0x00a8 "\\textasciidieresis"  "textcomp" 
"force=cp1255;cp1256;iso8859-7;euc-cn;euc-jp;euc-kr;gbk;jis;shift-jis-platex" # 
DIAERESIS
 0x00a9 "\\textcopyright"  "textcomp" 
"force=cp1255;cp1256;koi8-u;iso8859-7;euc-jp;euc-jp-platex;utf8-platex" # 
COPYRIGHT SIGN
-Ox00a9 "\\copyright" ""
+0x00a9 "\\copyright" ""
 0x00aa "\\textordfeminine""textcomp" 
"force=cp862;euc-jp;euc-jp-platex;euc-kr;utf8-platex" # FEMININE ORDINAL 
INDICATOR
 0x00ab "\\guillemotleft"  "" 
"force=armscii8;cp862;cp1255;cp1256;iso8859-7;utf8-platex" # LEFT-POINTING 
DOUBLE ANGLE QUOTATION MARK
 0x00ac "\\textlnot"   "textcomp" "force!=utf8;utf8-cjk" "\\neg" "" 
# ¬ NOT SIGN
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] DocBook, InsetFloat: avoid a potential nullptr dereference when detecting the type of table for filler content.

2022-02-20 Thread Thibaut Cuvelier
commit cfb6f205fa59a7989958ac2808e5a3c62f1b35bf
Author: Thibaut Cuvelier 
Date:   Sun Feb 20 21:30:39 2022 +0100

DocBook, InsetFloat: avoid a potential nullptr dereference when detecting 
the type of table for filler content.
---
 src/insets/InsetFloat.cpp |   11 +++
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/insets/InsetFloat.cpp b/src/insets/InsetFloat.cpp
index cb05e49..981d611 100644
--- a/src/insets/InsetFloat.cpp
+++ b/src/insets/InsetFloat.cpp
@@ -819,12 +819,15 @@ void docbookNoSubfigures(XMLStream & xs, OutputParams 
const & runparams, const I
}
 
// - Output the actual content of the float or some dummy content (to 
ensure that the output
-   // document is valid).
+   // document is valid). Use HTML tables by default, unless an InsetFloat 
is given.
if (hasFloat)
xs << XMLStream::ESCAPE_NONE << osFloatContent.str();
-   else if (ftype.docbookFloatType() == "table")
-   docbookGenerateFillerTable(xs, 
thisFloat->buffer().params().docbook_table_output);
-   else
+   else if (ftype.docbookFloatType() == "table") {
+   BufferParams::TableOutput tableFormat = BufferParams::HTMLTable;
+   if (thisFloat)
+   tableFormat = 
thisFloat->buffer().params().docbook_table_output;
+   docbookGenerateFillerTable(xs, tableFormat);
+   } else
docbookGenerateFillerMedia(xs);
 
// - Close the float.
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Make undo action no-ops when the buffer is read-only

2022-02-20 Thread Jean-Marc Lasgouttes
commit bfe98181169d9e697e515da974d9b6a15a06c940
Author: Jean-Marc Lasgouttes 
Date:   Sun Feb 20 19:48:13 2022 +0100

Make undo action no-ops when the buffer is read-only

Since the buffer cannot be modified, there is no point to record changes.
Avoids marking buffer dirty after running "inset-forall".
---
 src/Undo.cpp |9 +
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/Undo.cpp b/src/Undo.cpp
index a870241..4e970df 100644
--- a/src/Undo.cpp
+++ b/src/Undo.cpp
@@ -374,6 +374,9 @@ void Undo::Private::recordUndo(UndoKind kind,
LASSERT(first_pit <= cell.lastpit(), return);
LASSERT(last_pit <= cell.lastpit(), return);
 
+   if (buffer_.isReadonly())
+   return;
+
doRecordUndo(kind, cell, first_pit, last_pit, cur,
undostack_);
 
@@ -408,6 +411,9 @@ void Undo::Private::doRecordUndoBufferParams(CursorData 
const & cur_before,
 
 void Undo::Private::recordUndoBufferParams(CursorData const & cur)
 {
+   if (buffer_.isReadonly())
+   return;
+
doRecordUndoBufferParams(cur, undostack_);
 
// next time we'll try again to combine entries if possible
@@ -517,6 +523,9 @@ void Undo::Private::doUndoRedoAction(CursorData & cur, 
UndoElementStack & stack,
 
 bool Undo::Private::undoRedoAction(CursorData & cur, bool isUndoOperation)
 {
+   if (buffer_.isReadonly())
+   return false;
+
undo_finished_ = true;
 
UndoElementStack & stack = isUndoOperation ?  undostack_ : redostack_;
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Do not call recordUndo(), lyx::dispatch handles it.

2022-02-20 Thread Jean-Marc Lasgouttes
commit 48ee2fd07b405fe1417981a202c12d91801e707e
Author: Jean-Marc Lasgouttes 
Date:   Sun Feb 20 19:33:22 2022 +0100

Do not call recordUndo(), lyx::dispatch handles it.

This avoids extra memory use (and would mark document dirty even if
read-only).
---
 src/BufferView.cpp |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/src/BufferView.cpp b/src/BufferView.cpp
index 06ffb38..8ea0204 100644
--- a/src/BufferView.cpp
+++ b/src/BufferView.cpp
@@ -2079,7 +2079,6 @@ void BufferView::dispatch(FuncRequest const & cmd, 
DispatchResult & dr)
docstring insname = ins->layoutName();
while (!insname.empty()) {
if (insname == name || name == from_utf8("*")) {
-   curs.recordUndo();
lyx::dispatch(fr, dr);
// we do not want to remember selection 
here
curs.clearSelection();
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Fixup cc426346: rename curs to bvcur

2022-02-20 Thread Jean-Marc Lasgouttes
commit a90a1aed06a149a181cbcc34b589f92f35f6222f
Author: Jean-Marc Lasgouttes 
Date:   Sun Feb 20 19:35:37 2022 +0100

Fixup cc426346: rename curs to bvcur

The name "curs" was chosen to avoid to hide the existing "cur" local 
variable.
Using "bvcur" makes the name easier to grasp.
---
 src/BufferView.cpp |   30 +++---
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/BufferView.cpp b/src/BufferView.cpp
index 8ea0204..023301d 100644
--- a/src/BufferView.cpp
+++ b/src/BufferView.cpp
@@ -2066,14 +2066,14 @@ void BufferView::dispatch(FuncRequest const & cmd, 
DispatchResult & dr)
// an arbitrary number to limit number of iterations
const int max_iter = 10;
int iterations = 0;
-   Cursor & curs = d->cursor_;
-   Cursor const savecur = curs;
-   curs.reset();
-   if (!curs.nextInset())
-   curs.forwardInset();
-   curs.beginUndoGroup();
-   while(curs && iterations < max_iter) {
-   Inset * const ins = curs.nextInset();
+   Cursor & bvcur = d->cursor_;
+   Cursor const savecur = bvcur;
+   bvcur.reset();
+   if (!bvcur.nextInset())
+   bvcur.forwardInset();
+   bvcur.beginUndoGroup();
+   while(bvcur && iterations < max_iter) {
+   Inset * const ins = bvcur.nextInset();
if (!ins)
break;
docstring insname = ins->layoutName();
@@ -2081,7 +2081,7 @@ void BufferView::dispatch(FuncRequest const & cmd, 
DispatchResult & dr)
if (insname == name || name == from_utf8("*")) {
lyx::dispatch(fr, dr);
// we do not want to remember selection 
here
-   curs.clearSelection();
+   bvcur.clearSelection();
++iterations;
break;
}
@@ -2091,11 +2091,11 @@ void BufferView::dispatch(FuncRequest const & cmd, 
DispatchResult & dr)
insname = insname.substr(0, i);
}
// if we did not delete the inset, skip it
-   if (!curs.nextInset() || curs.nextInset() == ins)
-   curs.forwardInset();
+   if (!bvcur.nextInset() || bvcur.nextInset() == ins)
+   bvcur.forwardInset();
}
-   curs = savecur;
-   curs.fixIfBroken();
+   bvcur = savecur;
+   bvcur.fixIfBroken();
/** This is a dummy undo record only to remember the cursor
 * that has just been set; this will be used on a redo action
 * (see ticket #10097)
@@ -2103,8 +2103,8 @@ void BufferView::dispatch(FuncRequest const & cmd, 
DispatchResult & dr)
 * FIXME: a better fix would be to have a way to set the
 * cursor value directly, but I am not sure it is worth it.
 */
-   curs.recordUndo();
-   curs.endUndoGroup();
+   bvcur.recordUndo();
+   bvcur.endUndoGroup();
dr.screenUpdate(Update::Force);
dr.forceBufferUpdate();
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Combine the separation between different layouts (with same depth)

2022-02-20 Thread Jean-Marc Lasgouttes
commit aad18e969a7fad69a196b8de737d18f33a7ab9b0
Author: Daniel Ramoeller 
Date:   Thu Oct 21 09:29:54 2021 +0200

Combine the separation between different layouts (with same depth)

Fix for #12402.
---
 src/TextMetrics.cpp |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp
index f68292a..53b6838 100644
--- a/src/TextMetrics.cpp
+++ b/src/TextMetrics.cpp
@@ -1202,7 +1202,10 @@ int TextMetrics::parTopSpacing(pit_type const pit) const
&& prevpar.getLabelWidthString() == par.getLabelWidthString()) {
layoutasc = layout.itemsep * dh;
} else if (pit != 0 && layout.topsep > 0)
-   layoutasc = layout.topsep * dh;
+   // combine the separation between different layouts (with same 
depth)
+   layoutasc = max(0.0,
+   prevpar.getDepth() != par.getDepth() ? layout.topsep
+   : layout.topsep - prevpar.layout().bottomsep) * dh;
 
asc += int(layoutasc * 2 / (2 + pars[pit].getDepth()));
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] inset-forall: clear selection after each action

2022-02-20 Thread Jean-Marc Lasgouttes
commit 3b28ac46376cfdb10fbc67a45fe1c83d87043d08
Author: Jean-Marc Lasgouttes 
Date:   Sun Feb 20 19:07:58 2022 +0100

inset-forall: clear selection after each action

This avoid a crash when doing
  command-sequence inset-forall Caption char-delete-forward; statistics; 
undo
in the user guide when a malformed selection is created.

The selection happens here because char-delete-forward will select the
caption instead of deleting it if the "force" parameter is not given.
This is a poor API IMO, it is the plain  action that should use a
special parameter.
---
 src/BufferView.cpp |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/BufferView.cpp b/src/BufferView.cpp
index 2bf7d2a..06ffb38 100644
--- a/src/BufferView.cpp
+++ b/src/BufferView.cpp
@@ -2081,6 +2081,8 @@ void BufferView::dispatch(FuncRequest const & cmd, 
DispatchResult & dr)
if (insname == name || name == from_utf8("*")) {
curs.recordUndo();
lyx::dispatch(fr, dr);
+   // we do not want to remember selection 
here
+   curs.clearSelection();
++iterations;
break;
}
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Avoid null pointer dereference

2022-02-20 Thread Jean-Marc Lasgouttes
commit b365a471124d63017beabeb5c3ae84ce00c7f350
Author: Jean-Marc Lasgouttes 
Date:   Sun Feb 20 17:22:07 2022 +0100

Avoid null pointer dereference

Spotted by coverity. In the real world, getInset should never return
nullptr when isInset is true.
---
 src/Paragraph.cpp |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 3a4c399..9a1171f 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -2367,8 +2367,8 @@ int Paragraph::Private::startTeXParParams(BufferParams 
const & bparams,
&& !layout_->pass_thru
&& curAlign != LYX_ALIGN_CENTER) {
if (!owner_->empty()
-   && (owner_->isInset(0)
-   && owner_->getInset(0)->lyxCode() == VSPACE_CODE))
+   && owner_->getInset(0)
+   && owner_->getInset(0)->lyxCode() == VSPACE_CODE)
// If the paragraph starts with a vspace, the \\noindent
// needs to come after that (as it leaves vmode).
// If the paragraph consists only of the vspace,
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Avoid null pointer dereference

2022-02-20 Thread Jean-Marc Lasgouttes
commit a900667ea1bb516ac562a6c45e4f3a1e4071b01b
Author: Jean-Marc Lasgouttes 
Date:   Sun Feb 20 17:09:49 2022 +0100

Avoid null pointer dereference

Spotted by coverity.
---
 src/graphics/GraphicsLoader.cpp |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/graphics/GraphicsLoader.cpp b/src/graphics/GraphicsLoader.cpp
index b375c0e..dc3f7c5 100644
--- a/src/graphics/GraphicsLoader.cpp
+++ b/src/graphics/GraphicsLoader.cpp
@@ -400,7 +400,7 @@ void Loader::Impl::resetFile(FileName const & file)
// new file.
bool continue_monitoring = false;
 
-   if (!old_file.empty()) {
+   if (cached_item_ && !old_file.empty()) {
continue_monitoring = cached_item_->monitoring();
// cached_item_ is going to be reset, so the connected
// signal needs to be disconnected.
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Fix unintialized variables spotted by coverity

2022-02-20 Thread Jean-Marc Lasgouttes
commit e263fe8e03b9b506e8355e5a11cb3ec717c29592
Author: Jean-Marc Lasgouttes 
Date:   Sun Feb 20 17:02:04 2022 +0100

Fix unintialized variables spotted by coverity

The InsetWrap case happens in decodeInsetParaps (InsetCommand.cpp),
where the default constructor is invoked. In this case, lines was not
initialized.
---
 src/insets/InsetWrap.cpp  |4 
 src/insets/InsetWrap.h|8 
 src/mathed/MathParser.cpp |2 +-
 3 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/src/insets/InsetWrap.cpp b/src/insets/InsetWrap.cpp
index c862b17..8987405 100644
--- a/src/insets/InsetWrap.cpp
+++ b/src/insets/InsetWrap.cpp
@@ -47,10 +47,6 @@ InsetWrap::InsetWrap(Buffer * buf, string const & type)
: InsetCaptionable(buf)
 {
setCaptionType(type);
-   params_.lines = 0;
-   params_.placement = "o";
-   params_.overhang = Length(0, Length::PCW);
-   params_.width = Length(50, Length::PCW);
 }
 
 
diff --git a/src/insets/InsetWrap.h b/src/insets/InsetWrap.h
index 02e0a20..a44821e 100644
--- a/src/insets/InsetWrap.h
+++ b/src/insets/InsetWrap.h
@@ -30,13 +30,13 @@ public:
///
std::string type;
///
-   int lines;
+   int lines = 0;
///
-   std::string placement;
+   std::string placement = "o";
///
-   Length overhang;
+   Length overhang = Length(0, Length::PCW);
///
-   Length width;
+   Length width = Length(50, Length::PCW);
 };
 
 
diff --git a/src/mathed/MathParser.cpp b/src/mathed/MathParser.cpp
index 6d1b747..0ba3375 100644
--- a/src/mathed/MathParser.cpp
+++ b/src/mathed/MathParser.cpp
@@ -1369,7 +1369,7 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
// otherwise parse it as an user macro
MathData count;
parse(count, FLAG_ITEM, mode);
-   int cols;
+   int cols = 0;
// limit arbitrarily to 100 columns
if (extractNumber(count, cols) && cols > 0 && cols < 
100) {
// resize the table if necessary
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/2.3.x] Use real path names for buffer lookup by name of temporary external files.

2022-02-20 Thread Stephan Witt
commit c22119eb1cec28e9ef79cfe94267bf5eb22e4afe
Author: Stephan Witt 
Date:   Tue Feb 15 22:12:00 2022 +0100

Use real path names for buffer lookup by name of temporary external files.

In case of path names for external files containing symbolic links the real 
path
and the logical path name may be different for the same file or directory.
LyX is using QDir::tempPath() to create the path name of the temporary 
directory.
The Qt implementation is free to return the logical or the real path name 
here and
it happens to be different for various platforms and versions.
The most stable and clean solution is to use the real path name 
consistently.

(cherry picked from commit f2f861f017bd598c9e5b72f64e10587cbe1e3405)
---
 development/MacOSX/lyxeditor  |4 +---
 src/BufferList.cpp|5 +++--
 src/BufferList.h  |5 +++--
 src/frontends/qt4/GuiView.cpp |   16 +---
 status.23x|2 ++
 5 files changed, 14 insertions(+), 18 deletions(-)

diff --git a/development/MacOSX/lyxeditor b/development/MacOSX/lyxeditor
index 7431b3b..ad8c407 100755
--- a/development/MacOSX/lyxeditor
+++ b/development/MacOSX/lyxeditor
@@ -82,9 +82,7 @@ test -z "${LYXPIPE}" && {
 }
 
 if [ -n "$LYXPIPE" -a -p "$LYXPIPE".in ]; then
-   file=$(echo "$1" | sed 's|^/private||')
-
-   MAC_LYXPIPE_CONTENTS="LYXCMD:macdvix:server-goto-file-row:$file $2"
+   MAC_LYXPIPE_CONTENTS="LYXCMD:macdvix:server-goto-file-row:$1 $2"
# echo "$MAC_LYXPIPE_CONTENTS"
echo "$MAC_LYXPIPE_CONTENTS" > "${LYXPIPE}".in || { echo "Cannot write 
to lyxpipe." ; exit 2 ; }
while read line ; do
diff --git a/src/BufferList.cpp b/src/BufferList.cpp
index 5e83c7b..450b2bc 100644
--- a/src/BufferList.cpp
+++ b/src/BufferList.cpp
@@ -331,12 +331,13 @@ Buffer * BufferList::getBuffer(support::FileName const & 
fname, bool internal) c
 }
 
 
-Buffer * BufferList::getBufferFromTmp(string const & s)
+Buffer * BufferList::getBufferFromTmp(string const & s, bool realpath)
 {
BufferStorage::iterator it = bstore.begin();
BufferStorage::iterator end = bstore.end();
for (; it < end; ++it) {
-   if (prefixIs(s, (*it)->temppath())) {
+   string const temppath = realpath ? 
FileName((*it)->temppath()).realPath() : (*it)->temppath();
+   if (prefixIs(s, temppath)) {
// check whether the filename matches the master
string const master_name = (*it)->latexName();
if (suffixIs(s, master_name))
diff --git a/src/BufferList.h b/src/BufferList.h
index ca55abe..8ccebf0 100644
--- a/src/BufferList.h
+++ b/src/BufferList.h
@@ -100,8 +100,9 @@ public:
/// \return a pointer to the buffer with the given number
Buffer * getBuffer(unsigned int);
 
-   /// \return a pointer to the buffer whose temppath matches the given 
path
-   Buffer * getBufferFromTmp(std::string const & path);
+   /// \return a pointer to the buffer whose temppath matches the given \p 
path
+   ///  If optional \p realpath is \c true the lookup is done with real 
path names
+   Buffer * getBufferFromTmp(std::string const & path, bool realpath = 
false);
 
/** returns a pointer to the buffer that follows argument in
 * buffer list. The buffer following the last in list is the
diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp
index 60e59ef..b28d926 100644
--- a/src/frontends/qt4/GuiView.cpp
+++ b/src/frontends/qt4/GuiView.cpp
@@ -3493,7 +3493,7 @@ bool GuiView::goToFileRow(string const & argument)
int row;
size_t i = argument.find_last_of(' ');
if (i != string::npos) {
-   file_name = os::internal_path(trim(argument.substr(0, i)));
+   file_name = os::internal_path(FileName(trim(argument.substr(0, 
i))).realPath());
istringstream is(argument.substr(i + 1));
is >> row;
if (is.fail())
@@ -3504,20 +3504,14 @@ bool GuiView::goToFileRow(string const & argument)
return false;
}
Buffer * buf = 0;
-   string const abstmp = package().temp_dir().absFileName();
string const realtmp = package().temp_dir().realPath();
// We have to use os::path_prefix_is() here, instead of
// simply prefixIs(), because the file name comes from
// an external application and may need case adjustment.
-   if (os::path_prefix_is(file_name, abstmp, os::CASE_ADJUSTED)
-   || os::path_prefix_is(file_name, realtmp, os::CASE_ADJUSTED)) {
-   // Needed by inverse dvi search. If it is a file
-   // in tmpdir, call the apropriated function.
-   // If tmpdir is a symlink, we may have the real
-   // path passed back, so we correct for that.
-   if (!prefixIs(file_name, abstmp))
-   

[LyX/master] #9287 query Standard User Defaults on mac and adjust cursor flash time accordingly

2022-02-20 Thread Stephan Witt
commit 6b0cd451fb12bb2eda88bd54511011e2184445a8
Author: Stephan Witt 
Date:   Sun Feb 20 13:06:28 2022 +0100

#9287 query Standard User Defaults on mac and adjust cursor flash time 
accordingly
---
 src/frontends/qt/GuiApplication.cpp |   14 ++
 src/support/AppleSupport.h  |6 ++
 src/support/AppleSupport.m  |   16 
 3 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/src/frontends/qt/GuiApplication.cpp 
b/src/frontends/qt/GuiApplication.cpp
index b44f2c5..c15f2d7 100644
--- a/src/frontends/qt/GuiApplication.cpp
+++ b/src/frontends/qt/GuiApplication.cpp
@@ -197,6 +197,20 @@ frontend::Application * createApplication(int & argc, char 
* argv[])
 #endif
 
 
+#if defined(Q_OS_MAC)
+   int const cursor_time_on = NSTextInsertionPointBlinkPeriodOn();
+   int const cursor_time_off = NSTextInsertionPointBlinkPeriodOff();
+   if (cursor_time_on > 0 && cursor_time_off > 0) {
+   QApplication::setCursorFlashTime(cursor_time_on + 
cursor_time_off);
+   } else if (cursor_time_on <= 0 && cursor_time_off > 0) {
+   // Off is set and On is undefined of zero
+   QApplication::setCursorFlashTime(0);
+   } else if (cursor_time_off <= 0 && cursor_time_on > 0) {
+   // On is set and Off is undefined of zero
+   QApplication::setCursorFlashTime(0);
+   }
+#endif
+
 // Setup high DPI handling. This is a bit complicated, but will be default in 
Qt6.
 // macOS does it by itself.
 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && !defined(Q_OS_MAC)
diff --git a/src/support/AppleSupport.h b/src/support/AppleSupport.h
index 9f154c6..0d2e41a 100644
--- a/src/support/AppleSupport.h
+++ b/src/support/AppleSupport.h
@@ -20,6 +20,12 @@ extern "C" {
 
// query the system preferences for users tabbing preference
bool appleUserTabbingPreferenceAlways();
+
+   // Query the Standard User Defaults for float values of
+   // NSTextInsertionPointBlinkPeriodOn resp. 
NSTextInsertionPointBlinkPeriodOff
+   // and return the integer part of it - return -1 in case of unset value
+   int NSTextInsertionPointBlinkPeriodOn();
+   int NSTextInsertionPointBlinkPeriodOff();
 #ifdef __cplusplus
 }
 #endif
diff --git a/src/support/AppleSupport.m b/src/support/AppleSupport.m
index 2c78bd2..4278564 100644
--- a/src/support/AppleSupport.m
+++ b/src/support/AppleSupport.m
@@ -49,3 +49,19 @@ bool appleUserTabbingPreferenceAlways() {
return false;
 #endif
 }
+
+
+int NSTextInsertionPointBlinkPeriodOn() {
+   NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
+
+   return [prefs objectForKey:@"NSTextInsertionPointBlinkPeriodOn"] == nil 
?
+   -1 : [prefs floatForKey:@"NSTextInsertionPointBlinkPeriodOn"];
+}
+
+
+int NSTextInsertionPointBlinkPeriodOff() {
+   NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
+
+   return [prefs objectForKey:@"NSTextInsertionPointBlinkPeriodOff"] == 
nil ?
+   -1 : [prefs 
floatForKey:@"NSTextInsertionPointBlinkPeriodOff"];
+}
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Update fr.po

2022-02-20 Thread jpc
commit 28af3b6cf87ecc1626b57d12b35a49691caaa5dc
Author: jpc 
Date:   Sun Feb 20 10:06:50 2022 +0100

 Update fr.po
---
 po/fr.gmo |  Bin 627024 -> 627277 bytes
 po/fr.po  |  189 -
 2 files changed, 99 insertions(+), 90 deletions(-)

diff --git a/po/fr.gmo b/po/fr.gmo
index 086a872..5c127d1 100644
Binary files a/po/fr.gmo and b/po/fr.gmo differ
diff --git a/po/fr.po b/po/fr.po
index 5358e99..8c48613 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -362,8 +362,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: LyX 2.4\n"
 "Report-Msgid-Bugs-To: lyx-de...@lists.lyx.org\n"
-"POT-Creation-Date: 2022-02-17 18:01+0100\n"
-"PO-Revision-Date: 2022-02-18 10:53+0100\n"
+"POT-Creation-Date: 2022-02-20 10:02+0100\n"
+"PO-Revision-Date: 2022-02-20 10:06+0100\n"
 "Last-Translator: Jean-Pierre Chrétien \n"
 "Language-Team: lyxfr\n"
 "Language: fr\n"
@@ -664,54 +664,63 @@ msgid "Add "
 msgstr " local..."
 
 #: src/frontends/qt/ui/BibtexUi.ui:91
+msgid "Inherit bibliography databases from the master document"
+msgstr ""
+"Importer les bases de données bibliographiques depuis le document maître"
+
+#: src/frontends/qt/ui/BibtexUi.ui:94
+msgid " from Master"
+msgstr " depuis le document maître"
+
+#: src/frontends/qt/ui/BibtexUi.ui:101
 msgid "Remove the selected database"
 msgstr "Enlever la base de données sélectionnée"
 
-#: src/frontends/qt/ui/BibtexUi.ui:94 src/frontends/qt/ui/CitationUi.ui:159
+#: src/frontends/qt/ui/BibtexUi.ui:104 src/frontends/qt/ui/CitationUi.ui:159
 msgid ""
 msgstr "Suppri"
 
-#: src/frontends/qt/ui/BibtexUi.ui:107
+#: src/frontends/qt/ui/BibtexUi.ui:117
 msgid "Move the selected database up (Ctrl-Up)"
 msgstr "Faire monter la base de données sélectionnée (Ctrl-Up)"
 
-#: src/frontends/qt/ui/BibtexUi.ui:110 src/frontends/qt/ui/CitationUi.ui:191
+#: src/frontends/qt/ui/BibtexUi.ui:120 src/frontends/qt/ui/CitationUi.ui:191
 #: src/frontends/qt/ui/ModulesUi.ui:140
 msgid ""
 msgstr "Vers le "
 
-#: src/frontends/qt/ui/BibtexUi.ui:130
+#: src/frontends/qt/ui/BibtexUi.ui:140
 msgid "Move the selected database down (Ctrl-Down)"
 msgstr "Faire descendre la base de données sélectionnée (Ctrl-Down)"
 
-#: src/frontends/qt/ui/BibtexUi.ui:133 src/frontends/qt/ui/CitationUi.ui:214
+#: src/frontends/qt/ui/BibtexUi.ui:143 src/frontends/qt/ui/CitationUi.ui:214
 #: src/frontends/qt/ui/ModulesUi.ui:147
 msgid "Do"
 msgstr "Vers le "
 
-#: src/frontends/qt/ui/BibtexUi.ui:160
+#: src/frontends/qt/ui/BibtexUi.ui:170
 msgid "Edit selected database externally"
 msgstr "Modifier la base de données sélectionnée via une application externe"
 
-#: src/frontends/qt/ui/BibtexUi.ui:163
+#: src/frontends/qt/ui/BibtexUi.ui:173
 msgid ""
 msgstr "Mo"
 
-#: src/frontends/qt/ui/BibtexUi.ui:191
+#: src/frontends/qt/ui/BibtexUi.ui:201
 msgid "Sele:"
 msgstr "Sélé :"
 
-#: src/frontends/qt/ui/BibtexUi.ui:208 src/frontends/qt/ui/CitationUi.ui:27
+#: src/frontends/qt/ui/BibtexUi.ui:218 src/frontends/qt/ui/CitationUi.ui:27
 #: src/frontends/qt/ui/ModulesUi.ui:76 src/frontends/qt/ui/RefUi.ui:39
 #: src/frontends/qt/ui/TocUi.ui:345
 msgid ":"
 msgstr " :"
 
-#: src/frontends/qt/ui/BibtexUi.ui:238 src/frontends/qt/GuiBibtex.cpp:288
+#: src/frontends/qt/ui/BibtexUi.ui:248 src/frontends/qt/GuiBibtex.cpp:335
 msgid "E:"
 msgstr "Encoda :"
 
-#: src/frontends/qt/ui/BibtexUi.ui:248 src/frontends/qt/GuiBibtex.cpp:289
+#: src/frontends/qt/ui/BibtexUi.ui:258 src/frontends/qt/GuiBibtex.cpp:336
 msgid ""
 "If your bibliography databases use a different encoding than the LyX "
 "document, specify it here"
@@ -719,27 +728,27 @@ msgstr ""
 "Si vos bases bibliographiques utilisent un encodage différent de celui du "
 "document, indiquez-le ici"
 
-#: src/frontends/qt/ui/BibtexUi.ui:260
+#: src/frontends/qt/ui/BibtexUi.ui:270
 msgid "The BibTeX style"
 msgstr "Le style BibTeX"
 
-#: src/frontends/qt/ui/BibtexUi.ui:263
+#: src/frontends/qt/ui/BibtexUi.ui:273
 msgid "St"
 msgstr ""
 
-#: src/frontends/qt/ui/BibtexUi.ui:275
+#: src/frontends/qt/ui/BibtexUi.ui:285
 msgid "Choose a style file"
 msgstr "Choisir un fichier de style"
 
-#: src/frontends/qt/ui/BibtexUi.ui:288
+#: src/frontends/qt/ui/BibtexUi.ui:298
 msgid "Select a style file from your local directory"
 msgstr "Sélectionner un fichier de style à partir de votre répertoire local"
 
-#: src/frontends/qt/ui/BibtexUi.ui:291
+#: src/frontends/qt/ui/BibtexUi.ui:301
 msgid "Add L"
 msgstr "Ajouter l"
 
-#: src/frontends/qt/ui/BibtexUi.ui:304 lib/layouts/beamer.layout:520
+#: src/frontends/qt/ui/BibtexUi.ui:314 lib/layouts/beamer.layout:520
 #: lib/layouts/beamer.layout:549 lib/layouts/beamer.layout:560
 #: lib/layouts/beamer.layout:588 lib/layouts/beamer.layout:691
 #: lib/layouts/chessboard.module:31 lib/layouts/chessboard.module:61
@@ -752,42 +761,42 @@ msgstr "Ajouter l"
 msgid "Options"
 msgstr "Options"
 
-#: src/frontends/qt/ui/BibtexUi.ui:321 src/frontends/qt/ui/BibtexUi.ui:334
+#: src/frontends/qt/ui/BibtexUi.ui:331