[LyX/2.3.x] Correct copy of hunspell dictionary to bundle with internal hunspell w/o framework

2024-05-07 Thread Stephan Witt
commit ddc29fbdbf3adc10a80b9368028a05c2921da4ac
Author: Stephan Witt 
Date:   Tue May 7 13:05:03 2024 +0200

Correct copy of hunspell dictionary to bundle with internal hunspell w/o 
framework
---
 development/LyX-Mac-binary-release.sh | 10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index cf4124e3b2..708cd51cfa 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -944,12 +944,10 @@ copy_dictionaries() {
cp -p -r "${ASpellInstallDir}/lib/aspell-0.60"/* 
"${ASpellResources}"/data
cp -p -r "${ASpellInstallDir}/share/aspell"/* 
"${ASpellResources}"/dicts
fi
-   if [ -d "${HunSpellInstallDir}" -a "yes" = "${hunspell_dictionaries}" 
]; then
+   if [ -d "${DictionarySourceDir}" -a "yes" = "${hunspell_dictionaries}" 
]; then
HunSpellResources="${LyxAppPrefix}/Contents/Resources"
-   if [ -d "${DictionarySourceDir}" ]; then
-   ( cd "${DictionarySourceDir}" && find dicts -name .svn 
-prune -o -type f -print | cpio -pmdv "${HunSpellResources}" )
-   deduplicate "${HunSpellResources}"/dicts
-   fi
+   ( cd "${DictionarySourceDir}" && find dicts -name .svn -prune 
-o -type f -print | cpio -pmdv "${HunSpellResources}" )
+   deduplicate "${HunSpellResources}"/dicts
fi
if [ -d "${DictionarySourceDir}" -a "yes" = "${thesaurus_deployment}" 
]; then
MyThesResources="${LyxAppPrefix}/Contents/Resources"
@@ -1075,7 +1073,7 @@ if [ ${LyxOnlyPackage:-"no"} = "no" ]; then
build_lyx
convert_universal
copy_dictionaries
-   test -n "${CODESIGN_IDENTITY}" && code_sign "${LYX_BUNDLE_PATH}"
find "${LyxAppPrefix}" -type d -exec chmod go-w '{}' \;
+   test -n "${CODESIGN_IDENTITY}" && code_sign "${LYX_BUNDLE_PATH}"
 fi
 build_package
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/2.4.x] #13049 add window activation for preferences to avoid it be hidden by main window on mac after alert prompts

2024-04-19 Thread Stephan Witt
commit 5554fe9aeb51478b60e6bc04ebf9727d9b081b63
Author: Stephan Witt 
Date:   Fri Apr 5 10:47:49 2024 +0200

#13049 add window activation for preferences to avoid it be hidden by main 
window on mac after alert prompts

(cherry picked from commit 4c1db7cad866d99af2f2474d8467cc8581eb0eef)
---
 src/frontends/qt/GuiPrefs.cpp | 29 +++--
 1 file changed, 23 insertions(+), 6 deletions(-)

diff --git a/src/frontends/qt/GuiPrefs.cpp b/src/frontends/qt/GuiPrefs.cpp
index d531dd4cde..230d377a2b 100644
--- a/src/frontends/qt/GuiPrefs.cpp
+++ b/src/frontends/qt/GuiPrefs.cpp
@@ -190,6 +190,16 @@ static void setComboxFont(QComboBox * cb, string const & 
family,
 }
 
 
+static void activatePrefsWindow(GuiPreferences * form_)
+{
+   if (guiApp->platformName() == "cocoa") {
+   QWidget * dialog_ = form_->asQWidget();
+   dialog_->raise();
+   dialog_->activateWindow();
+   }
+}
+
+
 /
 //
 // PrefOutput
@@ -1783,6 +1793,7 @@ void PrefConverters::on_needauthCB_toggled(bool checked)
int ret = frontend::Alert::prompt(
_("SECURITY WARNING!"), _("Unchecking this option has the 
effect that potentially harmful converters would be run without asking your 
permission first. This is UNSAFE and NOT recommended, unless you know what you 
are doing. Are you sure you would like to proceed? The recommended and safe 
answer is NO!"),
0, 0, _(""), _(""));
+   activatePrefsWindow(form_);
if (ret == 1)
changed();
else
@@ -2148,6 +2159,7 @@ void PrefFileformats::on_formatED_editingFinished()
 _("You cannot change a format's short name "
   "if the format is used by a converter. "
   "Please remove the converter first."));
+   activatePrefsWindow(form_);
updateView();
return;
}
@@ -2303,6 +2315,7 @@ void PrefFileformats::on_formatRemovePB_clicked()
Alert::error(_("Format in use"),
 _("Cannot remove a Format used by a Converter. "
"Remove the converter first."));
+   activatePrefsWindow(form_);
return;
}
 
@@ -2551,12 +2564,14 @@ void PrefUserInterface::applyRC(LyXRC & rc) const
uiStyleCO->currentIndex()).toString();
if (rc.ui_style != fromqstr(uistyle)) {
rc.ui_style = fromqstr(uistyle);
-   if (rc.ui_style == "default")
+   if (rc.ui_style == "default") {
// FIXME: This should work with 
frontend::GuiApplication::setStyle(QString())
//Qt bug 
https://bugreports.qt.io/browse/QTBUG-58268
frontend::Alert::warning(_("Restart needed"),
 _("Resetting the user 
interface style to 'Default'"
   " requires a restart of 
LyX."));
+   activatePrefsWindow(form_);
+   }
else
frontend::GuiApplication::setStyle(uistyle);
}
@@ -3312,6 +3327,7 @@ bool PrefShortcuts::validateNewShortcut(FuncRequest const 
& func,
if (func.action() == LFUN_UNKNOWN_ACTION) {
Alert::error(_("Failed to create shortcut"),
_("Unknown or invalid LyX function"));
+   activatePrefsWindow(form_);
return false;
}
 
@@ -3321,12 +3337,14 @@ bool PrefShortcuts::validateNewShortcut(FuncRequest 
const & func,
if (lyxaction.getActionType(func.action()) == LyXAction::Hidden) {
Alert::error(_("Failed to create shortcut"),
_("This LyX function is hidden and cannot be bound."));
+   activatePrefsWindow(form_);
return false;
}
 
if (k.length() == 0) {
Alert::error(_("Failed to create shortcut"),
_("Invalid or empty key sequence"));
+   activatePrefsWindow(form_);
return false;
}
 
@@ -3343,6 +3361,7 @@ bool PrefShortcuts::validateNewShortcut(FuncRequest const 
& func,
   
k.print(KeySequence::ForGui), new_action_string);
int ret = Alert::prompt(_("Redefine shortcut?"),
text, 0, 1, _(""), 
_(""));

[LyX/2.4.x] Improved copy operation for user directory contents of previous major releases

2024-04-13 Thread Stephan Witt
commit 5cc72815cc1e9659c40af694ab8c321dceb09f41
Author: Stephan Witt 
Date:   Thu Apr 11 18:30:29 2024 +0200

Improved copy operation for user directory contents of previous major 
releases

- avoid copying of configure.log
- avoid copying of chkconfig.ltx
  There is a report of a hang on first start of LyX with new major release.
  The removal of the chkconfig.ltx (leftover from early LyX versions) fixed 
the issue.

(cherry picked from commit 945a02e2e176e0f8fb9c599700c693032a01fa5d)
---
 lib/configure.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/configure.py b/lib/configure.py
index 80cc787230..df0251268a 100644
--- a/lib/configure.py
+++ b/lib/configure.py
@@ -157,8 +157,8 @@ def copy_tree(src, dst, preserve_symlinks=False, level=0):
 link_dest = os.readlink(src_name)
 os.symlink(link_dest, dst_name)
 outputs.append(dst_name)
-elif level == 0 and name == 'cache':
-logger.info("Skip cache %s", src_name)
+elif level == 0 and name in [ 'cache', 'configure.log', 
'chkconfig.ltx' ]:
+logger.info("Skip copy of %s", src_name)
 elif os.path.isdir(src_name):
 outputs.extend(
 copy_tree(src_name, dst_name, preserve_symlinks, level=(level 
+ 1)))
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] #12641 document the Qt fix in release notes

2024-04-11 Thread Stephan Witt
commit cad4da738da4eac220da363ed3ce0ab99cc48b5b
Author: Stephan Witt 
Date:   Thu Apr 11 23:26:26 2024 +0200

#12641 document the Qt fix in release notes
---
 lib/RELEASE-NOTES | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/RELEASE-NOTES b/lib/RELEASE-NOTES
index 3273085211..c8d7d2594f 100644
--- a/lib/RELEASE-NOTES
+++ b/lib/RELEASE-NOTES
@@ -327,8 +327,10 @@
 
 !!Known issues in version 2.4.0
 
-* Compiling LyX 2.4 on MacOS with Qt6 makes currently LyX unresponsive to 
-  Control-Command keyboard shortcuts (bug #12641).
+* Various versions Qt6 have a problem with key events handling (QTBUG-123848).
+  This issue is documented in bug #12641 (e.g. LyX is unresponsive to
+  Control-Command keyboard shortcuts).
+  The fix for the Qt bug is announced for Qt 6.7, 6.5 and 6.2.
 
 * Gnome environments defaulting to Wayland + mutter compositor might be missing
   proper window decorations. This is a generic problem which can be for 
Qt-based
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Add LyX-2.4 user directory to the list of candidates for copying on first run of LyX-2.5.

2024-04-11 Thread Stephan Witt
commit 2883cd4215c14a8eb935f805333fa955fb08f4e3
Author: Stephan Witt 
Date:   Thu Apr 11 18:31:51 2024 +0200

Add LyX-2.4 user directory to the list of candidates for copying on first 
run of LyX-2.5.
---
 lib/configure.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/configure.py b/lib/configure.py
index df0251268a..f414607c6f 100644
--- a/lib/configure.py
+++ b/lib/configure.py
@@ -180,7 +180,7 @@ def checkUpgrade():
 logger.info('Checking for upgrade from previous version.')
 parent = os.path.dirname(cwd)
 appname = basename[:(-len(version_suffix))]
-for version in ['-2.3', '-2.2', '-2.1', '-2.0', '-1.6' ]:
+for version in ['-2.4', '-2.3', '-2.2', '-2.1', '-2.0', '-1.6' ]:
 logger.debug('Checking for upgrade from previous version ' + 
version)
 previous = os.path.join(parent, appname + version)
 logger.debug('previous = ' + previous)
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Improved copy operation for user directory contents of previous major releases

2024-04-11 Thread Stephan Witt
commit 945a02e2e176e0f8fb9c599700c693032a01fa5d
Author: Stephan Witt 
Date:   Thu Apr 11 18:30:29 2024 +0200

Improved copy operation for user directory contents of previous major 
releases

- avoid copying of configure.log
- avoid copying of chkconfig.ltx
  There is a report of a hang on first start of LyX with new major release.
  The removal of the chkconfig.ltx (leftover from early LyX versions) fixed 
the issue.
---
 lib/configure.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/configure.py b/lib/configure.py
index 80cc787230..df0251268a 100644
--- a/lib/configure.py
+++ b/lib/configure.py
@@ -157,8 +157,8 @@ def copy_tree(src, dst, preserve_symlinks=False, level=0):
 link_dest = os.readlink(src_name)
 os.symlink(link_dest, dst_name)
 outputs.append(dst_name)
-elif level == 0 and name == 'cache':
-logger.info("Skip cache %s", src_name)
+elif level == 0 and name in [ 'cache', 'configure.log', 
'chkconfig.ltx' ]:
+logger.info("Skip copy of %s", src_name)
 elif os.path.isdir(src_name):
 outputs.extend(
 copy_tree(src_name, dst_name, preserve_symlinks, level=(level 
+ 1)))
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX features/biginset] #13049 add window activation for preferences to avoid it be hidden by main window on mac after alert prompts

2024-04-05 Thread Stephan Witt
commit 4c1db7cad866d99af2f2474d8467cc8581eb0eef
Author: Stephan Witt 
Date:   Fri Apr 5 10:47:49 2024 +0200

#13049 add window activation for preferences to avoid it be hidden by main 
window on mac after alert prompts
---
 src/frontends/qt/GuiPrefs.cpp | 29 +++--
 1 file changed, 23 insertions(+), 6 deletions(-)

diff --git a/src/frontends/qt/GuiPrefs.cpp b/src/frontends/qt/GuiPrefs.cpp
index d531dd4cde..230d377a2b 100644
--- a/src/frontends/qt/GuiPrefs.cpp
+++ b/src/frontends/qt/GuiPrefs.cpp
@@ -190,6 +190,16 @@ static void setComboxFont(QComboBox * cb, string const & 
family,
 }
 
 
+static void activatePrefsWindow(GuiPreferences * form_)
+{
+   if (guiApp->platformName() == "cocoa") {
+   QWidget * dialog_ = form_->asQWidget();
+   dialog_->raise();
+   dialog_->activateWindow();
+   }
+}
+
+
 /
 //
 // PrefOutput
@@ -1783,6 +1793,7 @@ void PrefConverters::on_needauthCB_toggled(bool checked)
int ret = frontend::Alert::prompt(
_("SECURITY WARNING!"), _("Unchecking this option has the 
effect that potentially harmful converters would be run without asking your 
permission first. This is UNSAFE and NOT recommended, unless you know what you 
are doing. Are you sure you would like to proceed? The recommended and safe 
answer is NO!"),
0, 0, _(""), _(""));
+   activatePrefsWindow(form_);
if (ret == 1)
changed();
else
@@ -2148,6 +2159,7 @@ void PrefFileformats::on_formatED_editingFinished()
 _("You cannot change a format's short name "
   "if the format is used by a converter. "
   "Please remove the converter first."));
+   activatePrefsWindow(form_);
updateView();
return;
}
@@ -2303,6 +2315,7 @@ void PrefFileformats::on_formatRemovePB_clicked()
Alert::error(_("Format in use"),
 _("Cannot remove a Format used by a Converter. "
"Remove the converter first."));
+   activatePrefsWindow(form_);
return;
}
 
@@ -2551,12 +2564,14 @@ void PrefUserInterface::applyRC(LyXRC & rc) const
uiStyleCO->currentIndex()).toString();
if (rc.ui_style != fromqstr(uistyle)) {
rc.ui_style = fromqstr(uistyle);
-   if (rc.ui_style == "default")
+   if (rc.ui_style == "default") {
// FIXME: This should work with 
frontend::GuiApplication::setStyle(QString())
//Qt bug 
https://bugreports.qt.io/browse/QTBUG-58268
frontend::Alert::warning(_("Restart needed"),
 _("Resetting the user 
interface style to 'Default'"
   " requires a restart of 
LyX."));
+   activatePrefsWindow(form_);
+   }
else
frontend::GuiApplication::setStyle(uistyle);
}
@@ -3312,6 +3327,7 @@ bool PrefShortcuts::validateNewShortcut(FuncRequest const 
& func,
if (func.action() == LFUN_UNKNOWN_ACTION) {
Alert::error(_("Failed to create shortcut"),
_("Unknown or invalid LyX function"));
+   activatePrefsWindow(form_);
return false;
}
 
@@ -3321,12 +3337,14 @@ bool PrefShortcuts::validateNewShortcut(FuncRequest 
const & func,
if (lyxaction.getActionType(func.action()) == LyXAction::Hidden) {
Alert::error(_("Failed to create shortcut"),
_("This LyX function is hidden and cannot be bound."));
+   activatePrefsWindow(form_);
return false;
}
 
if (k.length() == 0) {
Alert::error(_("Failed to create shortcut"),
_("Invalid or empty key sequence"));
+   activatePrefsWindow(form_);
return false;
}
 
@@ -3343,6 +3361,7 @@ bool PrefShortcuts::validateNewShortcut(FuncRequest const 
& func,
   
k.print(KeySequence::ForGui), new_action_string);
int ret = Alert::prompt(_("Redefine shortcut?"),
text, 0, 1, _(""), 
_(""));
+   activatePrefsWindow(form_);
if (ret != 0)
return false;

[LyX/master] #13049 add window activation for preferences to avoid it be hidden by main window on mac after alert prompts

2024-04-05 Thread Stephan Witt
commit 4c1db7cad866d99af2f2474d8467cc8581eb0eef
Author: Stephan Witt 
Date:   Fri Apr 5 10:47:49 2024 +0200

#13049 add window activation for preferences to avoid it be hidden by main 
window on mac after alert prompts
---
 src/frontends/qt/GuiPrefs.cpp | 29 +++--
 1 file changed, 23 insertions(+), 6 deletions(-)

diff --git a/src/frontends/qt/GuiPrefs.cpp b/src/frontends/qt/GuiPrefs.cpp
index d531dd4cde..230d377a2b 100644
--- a/src/frontends/qt/GuiPrefs.cpp
+++ b/src/frontends/qt/GuiPrefs.cpp
@@ -190,6 +190,16 @@ static void setComboxFont(QComboBox * cb, string const & 
family,
 }
 
 
+static void activatePrefsWindow(GuiPreferences * form_)
+{
+   if (guiApp->platformName() == "cocoa") {
+   QWidget * dialog_ = form_->asQWidget();
+   dialog_->raise();
+   dialog_->activateWindow();
+   }
+}
+
+
 /
 //
 // PrefOutput
@@ -1783,6 +1793,7 @@ void PrefConverters::on_needauthCB_toggled(bool checked)
int ret = frontend::Alert::prompt(
_("SECURITY WARNING!"), _("Unchecking this option has the 
effect that potentially harmful converters would be run without asking your 
permission first. This is UNSAFE and NOT recommended, unless you know what you 
are doing. Are you sure you would like to proceed? The recommended and safe 
answer is NO!"),
0, 0, _(""), _(""));
+   activatePrefsWindow(form_);
if (ret == 1)
changed();
else
@@ -2148,6 +2159,7 @@ void PrefFileformats::on_formatED_editingFinished()
 _("You cannot change a format's short name "
   "if the format is used by a converter. "
   "Please remove the converter first."));
+   activatePrefsWindow(form_);
updateView();
return;
}
@@ -2303,6 +2315,7 @@ void PrefFileformats::on_formatRemovePB_clicked()
Alert::error(_("Format in use"),
 _("Cannot remove a Format used by a Converter. "
"Remove the converter first."));
+   activatePrefsWindow(form_);
return;
}
 
@@ -2551,12 +2564,14 @@ void PrefUserInterface::applyRC(LyXRC & rc) const
uiStyleCO->currentIndex()).toString();
if (rc.ui_style != fromqstr(uistyle)) {
rc.ui_style = fromqstr(uistyle);
-   if (rc.ui_style == "default")
+   if (rc.ui_style == "default") {
// FIXME: This should work with 
frontend::GuiApplication::setStyle(QString())
//Qt bug 
https://bugreports.qt.io/browse/QTBUG-58268
frontend::Alert::warning(_("Restart needed"),
 _("Resetting the user 
interface style to 'Default'"
   " requires a restart of 
LyX."));
+   activatePrefsWindow(form_);
+   }
else
frontend::GuiApplication::setStyle(uistyle);
}
@@ -3312,6 +3327,7 @@ bool PrefShortcuts::validateNewShortcut(FuncRequest const 
& func,
if (func.action() == LFUN_UNKNOWN_ACTION) {
Alert::error(_("Failed to create shortcut"),
_("Unknown or invalid LyX function"));
+   activatePrefsWindow(form_);
return false;
}
 
@@ -3321,12 +3337,14 @@ bool PrefShortcuts::validateNewShortcut(FuncRequest 
const & func,
if (lyxaction.getActionType(func.action()) == LyXAction::Hidden) {
Alert::error(_("Failed to create shortcut"),
_("This LyX function is hidden and cannot be bound."));
+   activatePrefsWindow(form_);
return false;
}
 
if (k.length() == 0) {
Alert::error(_("Failed to create shortcut"),
_("Invalid or empty key sequence"));
+   activatePrefsWindow(form_);
return false;
}
 
@@ -3343,6 +3361,7 @@ bool PrefShortcuts::validateNewShortcut(FuncRequest const 
& func,
   
k.print(KeySequence::ForGui), new_action_string);
int ret = Alert::prompt(_("Redefine shortcut?"),
text, 0, 1, _(""), 
_(""));
+   activatePrefsWindow(form_);
if (ret != 0)
return false;

[LyX/2.3.x] Fix Disable Editing "Lock" icon protrudes into tab title on macOS

2024-03-17 Thread Stephan Witt
commit 58acfdf08600f7f269074ebf90cb18e60ed3dd02
Author: Daniel Ramoeller 
Date:   Mon Feb 22 11:04:10 2021 +0100

Fix Disable Editing "Lock" icon protrudes into tab title on macOS

On macOS the Disable Editing "Lock" icon protrudes into tab title

Also, since the close button is on the left, the lock is better positioned 
on the right.

The detour via QIcon is to avoid a pixelated pixmap (because in LyX pixmaps 
don't adjust by default to the device's pixel ratio correctly).

Also

Fix for bug #12160.

(cherry picked from commit fde432493d62607f8d6a3bd87adc1b1dcded75aa)
---
 src/frontends/qt4/GuiWorkArea.cpp | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/src/frontends/qt4/GuiWorkArea.cpp 
b/src/frontends/qt4/GuiWorkArea.cpp
index 731802087e..afb680e231 100644
--- a/src/frontends/qt4/GuiWorkArea.cpp
+++ b/src/frontends/qt4/GuiWorkArea.cpp
@@ -2142,10 +2142,21 @@ void TabWorkArea::updateTabTexts()
tab_text += "*";
QString tab_tooltip = it->abs();
if (buf.hasReadonlyFlag()) {
+#ifdef Q_OS_MAC
+   QLabel * readOnlyButton = new QLabel();
+   QIcon icon = QIcon(getPixmap("images/", 
"emblem-readonly", "svgz,png"));
+   readOnlyButton->setPixmap(icon.pixmap(QSize(16, 16)));
+   tabBar()->setTabButton(tab_index, QTabBar::RightSide, 
readOnlyButton);
+#else
setTabIcon(tab_index, QIcon(getPixmap("images/", 
"emblem-readonly", "svgz,png")));
+#endif
tab_tooltip = qt_("%1 (read only)").arg(tab_tooltip);
} else
+#ifdef Q_OS_MAC
+   tabBar()->setTabButton(tab_index, QTabBar::RightSide, 
0);
+#else
setTabIcon(tab_index, QIcon());
+#endif
if (buf.notifiesExternalModification()) {
QString const warn = qt_("%1 (modified externally)");
tab_tooltip = warn.arg(tab_tooltip);
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Avoid call of lilypond-book as python script if not on Windows

2024-01-28 Thread Stephan Witt
commit 3be3183eea8e92d78fa6c834cf67a992b75eead4
Author: Stephan Witt 
Date:   Mon Jan 29 07:59:48 2024 +0100

Avoid call of lilypond-book as python script if not on Windows
---
 lib/configure.py |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/lib/configure.py b/lib/configure.py
index 9dd69c3..80cc787 100644
--- a/lib/configure.py
+++ b/lib/configure.py
@@ -1377,6 +1377,13 @@ def checkConverterEntries():
 break
 else:
 logger.info('+  found LilyPond-book, but version %s is too 
old.' % version_number)
+else:
+logger.info('+  found LilyPond book, but version string does 
not match: %s' % version_string)
+
+# If not on Windows, skip the check as argument to python.
+if os.name != 'nt':
+break
+
 if not found_lilypond_book:
 logger.info('+  found LilyPond-book, but could not extract version 
number.')
 #
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] #11921 change default roman (serif) screen font

2023-08-23 Thread Stephan Witt
commit 7157e42044a1157b6b9e6f504af77730a4ecd538
Author: Stephan Witt 
Date:   Wed Aug 23 21:36:10 2023 +0200

#11921 change default roman (serif) screen font

The hard coded LyX default font (Times) doesn't work well on macOS.
The text seems to be shifted slightly upwards.
---
 development/MacOSX/lyxrc.dist.in |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/development/MacOSX/lyxrc.dist.in b/development/MacOSX/lyxrc.dist.in
index 4072f44..968288e 100644
--- a/development/MacOSX/lyxrc.dist.in
+++ b/development/MacOSX/lyxrc.dist.in
@@ -26,7 +26,7 @@ Format 24
 # SCREEN & FONTS SECTION 
 #
 
-\screen_font_roman "Times"
+\screen_font_roman "Times New Roman"
 \screen_font_sans "Helvetica"
 \screen_font_typewriter "Courier"
 \open_buffers_in_tabs false
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Amend change 5c8e3a5f0d - correct include directives

2023-08-18 Thread Stephan Witt
commit d409555bda9772a7f684cdd4701ada38231c3082
Author: Stephan Witt 
Date:   Fri Aug 18 12:51:40 2023 +0200

Amend change 5c8e3a5f0d - correct include directives
---
 src/frontends/qt/GuiProgress.cpp |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/frontends/qt/GuiProgress.cpp b/src/frontends/qt/GuiProgress.cpp
index 80ba8ae..4e35b58 100644
--- a/src/frontends/qt/GuiProgress.cpp
+++ b/src/frontends/qt/GuiProgress.cpp
@@ -13,7 +13,6 @@
 #include 
 
 #include "GuiProgress.h"
-#include "ui_ToggleWarningUi.h"
 
 #include "qt_helpers.h"
 
@@ -23,9 +22,10 @@
 #include "support/Systemcall.h"
 
 #include 
-#include 
+#include 
 #include 
 #include 
+#include 
 
 
 namespace lyx {
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] #11765 map Command-w like modern apps do - close current view - on Mac

2023-08-06 Thread Stephan Witt
commit 743c4c7e470065a3ba859e36856fd10a734234c4
Author: Stephan Witt 
Date:   Sun Aug 6 17:07:39 2023 +0200

#11765 map Command-w like modern apps do - close current view - on Mac
---
 lib/bind/mac.bind |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/bind/mac.bind b/lib/bind/mac.bind
index 7e4dc93..fb4770b 100644
--- a/lib/bind/mac.bind
+++ b/lib/bind/mac.bind
@@ -191,7 +191,7 @@ Format 5
 #  -: "Control-Command-V"# Apply formatting settings to the 
selected object (Paste Ruler Command)
 \bind "C-M-v""primary-selection-paste"
 #  +: "Command-W"# Close the frontmost window - modern 
applications map this to close tab or window if it's the last one
-\bind "C-w"  "buffer-close"
+\bind "C-w"  "view-close"
 #  +: "Shift-Command-W"  # Close a file and its associated windows 
- modern applications map this close window
 \bind "C-S-w""window-close"
 #  +: "Option-Command-W" # Close all windows in the application 
without quitting it
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] #12626 disable Ok button of shortcut editor when LFUN is empty

2023-08-05 Thread Stephan Witt
commit d656e01172a3f1189cc70386132d3d5221121d3d
Author: Stephan Witt 
Date:   Sun Aug 6 00:28:50 2023 +0200

#12626 disable Ok button of shortcut editor when LFUN is empty
---
 src/frontends/qt/GuiPrefs.cpp |8 
 src/frontends/qt/GuiPrefs.h   |5 +
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/frontends/qt/GuiPrefs.cpp b/src/frontends/qt/GuiPrefs.cpp
index 62ee814..9836086 100644
--- a/src/frontends/qt/GuiPrefs.cpp
+++ b/src/frontends/qt/GuiPrefs.cpp
@@ -2793,6 +2793,14 @@ GuiShortcutDialog::GuiShortcutDialog(QWidget * parent) : 
QDialog(parent)
Ui::shortcutUi::setupUi(this);
QDialog::setModal(true);
lfunLE->setValidator(new NoNewLineValidator(lfunLE));
+   on_lfunLE_textChanged();
+}
+
+
+void GuiShortcutDialog::on_lfunLE_textChanged()
+{
+   QPushButton * ok = buttonBox->button(QDialogButtonBox::Ok);
+   ok->setEnabled(!lfunLE->text().isEmpty());
 }
 
 
diff --git a/src/frontends/qt/GuiPrefs.h b/src/frontends/qt/GuiPrefs.h
index 9c25793..767b6a9 100644
--- a/src/frontends/qt/GuiPrefs.h
+++ b/src/frontends/qt/GuiPrefs.h
@@ -459,8 +459,13 @@ public Q_SLOTS:
 
 class GuiShortcutDialog : public QDialog, public Ui::shortcutUi
 {
+   Q_OBJECT
 public:
GuiShortcutDialog(QWidget * parent);
+
+public Q_SLOTS:
+   void on_lfunLE_textChanged();
+
 };
 
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] #10740 fix focus problems with color picker on Mac

2023-08-05 Thread Stephan Witt
commit 49fe82ec8ddf829aabeddb74cd51f1bef5b4df52
Author: Stephan Witt 
Date:   Sat Aug 5 15:23:44 2023 +0200

#10740 fix focus problems with color picker on Mac

- closing the color picker focuses the wrong (main) window
- to return focus to correct (parent) window it has to be activated 
explicitly
---
 src/frontends/qt/GuiBranches.cpp |4 ++--
 src/frontends/qt/GuiDialog.cpp   |   19 +++
 src/frontends/qt/GuiDialog.h |3 +++
 src/frontends/qt/GuiDocument.cpp |   13 -
 src/frontends/qt/GuiIndices.cpp  |4 ++--
 src/frontends/qt/GuiPrefs.cpp|3 +--
 6 files changed, 31 insertions(+), 15 deletions(-)

diff --git a/src/frontends/qt/GuiBranches.cpp b/src/frontends/qt/GuiBranches.cpp
index 79d1640..795a6f6 100644
--- a/src/frontends/qt/GuiBranches.cpp
+++ b/src/frontends/qt/GuiBranches.cpp
@@ -15,6 +15,7 @@
 
 #include "ColorCache.h"
 #include "GuiApplication.h"
+#include "GuiDialog.h"
 #include "Validator.h"
 #include "qt_helpers.h"
 
@@ -35,7 +36,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #ifdef KeyPress
 #undef KeyPress
@@ -341,7 +341,7 @@ void GuiBranches::toggleColor(QTreeWidgetItem * item)
else
guiApp->getRgbColor(lcolor.getFromLyXName(bcolor), rgbcol);
QColor const initial = rgb2qcolor(rgbcol);
-   QColor ncol = QColorDialog::getColor(initial, qApp->focusWidget());
+   QColor ncol = GuiDialog::getColor(initial, this);
if (!ncol.isValid())
return;
 
diff --git a/src/frontends/qt/GuiDialog.cpp b/src/frontends/qt/GuiDialog.cpp
index 67793df..186d9ea 100644
--- a/src/frontends/qt/GuiDialog.cpp
+++ b/src/frontends/qt/GuiDialog.cpp
@@ -21,6 +21,7 @@
 
 #include 
 #include 
+#include 
 
 using namespace std;
 
@@ -282,6 +283,24 @@ QString GuiDialog::browseRelToSub(
 }
 
 
+QColor GuiDialog::getColor(const QColor , QWidget *parent)
+{
+   const QColor color = QColorDialog::getColor(initial, parent);
+   if (guiApp->platformName() == "cocoa") {
+   QWidget * dialog = parent->window();
+   // On Mac explicitly activate the parents top-level widget
+   // See #10740
+   dialog->raise();
+   dialog->activateWindow();
+   }
+   return color;
+}
+
+QColor GuiDialog::getColor(const QColor )
+{
+   return getColor(initial, asQWidget());
+}
+
 } // namespace frontend
 } // namespace lyx
 
diff --git a/src/frontends/qt/GuiDialog.h b/src/frontends/qt/GuiDialog.h
index 50910f4..bd50df0 100644
--- a/src/frontends/qt/GuiDialog.h
+++ b/src/frontends/qt/GuiDialog.h
@@ -178,6 +178,9 @@ public:
QString const & label2 = QString(),
QString const & dir2 = QString());
 
+   static QColor getColor(const QColor , QWidget *parent);
+   QColor getColor(const QColor );
+
 private:
ButtonController bc_;
/// are we updating ?
diff --git a/src/frontends/qt/GuiDocument.cpp b/src/frontends/qt/GuiDocument.cpp
index e8c8c19..820fb24 100644
--- a/src/frontends/qt/GuiDocument.cpp
+++ b/src/frontends/qt/GuiDocument.cpp
@@ -73,7 +73,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -2293,8 +2292,7 @@ void GuiDocument::setCustomMargins(bool custom)
 
 void GuiDocument::changeBackgroundColor()
 {
-   QColor const & newColor = QColorDialog::getColor(
-   rgb2qcolor(set_backgroundcolor), asQWidget());
+   QColor const & newColor = getColor(rgb2qcolor(set_backgroundcolor));
if (!newColor.isValid())
return;
// set the color
@@ -2322,8 +2320,7 @@ void GuiDocument::deleteBackgroundColor()
 
 void GuiDocument::changeFontColor()
 {
-   QColor const & newColor = QColorDialog::getColor(
-   rgb2qcolor(set_fontcolor), asQWidget());
+   QColor const & newColor = getColor(rgb2qcolor(set_fontcolor));
if (!newColor.isValid())
return;
//  set the color
@@ -2351,8 +2348,7 @@ void GuiDocument::deleteFontColor()
 
 void GuiDocument::changeNoteFontColor()
 {
-   QColor const & newColor = QColorDialog::getColor(
-   rgb2qcolor(set_notefontcolor), asQWidget());
+   QColor const & newColor = getColor(rgb2qcolor(set_notefontcolor));
if (!newColor.isValid())
return;
// set the color
@@ -2378,8 +2374,7 @@ void GuiDocument::deleteNoteFontColor()
 
 void GuiDocument::changeBoxBackgroundColor()
 {
-   QColor const & newColor = QColorDialog::getColor(
-   rgb2qcolor(set_boxbgcolor), asQWidget());
+   QColor const & newColor = getColor(rgb2qcolor(set_boxbgcolor));
if (!newColor.isValid())
return;
// set the color
diff --git a/src/frontends/qt/GuiIndices.cpp b/src/frontends/qt/GuiIndices.cpp
index 5e145f5..6fa9cbc 100644
--- a/src/frontends/qt/GuiIndi

[LyX/master] #12576 improved file name chooser implementation for GUI dialogs

2023-08-05 Thread Stephan Witt
commit 65ec100f6a13c0ee9b6edecd2b81552373fa70a0
Author: Stephan Witt 
Date:   Sat Aug 5 08:56:35 2023 +0200

#12576 improved file name chooser implementation for GUI dialogs

- code reorganization to move the file name chooser methods in GuiDialog 
class
- on Mac add explicit raise of the current dialog window on close of the 
file browser to work around the bug 12576
---
 src/frontends/qt/GuiBibtex.cpp   |4 +-
 src/frontends/qt/GuiBibtex.h |4 +-
 src/frontends/qt/GuiCompare.cpp  |2 +-
 src/frontends/qt/GuiCompare.h|2 +-
 src/frontends/qt/GuiDialog.cpp   |  128 ++-
 src/frontends/qt/GuiDialog.h |   66 ++
 src/frontends/qt/GuiExternal.cpp |2 +-
 src/frontends/qt/GuiExternal.h   |2 +-
 src/frontends/qt/GuiGraphics.cpp |2 +-
 src/frontends/qt/GuiGraphics.h   |2 +-
 src/frontends/qt/GuiInclude.cpp  |2 +-
 src/frontends/qt/GuiInclude.h|2 +-
 src/frontends/qt/GuiPrefs.cpp|  140 --
 src/frontends/qt/GuiPrefs.h  |2 +-
 src/frontends/qt/qt_helpers.h|   41 ---
 15 files changed, 220 insertions(+), 181 deletions(-)

diff --git a/src/frontends/qt/GuiBibtex.cpp b/src/frontends/qt/GuiBibtex.cpp
index b9c928a..757c2c9 100644
--- a/src/frontends/qt/GuiBibtex.cpp
+++ b/src/frontends/qt/GuiBibtex.cpp
@@ -491,7 +491,7 @@ void GuiBibtex::applyView()
 }
 
 
-QString GuiBibtex::browseBib(QString const & in_name) const
+QString GuiBibtex::browseBib(QString const & in_name)
 {
QString const label1 = qt_("D");
QString const dir1 = toqstr(lyxrc.document_path);
@@ -501,7 +501,7 @@ QString GuiBibtex::browseBib(QString const & in_name) const
 }
 
 
-QString GuiBibtex::browseBst(QString const & in_name) const
+QString GuiBibtex::browseBst(QString const & in_name)
 {
QString const label1 = qt_("D");
QString const dir1 = toqstr(lyxrc.document_path);
diff --git a/src/frontends/qt/GuiBibtex.h b/src/frontends/qt/GuiBibtex.h
index 5d54be7..bd0a0ea 100644
--- a/src/frontends/qt/GuiBibtex.h
+++ b/src/frontends/qt/GuiBibtex.h
@@ -56,9 +56,9 @@ private:
void updateContents() override;
 
/// Browse for a .bib file
-   QString browseBib(QString const & in_name) const;
+   QString browseBib(QString const & in_name);
/// Browse for a .bst file
-   QString browseBst(QString const & in_name) const;
+   QString browseBst(QString const & in_name);
/// get the list of bst files
QStringList bibStyles() const;
/// get the list of bib files
diff --git a/src/frontends/qt/GuiCompare.cpp b/src/frontends/qt/GuiCompare.cpp
index e485ec0..7a58c7a 100644
--- a/src/frontends/qt/GuiCompare.cpp
+++ b/src/frontends/qt/GuiCompare.cpp
@@ -153,7 +153,7 @@ void GuiCompare::selectOldFile()
 }
 
 
-QString GuiCompare::browse(QString const & in_name) const
+QString GuiCompare::browse(QString const & in_name)
 {
QString const title = qt_("Select document");
 
diff --git a/src/frontends/qt/GuiCompare.h b/src/frontends/qt/GuiCompare.h
index e71a131..9538083 100644
--- a/src/frontends/qt/GuiCompare.h
+++ b/src/frontends/qt/GuiCompare.h
@@ -80,7 +80,7 @@ private:
void enableControls(bool enable);
 
/// browse for a file
-   QString browse(QString const & in_name) const;
+   QString browse(QString const & in_name);
/// retrieve the buffer from the specified filename
Buffer const * bufferFromFileName(std::string const & file) const;
 
diff --git a/src/frontends/qt/GuiDialog.cpp b/src/frontends/qt/GuiDialog.cpp
index 70d086c..67793df 100644
--- a/src/frontends/qt/GuiDialog.cpp
+++ b/src/frontends/qt/GuiDialog.cpp
@@ -10,12 +10,14 @@
 
 #include 
 
+#include "FileDialog.h"
+#include "GuiApplication.h"
 #include "GuiDialog.h"
-
 #include "GuiView.h"
 #include "qt_helpers.h"
 
 #include "support/debug.h"
+#include "support/filetools.h"
 
 #include 
 #include 
@@ -156,6 +158,130 @@ void GuiDialog::updateView()
setUpdatesEnabled(true);
 }
 
+QString GuiDialog::browseFile(QString const & filename,
+   QString const & title,
+   QStringList const & filters,
+   bool save,
+   QString const & label1,
+   QString const & dir1,
+   QString const & label2,
+   QString const & dir2,
+   QString const & fallback_dir)
+{
+   QString lastPath = ".";
+   if (!filename.isEmpty())
+   lastPath = onlyPath(filename);
+   else if(!fallback_dir.isEmpty())
+   lastPath = fallback_dir;
+
+   FileDialog dlg(title);
+   dlg.setButton1(label1, dir1);
+   dlg.setButton2(label2, dir2);
+
+   FileDialog::Result result;
+
+   if (save)
+   result = dlg.save(lastPath, filters, onlyFileName(

[LyX/master] #12001 make message boxes modal on Mac

2023-08-02 Thread Stephan Witt
commit 550c79215b16d89a7f849145520741ba3400f58b
Author: Stephan Witt 
Date:   Wed Aug 2 17:59:46 2023 +0200

#12001 make message boxes modal on Mac
---
 src/frontends/qt/GuiAlert.cpp |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/frontends/qt/GuiAlert.cpp b/src/frontends/qt/GuiAlert.cpp
index 288289c..30f55eb 100644
--- a/src/frontends/qt/GuiAlert.cpp
+++ b/src/frontends/qt/GuiAlert.cpp
@@ -113,6 +113,9 @@ buttonid doPrompt(docstring const & title, docstring const 
& question,
QMessageBox msg_box(QMessageBox::Information,
toqstr(title), toqstr(question),
QMessageBox::NoButton, qApp->focusWidget());
+#ifdef Q_OS_MAC
+   msg_box.setWindowModality(Qt::WindowModal);
+#endif
b[0] = msg_box.addButton(b1.empty() ? "OK" : toqstr(b1),
QMessageBox::ActionRole);
if (!b2.empty())
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] #12818 amend last change b924db72c5 - use c++ 11 compiler compatible code

2023-07-16 Thread Stephan Witt
commit c4195defe61a73afbf67a9250abf9126c4432c11
Author: Stephan Witt 
Date:   Sun Jul 16 17:11:38 2023 +0200

#12818 amend last change b924db72c5 - use c++ 11 compiler compatible code
---
 src/frontends/qt/GuiAlert.cpp |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/frontends/qt/GuiAlert.cpp b/src/frontends/qt/GuiAlert.cpp
index 85a5e22..288289c 100644
--- a/src/frontends/qt/GuiAlert.cpp
+++ b/src/frontends/qt/GuiAlert.cpp
@@ -109,6 +109,7 @@ buttonid doPrompt(docstring const & title, docstring const 
& question,
// FIXME replace that with guiApp->currentView()
//LYXERR0("FOCUS: " << qApp->focusWidget());
QPushButton * b[4] = { nullptr, nullptr, nullptr, nullptr };
+   const size_t numbuttons = sizeof(b)/sizeof(b[0]);
QMessageBox msg_box(QMessageBox::Information,
toqstr(title), toqstr(question),
QMessageBox::NoButton, qApp->focusWidget());
@@ -120,9 +121,9 @@ buttonid doPrompt(docstring const & title, docstring const 
& question,
b[2] = msg_box.addButton(toqstr(b3), QMessageBox::ActionRole);
if (!b4.empty())
b[3] = msg_box.addButton(toqstr(b4), QMessageBox::ActionRole);
-   if (default_button < size(b) && nullptr != b[default_button])
+   if (default_button < numbuttons && nullptr != b[default_button])
msg_box.setDefaultButton(b[default_button]);
-   if (cancel_button < size(b) && nullptr != b[cancel_button])
+   if (cancel_button < numbuttons && nullptr != b[cancel_button])
msg_box.setEscapeButton(static_cast(b[cancel_button]));
msg_box.exec();
const QAbstractButton * button = msg_box.clickedButton();
@@ -138,7 +139,7 @@ buttonid doPrompt(docstring const & title, docstring const 
& question,
return res;
else {
// Convert selection of the button into an integer
-   for (size_t i = 0; i < size(b); i++) {
+   for (size_t i = 0; i < numbuttons; i++) {
if (button == b[i]) {
res = i;
break;
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] #12818 correct evaluation of message box result info

2023-07-16 Thread Stephan Witt
commit b924db72c5bc7e194d1b6a2b0e55f0427fa366b6
Author: Stephan Witt 
Date:   Sun Jul 16 16:48:49 2023 +0200

#12818 correct evaluation of message box result info

The help page of int QMessageBox::exec() 
(​https://doc.qt.io/qt-6/qmessagebox.html#exec) says:
When using a QMessageBox with standard buttons, this function returns a 
StandardButton value indicating the standard button that was clicked.
When using QMessageBox with custom buttons, this function returns an opaque 
value; use clickedButton() to determine which button was clicked.
---
 src/frontends/alert.h |6 --
 src/frontends/qt/GuiAlert.cpp |   36 +---
 2 files changed, 29 insertions(+), 13 deletions(-)

diff --git a/src/frontends/alert.h b/src/frontends/alert.h
index 20da436..a4556ca 100644
--- a/src/frontends/alert.h
+++ b/src/frontends/alert.h
@@ -19,6 +19,8 @@ namespace lyx {
 namespace frontend {
 namespace Alert {
 
+typedef unsigned short buttonid;
+
 /**
  * Prompt for a question. Returns 0-3 for the chosen button.
  * Set default_button and cancel_button to reasonable values. b1-b3
@@ -30,8 +32,8 @@ namespace Alert {
  * "Yes" or "No", I will personally come around to your house and
  * slap you with fish, and not in an enjoyable way either.
  */
-int prompt(docstring const & title, docstring const & question,
-  int default_button, int cancel_button,
+buttonid prompt(docstring const & title, docstring const & question,
+  buttonid default_button, buttonid cancel_button,
   docstring const & b0, docstring const & b1,
   docstring const & b2 = empty_docstring(),
   docstring const & b3 = empty_docstring());
diff --git a/src/frontends/qt/GuiAlert.cpp b/src/frontends/qt/GuiAlert.cpp
index 93b8e1d..85a5e22 100644
--- a/src/frontends/qt/GuiAlert.cpp
+++ b/src/frontends/qt/GuiAlert.cpp
@@ -75,8 +75,8 @@ docstring toPlainText(docstring const & msg)
 }
 
 
-int doPrompt(docstring const & title, docstring const & question,
- int default_button, int cancel_button,
+buttonid doPrompt(docstring const & title, docstring const & question,
+ buttonid default_button, buttonid cancel_button,
  docstring const & b1, docstring const & b2,
  docstring const & b3, docstring const & b4)
 {
@@ -108,7 +108,7 @@ int doPrompt(docstring const & title, docstring const & 
question,
 
// FIXME replace that with guiApp->currentView()
//LYXERR0("FOCUS: " << qApp->focusWidget());
-   QPushButton * b[4] = { 0, 0, 0, 0 };
+   QPushButton * b[4] = { nullptr, nullptr, nullptr, nullptr };
QMessageBox msg_box(QMessageBox::Information,
toqstr(title), toqstr(question),
QMessageBox::NoButton, qApp->focusWidget());
@@ -120,23 +120,37 @@ int doPrompt(docstring const & title, docstring const & 
question,
b[2] = msg_box.addButton(toqstr(b3), QMessageBox::ActionRole);
if (!b4.empty())
b[3] = msg_box.addButton(toqstr(b4), QMessageBox::ActionRole);
-   msg_box.setDefaultButton(b[default_button]);
-   msg_box.setEscapeButton(static_cast(b[cancel_button]));
-   int res = msg_box.exec();
+   if (default_button < size(b) && nullptr != b[default_button])
+   msg_box.setDefaultButton(b[default_button]);
+   if (cancel_button < size(b) && nullptr != b[cancel_button])
+   msg_box.setEscapeButton(static_cast(b[cancel_button]));
+   msg_box.exec();
+   const QAbstractButton * button = msg_box.clickedButton();
 
qApp->restoreOverrideCursor();
 
if (long_op)
theApp()->startLongOperation();
 
-   // Qt bug: can return -1 on cancel or WM close, despite the docs.
-   if (res == -1)
-   res = cancel_button;
+   size_t res = cancel_button;
+
+   if (button == nullptr)
+   return res;
+   else {
+   // Convert selection of the button into an integer
+   for (size_t i = 0; i < size(b); i++) {
+   if (button == b[i]) {
+   res = i;
+   break;
+   }
+   }
+   }
+
return res;
 }
 
-int prompt(docstring const & title, docstring const & question,
- int default_button, int cancel_button,
+buttonid prompt(docstring const & title, docstring const & question,
+ buttonid default_button, buttonid cancel_button,
  docstring const & b0, docstring const & b1,
  docstring const & b2, docstring const & b3)
 {
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Improved LYX_BUILD_TYPE detection for cmake - case insensitive AC_INIT processing

2023-06-19 Thread Stephan Witt
commit f88986eff5aedf6cce5832b0f5028124e72482a4
Author: Stephan Witt 
Date:   Mon Jun 19 08:00:08 2023 +0200

Improved LYX_BUILD_TYPE detection for cmake - case insensitive AC_INIT 
processing
---
 development/cmake/modules/LyXMacros.cmake |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/development/cmake/modules/LyXMacros.cmake 
b/development/cmake/modules/LyXMacros.cmake
index 501da11..e221af1 100644
--- a/development/cmake/modules/LyXMacros.cmake
+++ b/development/cmake/modules/LyXMacros.cmake
@@ -430,12 +430,13 @@ function(determineversionandbuildtype configfile package 
version dirs date build
   setstripped(PACKAGE_VERSION ${_PV})
   setstripped(PACKAGE_BUGREPORT ${_PBU})
   set(${package} ${PACKAGE_BASE} ${PACKAGE_VERSION} ${PACKAGE_BUGREPORT} 
PARENT_SCOPE)
-  if(PACKAGE_VERSION MATCHES 
"^\([0-9]+\)\\.\([0-9]+\)\(\\.\([0-9]+\)\(\\.\([0-9]+\)\)?\)?-?\([a-z]*[0-9]*\).*$")
+  if(PACKAGE_VERSION MATCHES 
"^\([0-9]+\)\\.\([0-9]+\)\(\\.\([0-9]+\)\(\\.\([0-9]+\)\)?\)?-?\([A-Za-z]*[0-9]*\).*$")
 set(LYX_MAJOR_VERSION ${CMAKE_MATCH_1})
 set(LYX_MINOR_VERSION ${CMAKE_MATCH_2})
 set(LYX_RELEASE_LEVEL ${CMAKE_MATCH_4})
 set(LYX_RELEASE_PATCH ${CMAKE_MATCH_6})
-set(LYX_BUILD_TYPE ${CMAKE_MATCH_7})
+set(LYX_BUILD_TYPE_MATCH ${CMAKE_MATCH_7})
+string(TOLOWER "${LYX_BUILD_TYPE_MATCH}" LYX_BUILD_TYPE)
 set(LYX_DIR_VER "LYX_DIR_${CMAKE_MATCH_1}${CMAKE_MATCH_2}x")
 set(LYX_USERDIR_VER "LYX_USERDIR_${CMAKE_MATCH_1}${CMAKE_MATCH_2}x")
 if (NOT LYX_RELEASE_LEVEL)
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Properly uncheck insert table toolbutton

2023-06-18 Thread Stephan Witt
commit ca5a75b23e88ec40ecf13acbae09ecaf3f0253e5
Author: Daniel Ramoeller 
Date:   Sat Jun 10 10:22:26 2023 +0200

Properly uncheck insert table toolbutton

Fix for bug #12801
---
 src/frontends/qt/InsertTableWidget.cpp |7 +++
 src/frontends/qt/InsertTableWidget.h   |1 +
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/frontends/qt/InsertTableWidget.cpp 
b/src/frontends/qt/InsertTableWidget.cpp
index 07ae061..325c053 100644
--- a/src/frontends/qt/InsertTableWidget.cpp
+++ b/src/frontends/qt/InsertTableWidget.cpp
@@ -63,6 +63,13 @@ void InsertTableWidget::show(bool show)
 }
 
 
+void InsertTableWidget::hideEvent(QHideEvent * event)
+{
+   QWidget::hideEvent(event);
+   visible(false);
+}
+
+
 void InsertTableWidget::resetGeometry()
 {
QPoint p = 
parentWidget()->mapToGlobal(parentWidget()->geometry().bottomLeft());
diff --git a/src/frontends/qt/InsertTableWidget.h 
b/src/frontends/qt/InsertTableWidget.h
index 5e2e244..4917392 100644
--- a/src/frontends/qt/InsertTableWidget.h
+++ b/src/frontends/qt/InsertTableWidget.h
@@ -41,6 +41,7 @@ protected Q_SLOTS:
void mouseReleaseEvent(QMouseEvent *) override;
void mousePressEvent(QMouseEvent *) override;
void paintEvent(QPaintEvent *) override;
+   void hideEvent(QHideEvent * event);
 
 private:
//! update the geometry
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/2.3.x] #12523 check for existence of usable Python interpreter

2023-06-14 Thread Stephan Witt
commit b2a026fbf76e82f50adf8c921a36e40ba38b5413
Author: Stephan Witt 
Date:   Wed Jun 14 12:00:41 2023 +0200

#12523 check for existence of usable Python interpreter

Backport of change bbc2270

- present appropriate alert message in case of missing Python
- add the option to quit LyX immediately
- recheck for Python interpreter on reconfigure if it was missing
---
 src/LyX.cpp |   26 +++---
 src/support/Package.cpp |4 ++--
 src/support/os.cpp  |6 ++
 src/support/os.h|3 +++
 4 files changed, 34 insertions(+), 5 deletions(-)

diff --git a/src/LyX.cpp b/src/LyX.cpp
index 4e97f7a..6888388 100644
--- a/src/LyX.cpp
+++ b/src/LyX.cpp
@@ -585,10 +585,11 @@ void LyX::execCommands()
 {
// The advantage of doing this here is that the event loop
// is already started. So any need for interaction will be
-   // aknowledged.
+   // acknowledged.
 
// if reconfiguration is needed.
-   if (LayoutFileList::get().empty()) {
+   const bool noLayouts = LayoutFileList::get().empty();
+   if (noLayouts && os::hasPython()) {
switch (Alert::prompt(
_("No textclass is found"),
_("LyX will only have minimal functionality because no 
textclasses "
@@ -597,7 +598,8 @@ void LyX::execCommands()
0, 2,
_(""),
_(" LaTeX"),
-   _("")))
+   _(""),
+   _(" LyX")))
{
case 0:
// regular reconfigure
@@ -608,6 +610,24 @@ void LyX::execCommands()
lyx::dispatch(FuncRequest(LFUN_RECONFIGURE,
" --without-latex-config"));
break;
+   case 3:
+   lyx::dispatch(FuncRequest(LFUN_LYX_QUIT, ""));
+   return;
+   default:
+   break;
+   }
+   } else if (noLayouts) {
+   switch (Alert::prompt(
+   _("No python is found"),
+   _("LyX will only have minimal functionality because no 
python interpreter "
+   "has been found. Consider download and install 
of an python interpreter."),
+   0, 1,
+   _(""),
+   _(" LyX")))
+   {
+   case 1:
+   lyx::dispatch(FuncRequest(LFUN_LYX_QUIT, ""));
+   return;
default:
break;
}
diff --git a/src/support/Package.cpp b/src/support/Package.cpp
index 8b6fa0b..df8e57e 100644
--- a/src/support/Package.cpp
+++ b/src/support/Package.cpp
@@ -158,9 +158,9 @@ Package::Package(string const & command_line_arg0,
 
 int Package::reconfigureUserLyXDir(string const & option) const
 {
-   if (configure_command_.empty()) {
+   if (configure_command_.empty() || !os::hasPython()) {
FileName const 
configure_script(addName(system_support().absFileName(), "configure.py"));
-   configure_command_ = os::python() + ' ' +
+   configure_command_ = os::python(true) + ' ' +
quoteName(configure_script.toFilesystemEncoding()) +
with_version_suffix() + " --binary-dir=" +

quoteName(FileName(binary_dir().absFileName()).toFilesystemEncoding());
diff --git a/src/support/os.cpp b/src/support/os.cpp
index ec84ed1..6c9a4a9 100644
--- a/src/support/os.cpp
+++ b/src/support/os.cpp
@@ -104,6 +104,12 @@ string const python(bool reset)
return command;
 }
 
+
+bool hasPython()
+{
+   return !(python23(python()).empty());
+}
+
 } // namespace os
 } // namespace support
 } // namespace lyx
diff --git a/src/support/os.h b/src/support/os.h
index 9b38e4e..0492bb3 100644
--- a/src/support/os.h
+++ b/src/support/os.h
@@ -62,6 +62,9 @@ int timeout_min();
 /// @param reset True if the python path should be recomputed
 std::string const python(bool reset = false);
 
+/// Check for availability of the python interpreter
+bool hasPython();
+
 ///
 bool isFilesystemCaseSensitive();
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] macOS - Improved source validation on copying of Qt frameworks to app bundle.

2023-06-14 Thread Stephan Witt
commit 789da12d318e74817b35790aa44553cf0fa5960a
Author: Stephan Witt 
Date:   Wed Jun 14 08:17:10 2023 +0200

macOS - Improved source validation on copying of Qt frameworks to app 
bundle.
---
 development/LyX-Mac-binary-release.sh |   66 ++---
 1 files changed, 36 insertions(+), 30 deletions(-)

diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index c983beb..8bac701 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -803,41 +803,47 @@ EOF
cp -p "${libname}" "${condir}/PlugIns/${dirname}"
done
fi
+   echo Copy frameworks ${QtLibraries} ...
for libnm in ${QtLibraries} ; do
fwdir=$(framework_name "$libnm")
dirname=$(dirname "${fwdir}")
mkdir -p "${condir}/${dirname}"
dirname=$(basename "${fwdir}")
-   test -d "${condir}/${fwdir}" || (
-   echo Copy framework "${source}/lib/"$(basename 
"${fwdir}")
-   cp -pR "${source}/lib/"$(basename "${fwdir}") 
"${condir}/${fwdir}"
-   rm -f "${condir}/${fwdir}/${libnm}"_debug 
"${condir}/${fwdir}/${version}${libnm}"_debug
-   test -f "${condir}/${fwdir}/${libnm}".prl && mv 
"${condir}/${fwdir}/${libnm}".prl "${condir}/${fwdir}"/Resources
-   test -f "${condir}/${fwdir}/${libnm}"_debug.prl && mv 
"${condir}/${fwdir}/${libnm}"_debug.prl "${condir}/${fwdir}"/Resources
-   installname -id 
"@executable_path/../${fwdir}/${version}${libnm}" 
"${condir}/${fwdir}/${version}${libnm}"
-   find "${condir}/PlugIns" "${condir}/"$(dirname 
"${fwdir}") -name Headers -prune -o -type f -print | while read filename ; do
-   if [ "${filename}" != "${target}" ]; then
-   otool -L "${filename}" 2>/dev/null | 
sort -u | while read library ; do
-   # pattern match for: 
/path/to/qt/lib/QtGui.framework/Versions/4/QtGui (compatibility version 4.6.0, 
current version 4.6.2)
-   case "${library}" in
-   
*@rpath/*"${libnm}"*"("*version*")"*)
-   # echo rpath based name 
for ${libnm} is ok.
-   ;;
-   *"${libnm}"*"("*version*")"*)
-   installname -change\
-   
"${source}/lib/${dirname}/${version}${libnm}"\
-   
"@executable_path/../${fwdir}/${version}${libnm}"\
-   "${filename}"
-   ;;
-   esac
-   done
-   fi
-   done
-   )
-   installname -change\
-   "${source}/lib/${dirname}/${version}${libnm}"\
-   "@executable_path/../${fwdir}/${version}${libnm}"\
-   "${target}"
+   libpath="${source}/lib/${dirname}"
+   if [ -d "${libpath}" ]; then
+   test -d "${condir}/${fwdir}" || (
+   echo Copy framework "${libpath}"
+   cp -pR "${libpath}" "${condir}/${fwdir}"
+   rm -f "${condir}/${fwdir}/${libnm}"_debug 
"${condir}/${fwdir}/${version}${libnm}"_debug
+   test -f "${condir}/${fwdir}/${libnm}".prl && mv 
"${condir}/${fwdir}/${libnm}".prl "${condir}/${fwdir}"/Resources
+   test -f "${condir}/${fwdir}/${libnm}"_debug.prl 
&& mv "${condir}/${fwdir}/${libnm}"_debug.prl "${condir}/${fwdir}"/Resources
+   installname -id 
"@executable_path/../${fwdir}/${version}${libnm}" 
"${condir}/${fwdir}/${version}${libnm}"
+   find "${condir}/PlugIns" "${con

[LyX/master] macOS - Remove QtCore5Compat reference from list of frameworks to copy into app bundle

2023-06-14 Thread Stephan Witt
commit 0763fc197a38f39c076a144c2a0be4d8af656f09
Author: Stephan Witt 
Date:   Wed Jun 14 08:19:34 2023 +0200

macOS - Remove QtCore5Compat reference from list of frameworks to copy into 
app bundle
---
 development/LyX-Mac-binary-release.sh |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index 8bac701..179ed5d 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -371,7 +371,7 @@ case "${QtVersion}" in
QtFrameworkVersion="5"
;;
 6*)
-   QtLibraries=${QtLibraries:-"QtCore5Compat QtDBus QtSvg QtXml 
QtPrintSupport QtSvgWidgets QtWidgets QtGui QtNetwork QtConcurrent QtCore"}
+   QtLibraries=${QtLibraries:-"QtDBus QtSvg QtXml QtPrintSupport 
QtSvgWidgets QtWidgets QtGui QtNetwork QtConcurrent QtCore"}
QtFrameworkVersion="A"
case "${EnableCXXMode}" in
--enable-cxx11|--enable-cxx-mode=11)
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] #12769 correct line width based painting of wavy underline

2023-05-14 Thread Stephan Witt
commit ac286e54b7dcdd7fdde46359e1b859e0c1ba54f7
Author: Stephan Witt 
Date:   Mon May 15 07:06:44 2023 +0200

#12769 correct line width based painting of wavy underline

With very tiny fonts the line width is 0 and the loop to construct the wavy 
line never ends.
---
 src/frontends/qt/GuiPainter.cpp |   11 ++-
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/frontends/qt/GuiPainter.cpp b/src/frontends/qt/GuiPainter.cpp
index a64d006..62e48c4 100644
--- a/src/frontends/qt/GuiPainter.cpp
+++ b/src/frontends/qt/GuiPainter.cpp
@@ -546,11 +546,12 @@ void GuiPainter::wavyHorizontalLine(FontInfo const & f, 
int x, int y, int width,
 {
FontMetrics const & fm = theFontMetrics(f);
int const pos = fm.underlinePos();
+   int const lw = max(1, fm.lineWidth());
 
-   setQPainterPen(computeColor(col), line_solid, fm.lineWidth());
-   int const step = 2 * fm.lineWidth();
+   setQPainterPen(computeColor(col), line_solid, lw);
+   int const step = 2 * lw;
int const xend = x + width;
-   int height = 1 * fm.lineWidth();
+   int height = lw;
//FIXME: I am not sure if Antialiasing gives the best effect.
//setRenderHint(Antialiasing, true);
QVector points;
@@ -560,8 +561,8 @@ void GuiPainter::wavyHorizontalLine(FontInfo const & f, int 
x, int y, int width,
points.append(QPoint(x + step, y + pos + height));
x += step;
points.append(QPoint(x, (qreal)y + pos + height));
-   points.append(QPoint(x + step/2, y + pos + height));
-   x += step/2;
+   points.append(QPoint(x + lw, y + pos + height));
+   x += lw;
}
drawPolyline(points);
//setRenderHint(Antialiasing, false);
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] #12523 check for existence of usable Python interpreter

2023-01-05 Thread Stephan Witt
commit bbc2270972cfbb1aa11836498c8a6c73be91f18d
Author: Stephan Witt 
Date:   Fri Jan 6 00:32:09 2023 +0100

#12523 check for existence of usable Python interpreter

- present appropriate alert message in case of missing Python
- add the option to quit LyX immediately
- recheck for Python interpreter on reconfigure if it was missing
---
 src/LyX.cpp |   26 +++---
 src/support/Package.cpp |4 ++--
 src/support/os.cpp  |6 ++
 src/support/os.h|3 +++
 4 files changed, 34 insertions(+), 5 deletions(-)

diff --git a/src/LyX.cpp b/src/LyX.cpp
index fc2f871..2a7cba3 100644
--- a/src/LyX.cpp
+++ b/src/LyX.cpp
@@ -581,10 +581,11 @@ void LyX::execCommands()
 {
// The advantage of doing this here is that the event loop
// is already started. So any need for interaction will be
-   // aknowledged.
+   // acknowledged.
 
// if reconfiguration is needed.
-   if (LayoutFileList::get().empty()) {
+   const bool noLayouts = LayoutFileList::get().empty();
+   if (noLayouts && os::hasPython()) {
switch (Alert::prompt(
_("No textclass is found"),
_("LyX will only have minimal functionality because no 
textclasses "
@@ -593,7 +594,8 @@ void LyX::execCommands()
0, 2,
_(""),
_(" LaTeX"),
-   _("")))
+   _(""),
+   _(" LyX")))
{
case 0:
// regular reconfigure
@@ -604,6 +606,24 @@ void LyX::execCommands()
lyx::dispatch(FuncRequest(LFUN_RECONFIGURE,
" --without-latex-config"));
break;
+   case 3:
+   lyx::dispatch(FuncRequest(LFUN_LYX_QUIT, ""));
+   return;
+   default:
+   break;
+   }
+   } else if (noLayouts) {
+   switch (Alert::prompt(
+   _("No python is found"),
+   _("LyX will only have minimal functionality because no 
python interpreter "
+   "has been found. Consider download and install 
of an python interpreter."),
+   0, 1,
+   _(""),
+   _(" LyX")))
+   {
+   case 1:
+   lyx::dispatch(FuncRequest(LFUN_LYX_QUIT, ""));
+   return;
default:
break;
}
diff --git a/src/support/Package.cpp b/src/support/Package.cpp
index 400bf15..ffc1395 100644
--- a/src/support/Package.cpp
+++ b/src/support/Package.cpp
@@ -159,9 +159,9 @@ Package::Package(string const & command_line_arg0,
 
 int Package::reconfigureUserLyXDir(string const & option) const
 {
-   if (configure_command_.empty()) {
+   if (configure_command_.empty() || !os::hasPython()) {
FileName const 
configure_script(addName(system_support().absFileName(), "configure.py"));
-   configure_command_ = os::python() + ' ' +
+   configure_command_ = os::python(true) + ' ' +
quoteName(configure_script.toFilesystemEncoding()) +
with_version_suffix() + " --binary-dir=" +

quoteName(FileName(binary_dir().absFileName()).toFilesystemEncoding());
diff --git a/src/support/os.cpp b/src/support/os.cpp
index cafe4b1..abb9ec6 100644
--- a/src/support/os.cpp
+++ b/src/support/os.cpp
@@ -191,6 +191,12 @@ string const python(bool reset)
return command;
 }
 
+
+bool hasPython()
+{
+   return !(python23_call(python()).empty());
+}
+
 } // namespace os
 } // namespace support
 } // namespace lyx
diff --git a/src/support/os.h b/src/support/os.h
index d89af7d..a96791d 100644
--- a/src/support/os.h
+++ b/src/support/os.h
@@ -62,6 +62,9 @@ int timeout_ms();
 /// @param reset True if the python path should be recomputed
 std::string const python(bool reset = false);
 
+/// Check for availbility of the python interpreter
+bool hasPython();
+
 ///
 bool isFilesystemCaseSensitive();
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Care for Qt5 LTS support for macos

2022-12-30 Thread Stephan Witt
commit 102a68dd6a7abe5a68df58a6b7f29bc467e53f06
Author: Stephan Witt 
Date:   Fri Dec 30 23:37:43 2022 +0100

Care for Qt5 LTS support for macos
---
 development/LyX-Mac-binary-release.sh |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index 237d546..c983beb 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -362,7 +362,7 @@ case "${QtVersion}" in
QtLibraries=${QtLibraries:-"QtSvg QtXml QtPrintSupport QtWidgets QtGui 
QtNetwork QtConcurrent QtCore"}
QtFrameworkVersion="5"
;;
-5.12.*)
+5.1[2-5].*)
QtLibraries=${QtLibraries:-"QtDBus QtSvg QtXml QtPrintSupport 
QtMacExtras QtWidgets QtGui QtNetwork QtConcurrent QtCore"}
QtFrameworkVersion="5"
;;
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Care for weird Qt6 package install location of developer tools (moc, uic etc).

2022-12-30 Thread Stephan Witt
commit a10844a531eb0a2a28155ead79ccf2919d452e5f
Author: Stephan Witt 
Date:   Fri Dec 30 12:08:43 2022 +0100

Care for weird Qt6 package install location of developer tools (moc, uic 
etc).
---
 development/LyX-Mac-binary-release.sh |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index 47b9d95..237d546 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -716,6 +716,7 @@ build_lyx() {
echo CPPFLAGS="${CPPFLAGS}"
export CPPFLAGS
echo CONFIGURE_OPTIONS="${LyXConfigureOptions}" 
${QtInstallDir:+"--with-qt-dir=${QtInstallDir}"}
+   export PATH="${QtInstallDir}/libexec:$PATH"
"${LyxSourceDir}/configure"\
--prefix="${LyxAppPrefix}" 
--with-version-suffix="-${LyXVersionSuffix}"\
${QtInstallDir:+"--with-qt-dir=${QtInstallDir}"} \
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Make code sign operation the final step of package build.

2022-12-30 Thread Stephan Witt
commit cc607af469dbc982d6b29d29412f2e8a202c2b8b
Author: Stephan Witt 
Date:   Fri Dec 30 12:07:20 2022 +0100

Make code sign operation the final step of package build.
---
 development/LyX-Mac-binary-release.sh |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index f2683fe..47b9d95 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -1096,7 +1096,7 @@ if [ ${LyxOnlyPackage:-"no"} = "no" ]; then
build_lyx
convert_universal
copy_dictionaries
-   test -n "${CODESIGN_IDENTITY}" && code_sign "${LYX_BUNDLE_PATH}"
find "${LyxAppPrefix}" -type d -exec chmod go-w '{}' \;
+   test -n "${CODESIGN_IDENTITY}" && code_sign "${LYX_BUNDLE_PATH}"
 fi
 build_package
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Add missing parts for the creation of the resolution independent multi-image TIFF as disk image background.

2022-12-16 Thread Stephan Witt
commit 12e22708aabf706451b8435c501190dc35ca30e3
Author: Stephan Witt 
Date:   Fri Dec 16 16:10:34 2022 +0100

Add missing parts for the creation of the resolution independent 
multi-image TIFF as disk image background.
---
 development/LyX-Mac-binary-release.sh |   11 +++
 development/MacOSX/Makefile.am|2 +-
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index d2503ec..f2683fe 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -1012,15 +1012,18 @@ EOF
 # The image was made with with inkscape and tiffutil from dmg-background.svgz
 make_image() {
INKSCAPE=/Applications/Inkscape.app/Contents/MacOS/inkscape
-   cd "${LyxSourceDir}"/development/MacOSX
-   ${INKSCAPE} --export-type=png -w 560 -o dmg-background.png 
dmg-background.svgz
-   ${INKSCAPE} --export-type=png -w 1120 -o dmg-backgro...@2x.png 
dmg-background.svgz
-   tiffutil -cathidpicheck dmg-background.png dmg-backgro...@2x.png -out 
dmg-background.tiff
+   (
+   cd "${LyxSourceDir}"/development/MacOSX
+   test -x ${INKSCAPE} && ${INKSCAPE} --export-type=png -w 560 -o 
dmg-background.png dmg-background.svgz
+   test -x ${INKSCAPE} && ${INKSCAPE} --export-type=png -w 1120 -o 
dmg-backgro...@2x.png dmg-background.svgz
+   tiffutil -cathidpicheck dmg-background.png 
dmg-backgro...@2x.png -out dmg-background.tiff
+   )
 }
 
 make_dmg() {
cd "${1}"
 
+   test -f "${DmgBackground}" || make_image
BGSIZE=$(file "$DmgBackground" | awk -F , '/TIFF/{ print $10 $4 
;}/PNG/{ print $2; }'|sed -e 's/width=//' -e 's/height=//' -e 's/x//')
BG_W=$(echo ${BGSIZE} | awk '{print $1 }')
BG_H=$(echo ${BGSIZE} | awk '{print $2 }')
diff --git a/development/MacOSX/Makefile.am b/development/MacOSX/Makefile.am
index 2dfb970..ba8b29f 100644
--- a/development/MacOSX/Makefile.am
+++ b/development/MacOSX/Makefile.am
@@ -10,7 +10,7 @@ nodist_bundle_DATA = Info.plist
 
 dist_bin_SCRIPTS = lyxeditor maxima inkscape lilypond lilypond-book
 
-dist_pkgdata_DATA = COPYING LyXapp.icns LyX.icns LyX.sdef dmg-background.png
+dist_pkgdata_DATA = COPYING LyXapp.icns LyX.icns LyX.sdef dmg-background.png 
dmg-backgro...@2x.png dmg-background.svgz
 nodist_pkgdata_DATA = lyxrc.dist
 
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/2.3.x] Add macOS 11 to SDK detection for builds on Mac

2022-12-15 Thread Stephan Witt
commit f4cd2e863bd0db9f9f8a0889297069fa4beb5702
Author: Stephan Witt 
Date:   Sun May 30 17:22:42 2021 +0200

Add macOS 11 to SDK detection for builds on Mac

(cherry picked from commit 187a9d643902215f881d172ca7c7da71b341bb2c)
---
 development/LyX-Mac-binary-release.sh |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index 282822e..a4b410a 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -378,7 +378,7 @@ 
DMGNAME="${LyxBase}${LyXGitCommitHash:+-}${LyXGitCommitHash}"
 DMGSIZE="550m"
 
 # Check for existing SDKs
-SDKs=$(echo ${DEVELOPER_SDKS}/MacOSX10*sdk)
+SDKs=$(echo ${DEVELOPER_SDKS}/MacOSX1[01]*sdk)
 case $SDKs in
 *${SDKROOT}*)
;;
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/2.3.x] Add status protocol for backport of macOS build improvements.

2022-12-15 Thread Stephan Witt
commit 419f15e51187c0dbf3258e96501efb33389acb04
Author: Stephan Witt 
Date:   Thu Dec 15 22:43:19 2022 +0100

Add status protocol for backport of macOS build improvements.
---
 status.23x |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/status.23x b/status.23x
index 2b96fd2..de5aac7 100644
--- a/status.23x
+++ b/status.23x
@@ -57,6 +57,12 @@ What's new
 
 * BUILD/INSTALLATION
 
+- Add support for macOS 11.x SDKs for macOS builds.
+
+- Improved LyX version extraction from configure.ac for macOS builds.
+
+- Support for different compiler and linker flags for macOS builds.
+
 
 ** Bug fixes:
 *
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/2.3.x] Add the option build with different compiler and linker flag extensions.

2022-12-15 Thread Stephan Witt
commit fa5320c910b70723ec90af11590964204b7b9747
Author: Stephan Witt 
Date:   Fri Sep 21 21:48:48 2018 +0200

Add the option build with different compiler and linker flag extensions.

(cherry picked from commit d4f51e6ed0d92f99843ed8998823e2c0c3c1a7f4)
---
 development/LyX-Mac-binary-release.sh |9 +
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index a4b410a..ddaf75b 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -403,6 +403,7 @@ case $SDKs in
;;
 esac
 MYCFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}"
+MYLDFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}"
 
 build_qt() {
echo Build Qt library ${QtSourceDir}
@@ -465,7 +466,7 @@ if [ -d "${LibMagicSourceDir}" -a ! -f 
"${LibMagicInstallHdr}" ]; then
 
for arch in ${ARCH_LIST} ; do
CPPFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} 
${MYCFLAGS}"; export CPPFLAGS
-   LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} 
${MYCFLAGS}"; export LDFLAGS
+   LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} 
${MYLDFLAGS}"; export LDFLAGS
"${LibMagicSourceDir}/configure"\
--prefix="${LibMagicInstallDir}"\
${LibMagicConfigureOptions}
@@ -527,7 +528,7 @@ if [ -d "${HunSpellSourceDir}" -a ! -f 
"${HunSpellInstallHdr}" ]; then
for arch in ${ARCH_LIST} ; do
make distclean
CPPFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} 
${MYCFLAGS}"; export CPPFLAGS
-   LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} 
${MYCFLAGS}"; export LDFLAGS
+   LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} 
${MYLDFLAGS}"; export LDFLAGS
"${HunSpellSourceDir}/configure"\
--prefix="${HunSpellInstallDir}"\
${HunspellConfigureOptions}
@@ -590,7 +591,7 @@ if [ -d "${ASpellSourceDir}" -a ! -f "${ASpellInstallHdr}" 
-a "yes" = "${aspell_
for arch in ${ARCH_LIST} ; do
make distclean
CPPFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} 
${MYCFLAGS}"; export CPPFLAGS
-   LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} 
${MYCFLAGS}"; export LDFLAGS
+   LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} 
${MYLDFLAGS}"; export LDFLAGS
CXXFLAGS=-g "${ASpellSourceDir}/configure"\
--prefix="${ASpellInstallDir}"\
${AspellConfigureOptions}
@@ -690,7 +691,7 @@ build_lyx() {
mkdir -p "${LyxBuildDir}" && cd "${LyxBuildDir}"
 
CPPFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} 
${MYCFLAGS}"
-   LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} 
${MYCFLAGS}"
+   LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} 
${MYLDFLAGS}"
 
if [ "$configure_qt_frameworks" = "yes" ]; then
export QT_CORE_CFLAGS="-FQtCore"
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/2.3.x] care for optional brackets around version string

2022-12-15 Thread Stephan Witt
commit 9956d3fb43e6647619868e0ad884247fd4af93cb
Author: Stephan Witt 
Date:   Mon Jun 17 18:07:05 2019 +0200

care for optional brackets around version string

(cherry picked from commit b0a73c0dfdbfa0541f04d7ee2578c4cd272ef7b9)
---
 development/LyX-Mac-binary-release.sh |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index 7056868..282822e 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -332,7 +332,7 @@ DocumentationDir=$(dirname "${LyxSourceDir}")/Documents
 DmgBackground="${LyxSourceDir}"/development/MacOSX/dmg-background.png
 
 if [ -z "${LyXVersion}" ]; then
-   LyXVersion=$(grep AC_INIT "${LyxSourceDir}"/configure.ac | cut -d, -f2 
| tr -d " ()")
+   LyXVersion=$(grep AC_INIT "${LyxSourceDir}"/configure.ac | cut -d, -f2 
| tr -d " []()")
 fi
 LyXVersionSuffix=${LyXVersionSuffix:-$(echo "${LyXVersion}" | cut -d. -f1-2)}
 case "${LyXVersion}" in
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/2.3.x] Pass Qt library location as link option for frameworks on Mac

2022-12-15 Thread Stephan Witt
commit 95bd9e5b45842e540ab76ed11c682b1696d68602
Author: Stephan Witt 
Date:   Sun May 30 17:30:08 2021 +0200

Pass Qt library location as link option for frameworks on Mac

(cherry picked from commit c518c57a78f3d240ed59deb81febe7800cca2d70)
---
 development/LyX-Mac-binary-release.sh |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index ddaf75b..cf4124e 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -691,7 +691,7 @@ build_lyx() {
mkdir -p "${LyxBuildDir}" && cd "${LyxBuildDir}"
 
CPPFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} 
${MYCFLAGS}"
-   LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} 
${MYLDFLAGS}"
+   LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} 
${MYLDFLAGS} -F${QtInstallDir}/lib"
 
if [ "$configure_qt_frameworks" = "yes" ]; then
export QT_CORE_CFLAGS="-FQtCore"
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Follow-up for change a66ee4109e - guard Qt 5.4 code with version check

2022-12-08 Thread Stephan Witt
commit deae5ea23a507b9560278382f89c4219d38b7245
Author: Stephan Witt 
Date:   Thu Dec 8 18:05:28 2022 +0100

Follow-up for change a66ee4109e - guard Qt 5.4 code with version check
---
 src/frontends/qt/GuiAbout.cpp |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/frontends/qt/GuiAbout.cpp b/src/frontends/qt/GuiAbout.cpp
index 16f8be4..35375c9 100644
--- a/src/frontends/qt/GuiAbout.cpp
+++ b/src/frontends/qt/GuiAbout.cpp
@@ -294,12 +294,14 @@ static QString version(bool const plain = false)
out << '\n';
else
out << "";
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0))
out << toqstr(bformat(_("OS Version (run-time): %1$s"),
qstring_to_ucs4(QSysInfo::prettyProductName(;
if (plain)
out << '\n';
else
out << "";
+#endif
out << toqstr(bformat(_("Python detected: %1$s"), 
from_utf8(os::python(;
if (!plain)
out << toqstr("");
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Add OS version info to About box.

2022-12-06 Thread Stephan Witt
commit a66ee4109ee84a4a501dbaa29580cdefe1aadd36
Author: Stephan Witt 
Date:   Wed Dec 7 00:08:11 2022 +0100

Add OS version info to About box.
---
 src/frontends/qt/GuiAbout.cpp |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/frontends/qt/GuiAbout.cpp b/src/frontends/qt/GuiAbout.cpp
index d4173fa..16f8be4 100644
--- a/src/frontends/qt/GuiAbout.cpp
+++ b/src/frontends/qt/GuiAbout.cpp
@@ -294,6 +294,12 @@ static QString version(bool const plain = false)
out << '\n';
else
out << "";
+   out << toqstr(bformat(_("OS Version (run-time): %1$s"),
+   qstring_to_ucs4(QSysInfo::prettyProductName(;
+   if (plain)
+   out << '\n';
+   else
+   out << "";
out << toqstr(bformat(_("Python detected: %1$s"), 
from_utf8(os::python(;
if (!plain)
out << toqstr("");
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] remove Qt4 path name reference

2022-11-28 Thread Stephan Witt
commit 04cf47f46c4b99a2e39d76117b327696c791ee72
Author: Stephan Witt 
Date:   Fri Nov 25 10:10:14 2022 +0100

remove Qt4 path name reference
---
 development/LyX-Mac-binary-release.sh |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index 8bad69d..d2503ec 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -299,7 +299,7 @@ while [ $# -gt 0 ]; do
 done
 
 if [ "${configure_qt_frameworks}" != "yes" ]; then
-   QtInstallDir=${QTDIR:-"/opt/qt4"}
+   QtInstallDir=${QTDIR}
 fi
 
 ARCH_LIST=${ARCH_LIST:-"ppc i386"}
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Improved synctex support

2022-08-13 Thread Stephan Witt
commit f426470a5403a956606a3f0f4df38e0c7407ab40
Author: Stephan Witt 
Date:   Sat Aug 13 14:20:03 2022 +0200

Improved synctex support

- Add check for converter with active synctex support to check for 
synchronized output for activate forward search.
---
 src/Buffer.cpp   |   16 
 src/Buffer.h |5 +
 src/frontends/qt/GuiView.cpp |2 +-
 3 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/src/Buffer.cpp b/src/Buffer.cpp
index 96005b9..da630da 100644
--- a/src/Buffer.cpp
+++ b/src/Buffer.cpp
@@ -1110,6 +1110,22 @@ bool Buffer::readDocument(Lexer & lex)
 }
 
 
+bool Buffer::isSyncTeXenabled() const
+{
+   bool enabled = params().output_sync;
+
+   if (!enabled)
+   for (auto const & c : theConverters()) {
+   const string dest = c.to().substr(0,3);
+   if (dest == "dvi" || dest == "pdf") {
+   const string cmd = c.command();
+   enabled |= cmd.find("--synctex=1") != 
string::npos;
+   if (enabled) break;
+   }
+   }
+   return enabled;
+}
+
 bool Buffer::importString(string const & format, docstring const & contents, 
ErrorList & errorList)
 {
Format const * fmt = theFormats().getFormat(format);
diff --git a/src/Buffer.h b/src/Buffer.h
index 7f40351..ba066f7 100644
--- a/src/Buffer.h
+++ b/src/Buffer.h
@@ -221,6 +221,11 @@ public:
int readHeader(Lexer & lex);
 
double fontScalingFactor() const;
+   /// check for active synctex support:
+   /// - either the document has synchronize output enabled or
+   /// - there is a converter to dvi or pdf defined with synctex command 
line argument
+   ///   this is the "expert mode", false positives are possible
+   bool isSyncTeXenabled() const;
 
 private:
///
diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index 4492e75..d03fe3b 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -2681,7 +2681,7 @@ bool GuiView::getStatus(FuncRequest const & cmd, 
FuncStatus & flag)
break;
case LFUN_FORWARD_SEARCH:
enable = !(lyxrc.forward_search_dvi.empty() && 
lyxrc.forward_search_pdf.empty()) &&
-   doc_buffer && doc_buffer->params().output_sync;
+   doc_buffer && doc_buffer->isSyncTeXenabled();
break;
 
case LFUN_FILE_INSERT_PLAINTEXT:
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Improved synctex support

2022-08-11 Thread Stephan Witt
commit 9686fe0c79cdb547f8778d8552402c393491af87
Author: Stephan Witt 
Date:   Thu Aug 11 22:45:51 2022 +0200

Improved synctex support

- Check the state of the synchronize TeX output option of the document to 
enable or disable the LFUN for forward-search.
- write synctex macro to TeX source not only for PdfLaTeX
---
 lib/RELEASE-NOTES|2 ++
 src/BufferParams.cpp |2 +-
 src/frontends/qt/GuiView.cpp |9 ++---
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/lib/RELEASE-NOTES b/lib/RELEASE-NOTES
index 02bb3de..ccab1bc 100644
--- a/lib/RELEASE-NOTES
+++ b/lib/RELEASE-NOTES
@@ -35,6 +35,8 @@
 * Document (or selection statistics) is now shown in status bar and can be
   disabled by the context menu.
 
+* The actual enabled state of the synchronize TeX output option of the document
+  is used to enable or disable the menu item for forward-search.
 
 !!Documents compilation process and images conversion
 
diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp
index e62d010..3bb9445 100644
--- a/src/BufferParams.cpp
+++ b/src/BufferParams.cpp
@@ -2191,7 +2191,7 @@ bool BufferParams::writeLaTeX(otexstream & os, 
LaTeXFeatures & features,
os << from_utf8(output_sync_macro) +"\n";
else if (features.runparams().flavor == Flavor::LaTeX)
os << "\\usepackage[active]{srcltx}\n";
-   else if (features.runparams().flavor == Flavor::PdfLaTeX)
+   else
os << "\\synctex=-1\n";
}
 
diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index 28c196d..4492e75 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -2680,7 +2680,8 @@ bool GuiView::getStatus(FuncRequest const & cmd, 
FuncStatus & flag)
case LFUN_WINDOW_RAISE:
break;
case LFUN_FORWARD_SEARCH:
-   enable = !(lyxrc.forward_search_dvi.empty() && 
lyxrc.forward_search_pdf.empty());
+   enable = !(lyxrc.forward_search_dvi.empty() && 
lyxrc.forward_search_pdf.empty()) &&
+   doc_buffer && doc_buffer->params().output_sync;
break;
 
case LFUN_FILE_INSERT_PLAINTEXT:
@@ -4903,10 +4904,12 @@ void GuiView::dispatch(FuncRequest const & cmd, 
DispatchResult & dr)
dr.setMessage(_("Please, preview the document 
first."));
break;
}
+   bool const goto_dvi = have_dvi && 
!lyxrc.forward_search_dvi.empty();
+   bool const goto_pdf = have_pdf && 
!lyxrc.forward_search_pdf.empty();
string outname = dviname.onlyFileName();
string command = lyxrc.forward_search_dvi;
-   if (!have_dvi || (have_pdf &&
-   pdfname.lastModified() > dviname.lastModified())) {
+   if ((!goto_dvi || goto_pdf) &&
+   pdfname.lastModified() > dviname.lastModified()) {
outname = pdfname.onlyFileName();
command = lyxrc.forward_search_pdf;
}
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Additional cursor position validation required to avoid an assertion in Text::selectWord

2022-08-11 Thread Stephan Witt
commit 7391ca961d7985918a8d7b4fb52b01078b83a5c9
Author: Stephan Witt 
Date:   Thu Aug 11 22:35:58 2022 +0200

Additional cursor position validation required to avoid an assertion in 
Text::selectWord
---
 src/BufferView.cpp |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/BufferView.cpp b/src/BufferView.cpp
index 6f1b412..da309d6 100644
--- a/src/BufferView.cpp
+++ b/src/BufferView.cpp
@@ -1719,6 +1719,8 @@ void BufferView::dispatch(FuncRequest const & cmd, 
DispatchResult & dr)
}
if (cur.selection())
pattern = cur.selectionAsString(false);
+   else if (!cur.inTexted())
+   break; // not suitable for selectWord at cursor
else {
pos_type spos = cur.pos();
cur.innerText()->selectWord(cur, WHOLE_WORD);
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Add detection for available macOS applications and add check for Skim.app as alternate PDF viewer.

2022-08-08 Thread Stephan Witt
commit 4296df99601b53815c1263c8d2dda7d9df75f4a8
Author: Stephan Witt 
Date:   Mon Aug 8 15:46:57 2022 +0200

Add detection for available macOS applications and add check for Skim.app 
as alternate PDF viewer.
---
 lib/configure.py |   18 +-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/lib/configure.py b/lib/configure.py
index a1a1006..92cf561 100644
--- a/lib/configure.py
+++ b/lib/configure.py
@@ -357,6 +357,18 @@ def check_java():
 return ''
 
 
+def checkMacOSappInstalled(prog):
+'''
+Use metadata lookup to search for an "installed" macOS application 
bundle.
+'''
+if sys.platform == 'darwin' and len(prog) >= 1:
+command = r'mdfind "kMDItemContentTypeTree == 
\"com.apple.application\"c && kMDItemFSName == \"%s\""' % prog
+result = cmdOutput(command)
+logger.debug(command + ": " + result)
+return result != ''
+return False
+
+
 def checkProgAlternatives(description, progs, rc_entry=None,
   alt_rc_entry=None, path=None, not_found=''):
 '''
@@ -395,6 +407,10 @@ def checkProgAlternatives(description, progs, 
rc_entry=None,
 continue
 msg = '+checking for "' + ac_word + '"... '
 found_alt = False
+if len(alt_rc_entry) >= 1 and ac_word.endswith('.app') and 
checkMacOSappInstalled(ac_word):
+logger.info('+add alternative app ' + ac_word)
+addToRC(alt_rc_entry[0].replace('%%', ac_word))
+found_alt = True
 for ac_dir in path:
 if hasattr(os, "access") and not os.access(ac_dir, os.F_OK):
 continue
@@ -812,7 +828,7 @@ def checkFormatEntries(dtl_tools):
 checkViewer('a PDF previewer',
 ['pdfview', 'kpdf', 'okular', 'qpdfview --unique',
  'evince', 'xreader', 'kghostview', 'xpdf', 'SumatraPDF',
- 'acrobat', 'acroread', 'mupdf',
+ 'acrobat', 'acroread', 'mupdf', 'Skim.app',
  'gv', 'ghostview', 'AcroRd32', 'gsview64', 'gsview32'],
 rc_entry = [r'''\Format pdfpdf"PDF (ps2pdf)"  P  
"%%"  ""  "document,vector,menu=export"   ""
 \Format pdf2   pdf"PDF (pdflatex)"F  "%%"  ""  
"document,vector,menu=export"   ""
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Make "open -a" implicit on macOS

2022-08-08 Thread Stephan Witt
commit a89f2fd08cdd5d3e8a0f9c26dc676df38fedae91
Author: Stephan Witt 
Date:   Mon Aug 8 10:36:46 2022 +0200

Make "open -a" implicit on macOS

Fix for bug #12570 - add simple check for app bundle name and prefix it 
with macOS open command if name matches
---
 src/support/Systemcall.cpp |   15 +++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/src/support/Systemcall.cpp b/src/support/Systemcall.cpp
index 6c96de1..d339e11 100644
--- a/src/support/Systemcall.cpp
+++ b/src/support/Systemcall.cpp
@@ -217,6 +217,21 @@ string const parsecmd(string const & incmd, string & 
infile, string & outfile,
}
} else if (c == '<' && !(in_double_quote || escaped)) {
o = 3;
+#if defined (USE_MACOSX_PACKAGING)
+   } else if (o == 0 && i > 4 && c == ' ' && !(in_double_quote || 
escaped)) {
+   // if a macOS app is detected with an additional 
argument
+   // use open command as prefix to get it work
+   const size_t apos = outcmd[o].rfind(".app");
+   const size_t len = outcmd[o].length();
+   const bool quoted = outcmd[o].at(len - 1) == '"' && 
outcmd[o].at(0) == '"';
+   const string & ocmd = "open -a ";
+   if (apos != string::npos &&
+   (apos == (len - 4) || (apos == (len - 5) && 
quoted)) &&
+   !prefixIs(trim(outcmd[o]), ocmd)) {
+   outcmd[o] = ocmd + outcmd[o];
+   }
+   outcmd[o] += c;
+#endif
} else {
if (escaped && in_double_quote)
outcmd[o] += '\\';
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Fix a typo in copied comment.

2022-07-31 Thread Stephan Witt
commit 83bea9c8c131413d10087ae9f5d4ca4b7dceda19
Author: Stephan Witt 
Date:   Sun Jul 31 23:35:14 2022 +0200

Fix a typo in copied comment.
---
 lib/configure.py |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/configure.py b/lib/configure.py
index ab205dd..a1a1006 100644
--- a/lib/configure.py
+++ b/lib/configure.py
@@ -545,7 +545,7 @@ def checkViewerNoRC(description, progs, rc_entry=None, 
path=None):
 
 
 def checkEditorNoRC(description, progs, rc_entry=None, path=None):
-''' The same as checkViewer, but do not add rc entry '''
+''' The same as checkEditor, but do not add rc entry '''
 if rc_entry is None:
 rc_entry = []
 if path is None:
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Enhanced build script to use c++17 with EnableCXXMode for Qt6

2022-07-30 Thread Stephan Witt
commit e873ac3c909535fee90be6e31a255b7468fa5aa7
Author: Stephan Witt 
Date:   Sat Jul 30 15:04:37 2022 +0200

Enhanced build script to use c++17 with EnableCXXMode for Qt6
---
 development/LyX-Mac-binary-release.sh |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index cc7320d..8bad69d 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -285,7 +285,6 @@ while [ $# -gt 0 ]; do
shift
;;
--enable-cxx11|--enable-cxx-mode=*)
-   LyXConfigureOptions="${LyXConfigureOptions} ${1}"
EnableCXXMode="${1}"
shift
;;
@@ -423,11 +422,13 @@ case "${EnableCXXMode}" in
export CC=cc
export CXX="c++ -stdlib=libc++"
export CXXFLAGS=-std=c++11
+   LyXConfigureOptions="${LyXConfigureOptions} --enable-cxx-mode=11"
;;
 --enable-cxx-mode=17)
export CC=cc
export CXX="c++ -stdlib=libc++"
export CXXFLAGS=-std=c++17
+   LyXConfigureOptions="${LyXConfigureOptions} ${EnableCXXMode}"
;;
 esac
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Improved package build script for MacOS. Handle compiler standard for Qt6.

2022-04-09 Thread Stephan Witt
commit 9d6e704183009221ae3996608728537cfb772238
Author: Stephan Witt 
Date:   Sat Apr 9 09:19:46 2022 +0200

Improved package build script for MacOS. Handle compiler standard for Qt6.
---
 development/LyX-Mac-binary-release.sh |   31 +--
 1 files changed, 21 insertions(+), 10 deletions(-)

diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index 017a610..cc7320d 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -284,9 +284,9 @@ while [ $# -gt 0 ]; do
LyxOnlyPackage=$(echo ${1}|cut -d= -f2)
shift
;;
-   --enable-cxx11)
+   --enable-cxx11|--enable-cxx-mode=*)
LyXConfigureOptions="${LyXConfigureOptions} ${1}"
-   EnableCXX11="--enable-cxx11"
+   EnableCXXMode="${1}"
shift
;;
--*)
@@ -374,6 +374,12 @@ case "${QtVersion}" in
 6*)
QtLibraries=${QtLibraries:-"QtCore5Compat QtDBus QtSvg QtXml 
QtPrintSupport QtSvgWidgets QtWidgets QtGui QtNetwork QtConcurrent QtCore"}
QtFrameworkVersion="A"
+   case "${EnableCXXMode}" in
+   --enable-cxx11|--enable-cxx-mode=11)
+   echo Warning: Adjust cxx standard "${EnableCXXMode}" for Qt 6. 
C++17 or better is required.
+   EnableCXXMode="--enable-cxx-mode=17"
+   ;;
+   esac
;;
 *)
QtLibraries=${QtLibraries:-"QtSvg QtXml QtGui QtNetwork QtCore"}
@@ -412,6 +418,19 @@ esac
 MYCFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}"
 MYLDFLAGS="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}"
 
+case "${EnableCXXMode}" in
+--enable-cxx11|--enable-cxx-mode=11)
+   export CC=cc
+   export CXX="c++ -stdlib=libc++"
+   export CXXFLAGS=-std=c++11
+   ;;
+--enable-cxx-mode=17)
+   export CC=cc
+   export CXX="c++ -stdlib=libc++"
+   export CXXFLAGS=-std=c++17
+   ;;
+esac
+
 build_qt() {
echo Build Qt library ${QtSourceDir}
if [ "${QtInstallDir}" = "${QtBuildDir}" ]; then
@@ -641,14 +660,6 @@ build_lyx() {
rm -rf "${LyxAppPrefix}"
fi
 
-   case "${EnableCXX11}" in
-   "--enable-cxx11")
-   export CC=cc
-   export CXX="c++ -stdlib=libc++"
-   export CXXFLAGS=-std=c++11
-   ;;
-   esac
-
# -
# Automate configure check
# -
-- 
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.
-   

[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] Avoid static members zoom_min_ and zoom_max_

2022-02-09 Thread Stephan Witt
commit cd995a2bc6449c8d9d3dee494ecffcf9abdcb50f
Author: Stephan Witt 
Date:   Wed Feb 9 10:59:18 2022 +0100

Avoid static members zoom_min_ and zoom_max_

Some compilers cannot use static class members by reference. std::min() and 
std::max() are passing parameters by const reference.
---
 src/frontends/qt/GuiView.h |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/frontends/qt/GuiView.h b/src/frontends/qt/GuiView.h
index bd39d26..27d230b 100644
--- a/src/frontends/qt/GuiView.h
+++ b/src/frontends/qt/GuiView.h
@@ -519,9 +519,9 @@ private:
/// from the default zoom pref
double zoom_ratio_ = 1.0;
/// Minimum zoom percentage
-   static int const zoom_min_ = 10;
+   int const zoom_min_ = 10;
/// Maximum zoom percentage
-   static int const zoom_max_ = 1000;
+   int const zoom_max_ = 1000;
 
// movability flag of all toolbars
bool toolbarsMovable_;
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] #12157 Replace old with new banner in DMG background image

2022-01-09 Thread Stephan Witt
commit 28a1744dcd451c36a1f0724aa6afe08de4a8d6a6
Author: Stephan Witt 
Date:   Mon Jan 10 07:48:54 2022 +0100

#12157 Replace old with new banner in DMG background image
---
 development/LyX-Mac-binary-release.sh|   15 ---
 development/MacOSX/dmg-background.png|  Bin 94300 -> 73805 bytes
 development/MacOSX/dmg-background.svgz   |  Bin 0 -> 15717 bytes
 development/MacOSX/dmg-background.tiff   |  Bin 0 -> 323234 bytes
 development/MacOSX/dmg-backgro...@2x.png |  Bin 0 -> 185452 bytes
 5 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index 25b1c7a..017a610 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -332,7 +332,7 @@ 
QtBuildDir=${QtBuildDir:-"${LyxBuildDir}"/${QtBuildSubDir:-"qt-build"}}
 
 DictionarySourceDir=${DICTIONARYDIR:-$(dirname "${LyxSourceDir}")/dictionaries}
 DocumentationDir=$(dirname "${LyxSourceDir}")/Documents
-DmgBackground="${LyxSourceDir}"/development/MacOSX/dmg-background.png
+DmgBackground="${LyxSourceDir}"/development/MacOSX/dmg-background.tiff
 
 if [ -z "${LyXVersion}" ]; then
LyXVersion=$(grep AC_INIT "${LyxSourceDir}"/configure.ac | cut -d, -f2 
| tr -d " []()")
@@ -959,7 +959,7 @@ set_bundle_display_options() {
X_BOUNDS=$2
Y_BOUNDS=$3
Y_POSITION=$((Y_BOUNDS - 65))
-   Y_BOUNDS=$((Y_BOUNDS + 20))
+   Y_BOUNDS=$((Y_BOUNDS + 50))
LYX_X_POSITION=$((X_BOUNDS / 4))
LYX_Y_POSITION=$Y_POSITION
APP_X_POSITION=$((3 * X_BOUNDS / 4))
@@ -997,10 +997,19 @@ set_bundle_display_options() {
 EOF
 }
 
+# The image was made with with inkscape and tiffutil from dmg-background.svgz
+make_image() {
+   INKSCAPE=/Applications/Inkscape.app/Contents/MacOS/inkscape
+   cd "${LyxSourceDir}"/development/MacOSX
+   ${INKSCAPE} --export-type=png -w 560 -o dmg-background.png 
dmg-background.svgz
+   ${INKSCAPE} --export-type=png -w 1120 -o dmg-backgro...@2x.png 
dmg-background.svgz
+   tiffutil -cathidpicheck dmg-background.png dmg-backgro...@2x.png -out 
dmg-background.tiff
+}
+
 make_dmg() {
cd "${1}"
 
-   BGSIZE=$(file "$DmgBackground" | awk -F , '/PNG/{print $2 }' | tr x ' ')
+   BGSIZE=$(file "$DmgBackground" | awk -F , '/TIFF/{ print $10 $4 
;}/PNG/{ print $2; }'|sed -e 's/width=//' -e 's/height=//' -e 's/x//')
BG_W=$(echo ${BGSIZE} | awk '{print $1 }')
BG_H=$(echo ${BGSIZE} | awk '{print $2 }')
 
diff --git a/development/MacOSX/dmg-background.png 
b/development/MacOSX/dmg-background.png
index 1a513a8..b6feca5 100644
Binary files a/development/MacOSX/dmg-background.png and 
b/development/MacOSX/dmg-background.png differ
diff --git a/development/MacOSX/dmg-background.svgz 
b/development/MacOSX/dmg-background.svgz
new file mode 100644
index 000..db0d3d6
Binary files /dev/null and b/development/MacOSX/dmg-background.svgz differ
diff --git a/development/MacOSX/dmg-background.tiff 
b/development/MacOSX/dmg-background.tiff
new file mode 100644
index 000..15651a8
Binary files /dev/null and b/development/MacOSX/dmg-background.tiff differ
diff --git a/development/MacOSX/dmg-backgro...@2x.png 
b/development/MacOSX/dmg-backgro...@2x.png
new file mode 100644
index 000..e5b5a3b
Binary files /dev/null and b/development/MacOSX/dmg-backgro...@2x.png differ
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] #12423 fix a focus change problem

2022-01-09 Thread Stephan Witt
commit 678ab325c0a38b475a60a9045691789d115b2491
Author: Stephan Witt 
Date:   Sun Jan 9 22:33:43 2022 +0100

#12423 fix a focus change problem

The search widget triggers a showEvent() in updateTitle() leading to 
setting the focus to the default push button.
The check in updateTitle() for the need to restore the title avoids 
superfluous show events and avoids the unwanted focus change.
---
 src/frontends/qt/GuiSearch.cpp |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt/GuiSearch.cpp b/src/frontends/qt/GuiSearch.cpp
index e387ce8..f12d42c 100644
--- a/src/frontends/qt/GuiSearch.cpp
+++ b/src/frontends/qt/GuiSearch.cpp
@@ -649,9 +649,10 @@ void GuiSearch::updateTitle()
// remove title bar
setTitleBarWidget(new QWidget());
titleBarWidget()->hide();
-   } else
+   } else if (titleBarWidget()) {
// restore title bar
setTitleBarWidget(nullptr);
+   }
 }
 
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] #12434 add GUI debug messages for pinch-to-zoom gesture

2022-01-09 Thread Stephan Witt
commit 22045e455aeb1ecec4507331e4e171bdf21c116d
Author: Stephan Witt 
Date:   Sun Jan 9 12:29:02 2022 +0100

#12434 add GUI debug messages for pinch-to-zoom gesture
---
 src/frontends/qt/GuiView.cpp |6 +-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index 91e8229..5cf4fce 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -1632,11 +1632,15 @@ bool GuiView::event(QEvent * e)
if (gp) {
QPinchGesture *pinch = static_cast(gp);
QPinchGesture::ChangeFlags changeFlags = 
pinch->changeFlags();
+   qreal totalScaleFactor = pinch->totalScaleFactor();
+   LYXERR(Debug::GUI, "totalScaleFactor: " << 
totalScaleFactor);
if (pinch->state() == Qt::GestureStarted) {
initialZoom_ = lyxrc.currentZoom;
+   LYXERR(Debug::GUI, "initialZoom_: " << 
initialZoom_);
}
if (changeFlags & QPinchGesture::ScaleFactorChanged) {
-   qreal factor = initialZoom_ * 
pinch->totalScaleFactor();
+   qreal factor = initialZoom_ * totalScaleFactor;
+   LYXERR(Debug::GUI, "scaleFactor: " << factor);
zoomValueChanged(factor);
}
}
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Pinch to zoom fix

2022-01-09 Thread Stephan Witt
commit 7134ebd7938ee2f2e075d53b83a346b168a622c1
Author: Daniel Ramoeller 
Date:   Wed Jan 5 15:27:46 2022 +0100

Pinch to zoom fix

Amendment to fix for #12434.
---
 src/frontends/qt/GuiView.cpp |5 -
 src/frontends/qt/GuiView.h   |3 +++
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index 6cd97f5..91e8229 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -1632,8 +1632,11 @@ bool GuiView::event(QEvent * e)
if (gp) {
QPinchGesture *pinch = static_cast(gp);
QPinchGesture::ChangeFlags changeFlags = 
pinch->changeFlags();
+   if (pinch->state() == Qt::GestureStarted) {
+   initialZoom_ = lyxrc.currentZoom;
+   }
if (changeFlags & QPinchGesture::ScaleFactorChanged) {
-   qreal factor = 
lyxrc.currentZoom*pinch->scaleFactor();
+   qreal factor = initialZoom_ * 
pinch->totalScaleFactor();
zoomValueChanged(factor);
}
}
diff --git a/src/frontends/qt/GuiView.h b/src/frontends/qt/GuiView.h
index 145a1f2..9ad3610 100644
--- a/src/frontends/qt/GuiView.h
+++ b/src/frontends/qt/GuiView.h
@@ -526,6 +526,9 @@ private:
 
// developer mode
bool devel_mode_;
+
+   // initial zoom for pinch gesture
+   int initialZoom_;
 };
 
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] #12451 Adjust color cache on change of dark/light mode

2022-01-04 Thread Stephan Witt
commit d9b9307d14ea5cdf6e6e17d2ccba15048407a3cb
Author: Stephan Witt 
Date:   Wed Jan 5 08:26:18 2022 +0100

#12451 Adjust color cache on change of dark/light mode
---
 src/frontends/qt/GuiApplication.cpp |   11 +++
 src/frontends/qt/GuiApplication.h   |2 ++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/frontends/qt/GuiApplication.cpp 
b/src/frontends/qt/GuiApplication.cpp
index 5cd8f29..b44f2c5 100644
--- a/src/frontends/qt/GuiApplication.cpp
+++ b/src/frontends/qt/GuiApplication.cpp
@@ -2322,6 +2322,12 @@ void GuiApplication::onLocaleChanged()
 }
 
 
+void GuiApplication::onPaletteChanged()
+{
+   colorCache().setPalette(palette());
+}
+
+
 void GuiApplication::handleKeyFunc(FuncCode action)
 {
char_type c = 0;
@@ -2977,6 +2983,11 @@ bool GuiApplication::event(QEvent * e)
e->accept();
return true;
 #endif
+   case QEvent::ApplicationPaletteChange: {
+   // runtime switch from/to dark mode
+   onPaletteChanged();
+   return QApplication::event(e);
+   }
default:
return QApplication::event(e);
}
diff --git a/src/frontends/qt/GuiApplication.h 
b/src/frontends/qt/GuiApplication.h
index f0c3e1e..e40815e 100644
--- a/src/frontends/qt/GuiApplication.h
+++ b/src/frontends/qt/GuiApplication.h
@@ -230,6 +230,8 @@ private Q_SLOTS:
///
void onLocaleChanged();
///
+   void onPaletteChanged();
+   ///
void slotProcessFuncRequestQueue() { processFuncRequestQueue(); }
///
 #if (QT_VERSION >= 0x050100)
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Remove temporary code comment.

2022-01-03 Thread Stephan Witt
commit 11d42ac3dff569f4e1a6bb606dcb99d0ba7adc7b
Author: Stephan Witt 
Date:   Mon Jan 3 10:44:02 2022 +0100

Remove temporary code comment.
---
 src/frontends/qt/GuiView.cpp |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index 791a2c2..1680ce6 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -1634,7 +1634,6 @@ bool GuiView::event(QEvent * e)
QPinchGesture::ChangeFlags changeFlags = 
pinch->changeFlags();
if (changeFlags & QPinchGesture::ScaleFactorChanged) {
qreal factor = 
lyxrc.currentZoom*pinch->scaleFactor();
-   //factor = ceil(factor/20)*20;
zoomValueChanged(factor);
}
}
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] #12434 add event handler for pinch-to-zoom gesture

2022-01-02 Thread Stephan Witt
commit d4324034300f73f76e5ac34fb1e7653fa6e2ddf5
Author: Stephan Witt 
Date:   Mon Jan 3 07:37:03 2022 +0100

#12434 add event handler for pinch-to-zoom gesture
---
 src/frontends/qt/GuiView.cpp |   20 
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index ffcbc3d..791a2c2 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -110,6 +110,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 
 // sync with GuiAlert.cpp
@@ -694,6 +696,9 @@ GuiView::GuiView(int id)
connect(statusBar(), SIGNAL(customContextMenuRequested(QPoint)),
this, SLOT(showZoomContextMenu()));
 
+   // enable pinch to zoom
+   grabGesture(Qt::PinchGesture);
+
int const iconheight = max(int(d.normalIconSize), fm.height());
QSize const iconsize(iconheight, iconheight);
 
@@ -1621,6 +1626,21 @@ bool GuiView::event(QEvent * e)
return QMainWindow::event(e);
}
 
+   case QEvent::Gesture: {
+   QGestureEvent *ge = static_cast(e);
+   QGesture *gp = ge->gesture(Qt::PinchGesture);
+   if (gp) {
+   QPinchGesture *pinch = static_cast(gp);
+   QPinchGesture::ChangeFlags changeFlags = 
pinch->changeFlags();
+   if (changeFlags & QPinchGesture::ScaleFactorChanged) {
+   qreal factor = 
lyxrc.currentZoom*pinch->scaleFactor();
+   //factor = ceil(factor/20)*20;
+   zoomValueChanged(factor);
+   }
+   }
+   return QMainWindow::event(e);
+   }
+
default:
return QMainWindow::event(e);
}
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Guard new code for builds with OS X 10.11 SDK and lesser (part 2).

2022-01-01 Thread Stephan Witt
commit df990b1027bfc87f945e1ce29646bd874c5837fa
Author: Stephan Witt 
Date:   Sat Jan 1 18:47:57 2022 +0100

Guard new code for builds with OS X 10.11 SDK and lesser (part 2).
---
 src/support/AppleSupport.m |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/support/AppleSupport.m b/src/support/AppleSupport.m
index 3a4f864..2c78bd2 100644
--- a/src/support/AppleSupport.m
+++ b/src/support/AppleSupport.m
@@ -42,6 +42,10 @@ void appleCleanupViewMenu() {
 
 
 bool appleUserTabbingPreferenceAlways() {
+#if defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && (__MAC_OS_X_VERSION_MAX_ALLOWED 
>= 101200)
return [NSWindow respondsToSelector:@selector(userTabbingPreference)] &&
[NSWindow userTabbingPreference] == 
NSWindowUserTabbingPreferenceAlways;
+#else
+   return false;
+#endif
 }
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Guard new code for builds with OS X 10.11 SDK and lesser.

2022-01-01 Thread Stephan Witt
commit 718b735dfe9459edab125779593e6074faaf9973
Author: Stephan Witt 
Date:   Sat Jan 1 18:46:32 2022 +0100

Guard new code for builds with OS X 10.11 SDK and lesser.
---
 src/support/AppleSupport.m |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/support/AppleSupport.m b/src/support/AppleSupport.m
index 7657e9d..3a4f864 100644
--- a/src/support/AppleSupport.m
+++ b/src/support/AppleSupport.m
@@ -24,6 +24,7 @@ void appleCleanupEditMenu() {
 
 void appleCleanupViewMenu() {
 
+#if defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && (__MAC_OS_X_VERSION_MAX_ALLOWED 
>= 101200)
// Remove the "Show Tab Bar" menu item from the "View" menu, if 
supported
// See the Apple developer release notes:
// What should an application which already has support for tabbing do?
@@ -35,6 +36,8 @@ void appleCleanupViewMenu() {
 
// Remove the "Enter Full Screen" menu item from the "View" menu
[[NSUserDefaults standardUserDefaults] setBool:NO 
forKey:@"NSFullScreenMenuItemEverywhere"];
+
+#endif
 }
 
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Correct white space.

2022-01-01 Thread Stephan Witt
commit 47c92834dfd796e1183a75a0f3364b5548b13bff
Author: Stephan Witt 
Date:   Sat Jan 1 16:37:07 2022 +0100

Correct white space.
---
 src/frontends/qt/GuiView.cpp |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index d59e64c..ffcbc3d 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -1577,7 +1577,8 @@ bool GuiView::event(QEvent * e)
setContentsMargins(0, 0, 0, 0);
}
return result;
-   }
+   }
+
case QEvent::WindowActivate: {
GuiView * old_view = guiApp->currentView();
if (this == old_view) {
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Qt6 QFontDatabase is a pure static class. Call the member functions directly.

2022-01-01 Thread Stephan Witt
commit 21258638744d5efa24b1a776daeff1fff1abe6d5
Author: Stephan Witt 
Date:   Sat Jan 1 10:06:07 2022 +0100

Qt6 QFontDatabase is a pure static class. Call the member functions 
directly.
---
 src/frontends/qt/GuiDocument.cpp |6 +-
 src/frontends/qt/GuiPrefs.cpp|6 +-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/frontends/qt/GuiDocument.cpp b/src/frontends/qt/GuiDocument.cpp
index 3e6df5d..4067d6c 100644
--- a/src/frontends/qt/GuiDocument.cpp
+++ b/src/frontends/qt/GuiDocument.cpp
@@ -2679,8 +2679,12 @@ void GuiDocument::updateFontlist()
fontModule->fontsMathCO->addItem(qt_("Class Default (TeX 
Fonts)"), QString("auto"));
fontModule->fontsMathCO->addItem(unimath, QString("default"));
 
+#if QT_VERSION >= 0x06
+   const QStringList families(QFontDatabase::families());
+#else
QFontDatabase fontdb;
-   QStringList families(fontdb.families());
+   const QStringList families(fontdb.families());
+#endif
for (auto const & family : families) {
fontModule->fontsRomanCO->addItem(family, family);
fontModule->fontsSansCO->addItem(family, family);
diff --git a/src/frontends/qt/GuiPrefs.cpp b/src/frontends/qt/GuiPrefs.cpp
index 75deb7c..40c0638 100644
--- a/src/frontends/qt/GuiPrefs.cpp
+++ b/src/frontends/qt/GuiPrefs.cpp
@@ -931,8 +931,12 @@ PrefScreenFonts::PrefScreenFonts(GuiPreferences * form)
this, SLOT(selectTypewriter(QString)));
 #endif
 
+#if QT_VERSION >= 0x06
+   const QStringList families(QFontDatabase::families());
+#else
QFontDatabase fontdb;
-   QStringList families(fontdb.families());
+   const QStringList families(fontdb.families());
+#endif
for (auto const & family : families) {
screenRomanCO->addItem(family);
screenSansCO->addItem(family);
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Reduce the mix of python versions in configure.py in case of running it with python3

2021-12-31 Thread Stephan Witt
commit 77670bc9983392e32abb1cec236e5741b4d8c84b
Author: Stephan Witt 
Date:   Fri Dec 31 13:40:22 2021 +0100

Reduce the mix of python versions in configure.py in case of running it 
with python3
---
 lib/configure.py |7 +++
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/lib/configure.py b/lib/configure.py
index bddb94c..7d9b61c 100644
--- a/lib/configure.py
+++ b/lib/configure.py
@@ -1293,7 +1293,7 @@ def checkConverterEntries():
 if lilypond_book:
 found_lilypond_book = False
 # On Windows, the file lilypond-book is not directly callable, it must 
be passed as argument to python.
-for cmd in ["lilypond-book", "python \"" + path + "/lilypond-book\""]:
+for cmd in ["lilypond-book", os.path.basename(sys.executable) + ' "' + 
path + '/lilypond-book"']:
 version_string = cmdOutput(cmd + " --version")
 if len(version_string) == 0:
 continue
@@ -1331,9 +1331,8 @@ def checkConverterEntries():
 
 logger.info('+  found LilyPond-book version %s.' % 
version_number)
 
-# early exit on first match, avoid 2nd try with 
problematic python call
-# 1) in case of configure.py called with "python3" 
hardcoded "python" call is wrong
-# 2) in case of lilypond-book being an executable or shell 
script the python call is useless
+# early exit on first match, avoid 2nd try with python call
+# in case of lilypond-book being an executable or shell 
script the python call is useless
 break
 else:
 logger.info('+  found LilyPond-book, but version %s is too 
old.' % version_number)
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Avoid python based lilypond-book detection if it's not needed - e.g. on Mac

2021-12-31 Thread Stephan Witt
commit 6372f5569e4d6747642f7cbb0fa6e4eac2deab69
Author: Stephan Witt 
Date:   Fri Dec 31 11:54:14 2021 +0100

Avoid python based lilypond-book detection if it's not needed - e.g. on Mac
---
 lib/configure.py |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/lib/configure.py b/lib/configure.py
index 68bdc09..bddb94c 100644
--- a/lib/configure.py
+++ b/lib/configure.py
@@ -1330,6 +1330,11 @@ def checkConverterEntries():
 addToRC(r'\copier docbook5 "python 
$$s/scripts/docbook_copy.py ' + docbook_lilypond_cmd.replace('"', r'\"') + r' 
$$i $$o"')
 
 logger.info('+  found LilyPond-book version %s.' % 
version_number)
+
+# early exit on first match, avoid 2nd try with 
problematic python call
+# 1) in case of configure.py called with "python3" 
hardcoded "python" call is wrong
+# 2) in case of lilypond-book being an executable or shell 
script the python call is useless
+break
 else:
 logger.info('+  found LilyPond-book, but version %s is too 
old.' % version_number)
 if not found_lilypond_book:
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Remove unused local variable

2021-12-29 Thread Stephan Witt
commit f22c5c3c3f4c2cbb9fc852481d60b4f542ac6742
Author: Stephan Witt 
Date:   Wed Dec 29 15:32:59 2021 +0100

Remove unused local variable
---
 src/frontends/qt/GuiView.cpp |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index cce87e5..d59e64c 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -207,7 +207,6 @@ public:
QStringList titlesegs = htext.split('\n');
int wline = 0;
int hline = fm.maxHeight();
-   QStringList::const_iterator sit;
for (QString const & seg : titlesegs) {
if (fm.width(seg) > wline)
wline = fm.width(seg);
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Improved Qt framework configuration detection on macOS, add QtCore5Compat headers to configure based includes

2021-12-12 Thread Stephan Witt
commit cb4715d7395ac9b3343862a0a0017e44367768b1
Author: Stephan Witt 
Date:   Sun Dec 12 22:24:23 2021 +0100

Improved Qt framework configuration detection on macOS, add QtCore5Compat 
headers to configure based includes
---
 config/qt.m4 |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/config/qt.m4 b/config/qt.m4
index b9ffe28..05fa9ce 100644
--- a/config/qt.m4
+++ b/config/qt.m4
@@ -44,7 +44,7 @@ AC_DEFUN([QT_CHECK_COMPILE],
qt_cv_libname=
for libname in $qt_guilibs \
   '-framework QtCore -framework QtConcurrent 
-framework QtSvg -framework QtWidgets -framework QtMacExtras -framework QtGui'\
-  '-framework QtCore -framework QtConcurrent 
-framework QtSvg -framework QtSvgWidgets -framework QtWidgets -framework QtGui'\
+  '-framework QtCore -framework QtConcurrent 
-framework QtCore5Compat -framework QtSvg -framework QtSvgWidgets -framework 
QtWidgets -framework QtGui'\
   '-framework QtCore -framework QtGui'
do
QT_TRY_LINK($libname)
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Fix an overloaded-virtual warning for type mismatch of event parameter (Qt6)

2021-12-09 Thread Stephan Witt
commit 4665baac4625326d64ba46200968de44b1f2bb09
Author: Stephan Witt 
Date:   Thu Dec 9 21:58:14 2021 +0100

Fix an overloaded-virtual warning for type mismatch of event parameter (Qt6)
---
 src/frontends/qt/IconPalette.cpp |4 
 src/frontends/qt/IconPalette.h   |2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt/IconPalette.cpp b/src/frontends/qt/IconPalette.cpp
index 33ceb29..45d774b 100644
--- a/src/frontends/qt/IconPalette.cpp
+++ b/src/frontends/qt/IconPalette.cpp
@@ -54,7 +54,11 @@ void TearOff::mouseReleaseEvent(QMouseEvent * /*event*/)
 }
 
 
+#if QT_VERSION < 0x06
 void TearOff::enterEvent(QEvent * event)
+#else
+void TearOff::enterEvent(QEnterEvent * event)
+#endif
 {
highlighted_ = true;
update();
diff --git a/src/frontends/qt/IconPalette.h b/src/frontends/qt/IconPalette.h
index 50c68a3..e9f8101 100644
--- a/src/frontends/qt/IconPalette.h
+++ b/src/frontends/qt/IconPalette.h
@@ -30,7 +30,7 @@ public:
 #if QT_VERSION < 0x06
void enterEvent(QEvent *) override;
 #else
-   void enterEvent(QEvent *);
+   void enterEvent(QEnterEvent *) override;
 #endif
void leaveEvent(QEvent *) override;
void mouseReleaseEvent (QMouseEvent *) override;
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Restore correct version check for AA_UseHighDpiPixmaps - amend change ae56fb6171

2021-12-07 Thread Stephan Witt
commit 0e0b76a76e6a660a379ea9955a92c440a6401acd
Author: Stephan Witt 
Date:   Tue Dec 7 23:01:47 2021 +0100

Restore correct version check for AA_UseHighDpiPixmaps - amend change 
ae56fb6171
---
 src/frontends/qt/GuiApplication.cpp |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt/GuiApplication.cpp 
b/src/frontends/qt/GuiApplication.cpp
index ed20130..9e6f18a 100644
--- a/src/frontends/qt/GuiApplication.cpp
+++ b/src/frontends/qt/GuiApplication.cpp
@@ -1109,7 +1109,7 @@ GuiApplication::GuiApplication(int & argc, char ** argv)
QCoreApplication::setOrganizationName(app_name);
QCoreApplication::setOrganizationDomain("lyx.org");
QCoreApplication::setApplicationName(lyx_package);
-#if QT_VERSION >= 0x05 && QT_VERSION < 0x06
+#if QT_VERSION >= 0x050100 && QT_VERSION < 0x06
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
 #endif
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Qt6 pixmaps are always HiDPI - avoid deprecate warning for setAttribute

2021-12-07 Thread Stephan Witt
commit ae56fb617184114329d1e5b9b5fbd6e2bc112231
Author: Stephan Witt 
Date:   Tue Dec 7 10:02:05 2021 +0100

Qt6 pixmaps are always HiDPI - avoid deprecate warning for setAttribute
---
 src/frontends/qt/GuiApplication.cpp |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt/GuiApplication.cpp 
b/src/frontends/qt/GuiApplication.cpp
index 54c8910..ed20130 100644
--- a/src/frontends/qt/GuiApplication.cpp
+++ b/src/frontends/qt/GuiApplication.cpp
@@ -2788,7 +2788,7 @@ void GuiApplication::execBatchCommands()
 #if QT_VERSION > 0x040600

setAttribute(Qt::AA_MacDontSwapCtrlAndMeta,lyxrc.mac_dontswap_ctrl_meta);
 #endif
-#if QT_VERSION > 0x050100
+#if QT_VERSION >= 0x05 && QT_VERSION < 0x06
setAttribute(Qt::AA_UseHighDpiPixmaps,true);
 #endif
// Create the global default menubar which is shown for the dialogs
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Automate Qt major version detection in macOS build script

2021-12-05 Thread Stephan Witt
commit 53ed3dc0627d925500db20594af301052b785378
Author: Stephan Witt 
Date:   Mon Dec 6 07:51:26 2021 +0100

Automate Qt major version detection in macOS build script
---
 development/LyX-Mac-binary-release.sh |7 ++-
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index 04da1f3..25b1c7a 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -47,7 +47,7 @@ LyXConfigureOptions="${LyXConfigureOptions} 
--disable-stdlib-debug"
 AspellConfigureOptions="--enable-warnings --enable-optimization=-O0 
--enable-debug --disable-nls --enable-compile-in-filters 
--disable-pspell-compatibility"
 HunspellConfigureOptions="--with-warnings --disable-nls --disable-static"
 
-QtMajorVersion=qt4
+QtMajorVersion=$(echo "${QtVersion}"|cut -d. -f1)
 QtConfigureOptions="${QtConfigureOptions} -opensource -silent -shared 
-confirm-license"
 # stupid special case...
 case "${QtVersion}:${QtAPI}" in
@@ -63,7 +63,6 @@ case "${QtVersion}:${QtAPI}" in
QtConfigureOptions="${QtConfigureOptions} -fast -no-strip"
QtConfigureOptions="${QtConfigureOptions} -no-javascript-jit 
-no-pkg-config"
QtConfigureOptions="${QtConfigureOptions} -nomake examples -nomake 
demos -nomake docs -nomake tools"
-   QtMajorVersion=qt5
;;
 5.6*|5.7*)
QtConfigureOptions="${QtConfigureOptions} -no-strip"
@@ -73,7 +72,6 @@ case "${QtVersion}:${QtAPI}" in
QtConfigureOptions="${QtConfigureOptions} -skip qtquickcontrols"
QtConfigureOptions="${QtConfigureOptions} -skip qttools"
QtConfigureOptions="${QtConfigureOptions} -skip qtdeclarative"
-   QtMajorVersion=qt5
;;
 5.*)
QtConfigureOptions="${QtConfigureOptions} -no-strip"
@@ -82,7 +80,6 @@ case "${QtVersion}:${QtAPI}" in
for component in ${QtSkipComponents} ; do
QtConfigureOptions="${QtConfigureOptions} -skip ${component}"
done
-   QtMajorVersion=qt5
;;
 *)
QtConfigureOptions="${QtConfigureOptions} -fast -no-exceptions"
@@ -1055,7 +1052,7 @@ build_package() {
for arch in ${ARCH_LIST} ; do
DMGARCH="${DMGARCH}-${arch}"
done
-   QtDmgArchSuffix=${QtMajorVersion}${DMGARCH}${QtAPI}.dmg
+   QtDmgArchSuffix="qt"${QtMajorVersion}${DMGARCH}${QtAPI}.dmg
 
test -n "${DMGLocation}" && (
make_dmg "${DMGLocation}"
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Care for consistent compiler flag values of macosx-version-min with ObjC and C++

2021-12-05 Thread Stephan Witt
commit b48620dff17f69e8fd8dd9344ef49007b6c28c32
Author: Stephan Witt 
Date:   Mon Dec 6 07:46:35 2021 +0100

Care for consistent compiler flag values of macosx-version-min with ObjC 
and C++
---
 config/lyxinclude.m4 |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4
index 40f86ab..e6cab08 100644
--- a/config/lyxinclude.m4
+++ b/config/lyxinclude.m4
@@ -694,7 +694,7 @@ AC_DEFUN([LYX_CHECK_MACOS_DEPLOYMENT_TARGET],[
   ;;
 esac
   fi
-  AM_CXXFLAGS="-mmacosx-version-min=$macos_deployment_target $AM_CXXFLAGS"
+  AM_CPPFLAGS="-mmacosx-version-min=$macos_deployment_target $AM_CPPFLAGS"
   AM_LDFLAGS="-mmacosx-version-min=$macos_deployment_target $AM_LDFLAGS"
   AC_SUBST(macos_deployment_target,"${macos_deployment_target}")
   AC_MSG_CHECKING([the macos deployment target for LyX])
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Amend change d1d22a1433e503c3f36aa982c2a7ec9d1f79273d - configure Mac compiler flags on Mac only

2021-12-05 Thread Stephan Witt
commit f700aa98d45f019d4cf875009dc684bbda32a5ec
Author: Stephan Witt 
Date:   Sun Dec 5 22:36:36 2021 +0100

Amend change d1d22a1433e503c3f36aa982c2a7ec9d1f79273d  - configure Mac 
compiler flags on Mac only
---
 configure.ac |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index 02a89a8..eabbcf8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -193,7 +193,9 @@ AC_CHECK_FUNCS(chmod close _close fork getpid _getpid lockf 
lstat mkfifo open _o
 AC_FUNC_MKDIR
 AC_FUNC_SELECT_ARGTYPES
 
-LYX_CHECK_MACOS_DEPLOYMENT_TARGET
+if test "$lyx_use_packaging" = "macosx" ; then
+  LYX_CHECK_MACOS_DEPLOYMENT_TARGET
+fi
 
 LYX_CHECK_SPELL_ENGINES
 LYX_USE_INCLUDED_MYTHES
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Qt 5.12.x requires at least MacOS 10.12

2021-12-05 Thread Stephan Witt
commit 495cde1aca42fb94050f9aea2186e165bb2ead06
Author: Stephan Witt 
Date:   Sun Dec 5 22:38:42 2021 +0100

Qt 5.12.x requires at least MacOS 10.12
---
 config/lyxinclude.m4 |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4
index e4acd7b..40f86ab 100644
--- a/config/lyxinclude.m4
+++ b/config/lyxinclude.m4
@@ -686,6 +686,9 @@ AC_DEFUN([LYX_CHECK_MACOS_DEPLOYMENT_TARGET],[
   if test "${macos_deployment_target}" = "auto" ; then
 macos_deployment_target="10.10"
 case "$QTLIB_VERSION" in
+5.12.*)
+  macos_deployment_target="10.12"
+  ;;
 6.*)
   macos_deployment_target="10.14"
   ;;
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] introduce LSMinimumSystemVersion for Mac package with automatic Qt-version based detection plus configure option to choose it manually

2021-12-05 Thread Stephan Witt
commit d1d22a1433e503c3f36aa982c2a7ec9d1f79273d
Author: Stephan Witt 
Date:   Sun Dec 5 11:10:11 2021 +0100

introduce LSMinimumSystemVersion for Mac package with automatic Qt-version 
based detection plus configure option to choose it manually
---
 config/lyxinclude.m4  |   25 +
 configure.ac  |2 ++
 development/LyX-Mac-binary-release.sh |8 
 development/MacOSX/Info.plist.in  |2 ++
 4 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4
index afad2bd..e4acd7b 100644
--- a/config/lyxinclude.m4
+++ b/config/lyxinclude.m4
@@ -674,6 +674,31 @@ AC_DEFUN([LYX_USE_INCLUDED_MYTHES],[
 ])
 
 
+dnl Usage: LYX_CHECK_MACOS_DEPLOYMENT_TARGET : select the macos deployment 
target
+dnl   [default-auto-value])
+dnl  Assign the macosx-version-min value for compiler, linker and Info.plist.
+dnl  Default is dynamic - depends on used Qt library version.
+AC_DEFUN([LYX_CHECK_MACOS_DEPLOYMENT_TARGET],[
+  AC_ARG_WITH(macos-deployment-target,
+[AS_HELP_STRING([--with-macos-deployment-target], [force the macos 
deployment target for LyX])],
+[macos_deployment_target=$withval],
+[macos_deployment_target=auto])
+  if test "${macos_deployment_target}" = "auto" ; then
+macos_deployment_target="10.10"
+case "$QTLIB_VERSION" in
+6.*)
+  macos_deployment_target="10.14"
+  ;;
+esac
+  fi
+  AM_CXXFLAGS="-mmacosx-version-min=$macos_deployment_target $AM_CXXFLAGS"
+  AM_LDFLAGS="-mmacosx-version-min=$macos_deployment_target $AM_LDFLAGS"
+  AC_SUBST(macos_deployment_target,"${macos_deployment_target}")
+  AC_MSG_CHECKING([the macos deployment target for LyX])
+  AC_MSG_RESULT([$macos_deployment_target])
+])
+
+
 dnl Usage: LYX_WITH_DIR(dir-name,desc,dir-var-name,default-value,
 dnl   [default-yes-value])
 dnl  Adds a --with-'dir-name' option (described by 'desc') and puts the
diff --git a/configure.ac b/configure.ac
index 785d5c9..02a89a8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -193,6 +193,8 @@ AC_CHECK_FUNCS(chmod close _close fork getpid _getpid lockf 
lstat mkfifo open _o
 AC_FUNC_MKDIR
 AC_FUNC_SELECT_ARGTYPES
 
+LYX_CHECK_MACOS_DEPLOYMENT_TARGET
+
 LYX_CHECK_SPELL_ENGINES
 LYX_USE_INCLUDED_MYTHES
 
diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index 30233cc..04da1f3 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -146,7 +146,6 @@ usage() {
echo " --aspell-deployment=yes|no ." default yes
echo " --with-qt-frameworks=yes|no." default no
echo " --qt-deployment=yes|no ." default yes
-   echo " --with-macosx-target=TARGET " default 10.4 "(Tiger)"
echo " --with-sdkroot=SDKROOT ." default 10.5 "(Leopard)"
echo " --with-arch=ARCH ..." default ppc,i386
echo " --with-build-path=PATH ." default 
\${lyx-src-dir}/../lyx-build
@@ -190,8 +189,9 @@ while [ $# -gt 0 ]; do
QTDIR=$(echo ${1}|cut -d= -f2)
shift
;;
-   --with-macosx-target=*)
+   --with-macos-deployment-target=*)
MACOSX_DEPLOYMENT_TARGET=$(echo ${1}|cut -d= -f2)
+   LyXConfigureOptions="${LyXConfigureOptions} ${1}"
shift
;;
--with-sdkroot=*)
@@ -690,8 +690,8 @@ build_lyx() {
if [ -d "${LyxBuildDir}" ];  then rm -r "${LyxBuildDir}"; fi
mkdir -p "${LyxBuildDir}" && cd "${LyxBuildDir}"
 
-   CPPFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} 
${MYCFLAGS}"
-   LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} 
${MYLDFLAGS}"
+   CPPFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch}"
+   LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch}"
 
if [ "$configure_qt_frameworks" = "yes" ]; then
export QT_CORE_CFLAGS="-FQtCore"
diff --git a/development/MacOSX/Info.plist.in b/development/MacOSX/Info.plist.in
index 64f12ae..e8d3b09 100644
--- a/development/MacOSX/Info.plist.in
+++ b/development/MacOSX/Info.plist.in
@@ -41,6 +41,8 @@
YES
OSAScriptingDefinition
LyX.sdef
+   LSMinimumSystemVersion
+   @macos_deployment_target@
NSHighResolutionCapable

NSPrincipalClass
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/2.3.x] #12150 don't set the directory file permissions of LyX app bundle to 444 anymore

2021-10-31 Thread Stephan Witt
commit 44555856087b9a02a0cc1e972784eefd8b5ff04f
Author: Stephan Witt 
Date:   Sun Oct 24 21:43:23 2021 +0200

#12150 don't set the directory file permissions of LyX app bundle to 444 
anymore

(cherry picked from commit c38e759b283df3074f1cfb2897115162af337464)

plus status entry
---
 development/LyX-Mac-binary-release.sh |2 +-
 status.23x|2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index 94dc534..7056868 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -1075,6 +1075,6 @@ if [ ${LyxOnlyPackage:-"no"} = "no" ]; then
convert_universal
copy_dictionaries
test -n "${CODESIGN_IDENTITY}" && code_sign "${LYX_BUNDLE_PATH}"
-   find "${LyxAppPrefix}" -type d -exec chmod a-w '{}' \;
+   find "${LyxAppPrefix}" -type d -exec chmod go-w '{}' \;
 fi
 build_package
diff --git a/status.23x b/status.23x
index 11782e9..12af422 100644
--- a/status.23x
+++ b/status.23x
@@ -54,6 +54,8 @@ What's new
 
 - Fix framework name case error for QtDBus on Mac (bug 12305)
 
+- Fix directory permission of .app bundle on Mac (bug 12150)
+
 
 
 ** Bug fixes:
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/2.3.x] #12247 disable Qt5 modifier hack for Qt-5.12 version or newer

2021-10-31 Thread Stephan Witt
commit 8b7c1d7800c73c4c7b897d2b81a0f3f720c8d06d
Author: Stephan Witt 
Date:   Sun Oct 31 10:35:15 2021 +0100

#12247 disable Qt5 modifier hack for Qt-5.12 version or newer

backport of commit c5262f04a266cc2e499a4a341daf9528feaa8dd3
---
 src/frontends/qt4/GuiKeySymbol.cpp |3 ++-
 status.23x |2 ++
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt4/GuiKeySymbol.cpp 
b/src/frontends/qt4/GuiKeySymbol.cpp
index a01682c..506164b 100644
--- a/src/frontends/qt4/GuiKeySymbol.cpp
+++ b/src/frontends/qt4/GuiKeySymbol.cpp
@@ -745,10 +745,11 @@ bool KeySymbol::operator==(KeySymbol const & ks) const
 KeyModifier q_key_state(Qt::KeyboardModifiers state)
 {
KeyModifier k = NoModifier;
-#if defined(Q_OS_MAC) && QT_VERSION > 0x05
+#if defined(Q_OS_MAC) && (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) && 
(QT_VERSION < QT_VERSION_CHECK(5, 12, 0))
/// Additional check for Control and Meta modifier swap state.
/// Starting with Qt 5 the modifiers aren't reported correctly.
/// Until this is fixed a correction is required.
+   /// AFAIK it is fixed at least with Qt 5.12.0
const bool dontSwapCtrlAndMeta =

frontend::theGuiApp()->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta);
 #else
diff --git a/status.23x b/status.23x
index 5795714..11782e9 100644
--- a/status.23x
+++ b/status.23x
@@ -42,6 +42,8 @@ What's new
 
 - Add Qt platform name in About dialog.
 
+- Fix broken modifier handling for Qt-5.12 on Mac (bug 12247).
+
 
 * DOCUMENTATION AND LOCALIZATION
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Fix for bug #11974

2021-10-31 Thread Stephan Witt
commit 96a4dd235eae438073b3a2b00c73ff930f7be14a
Author: Daniel Ramoeller 
Date:   Tue Sep 15 07:31:53 2020 +0200

Fix for bug #11974

Support for setUnifiedTitleAndToolBarOnMac (unify toolbar and title bar).
---
 src/frontends/qt/GuiView.cpp |   14 +-
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index 767791f..9aa325f 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -1039,6 +1039,11 @@ void GuiView::updateLockToolbars()
if (tb && tb->isMovable())
toolbarsMovable_ = true;
}
+#if QT_VERSION >= 0x050200
+   // set unified mac toolbars only when not movable as recommended:
+   // 
https://doc.qt.io/qt-5/qmainwindow.html#unifiedTitleAndToolBarOnMac-prop
+   setUnifiedTitleAndToolBarOnMac(!toolbarsMovable_);
+#endif
 }
 
 
@@ -4488,12 +4493,11 @@ void GuiView::dispatch(FuncRequest const & cmd, 
DispatchResult & dr)
dr.setMessage(_("Toolbars unlocked."));
else
dr.setMessage(_("Toolbars locked."));
-   } else if (GuiToolbar * t = toolbar(name)) {
+   } else if (GuiToolbar * tb = toolbar(name))
// toggle current toolbar movablity
-   t->movable();
-   // update lock (all) toolbars positions
-   updateLockToolbars();
-   }
+   tb->movable();
+   // update lock (all) toolbars positions
+   updateLockToolbars();
break;
}
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Improved Qt framework configuration detection on macOS, add support for Qt6

2021-10-24 Thread Stephan Witt
commit aabe9e8b11b73d57d22893f5889ebee9dd97efe5
Author: Stephan Witt 
Date:   Sun Oct 24 21:41:11 2021 +0200

Improved Qt framework configuration detection on macOS, add support for Qt6
---
 config/qt.m4  |   21 ++---
 development/LyX-Mac-binary-release.sh |   16 +---
 2 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/config/qt.m4 b/config/qt.m4
index 129e2ab..b9ffe28 100644
--- a/config/qt.m4
+++ b/config/qt.m4
@@ -44,6 +44,7 @@ AC_DEFUN([QT_CHECK_COMPILE],
qt_cv_libname=
for libname in $qt_guilibs \
   '-framework QtCore -framework QtConcurrent 
-framework QtSvg -framework QtWidgets -framework QtMacExtras -framework QtGui'\
+  '-framework QtCore -framework QtConcurrent 
-framework QtSvg -framework QtSvgWidgets -framework QtWidgets -framework QtGui'\
   '-framework QtCore -framework QtGui'
do
QT_TRY_LINK($libname)
@@ -366,21 +367,27 @@ AC_DEFUN([QT_DO_MANUAL_CONFIG],
QT_CORE_LDFLAGS=
if test -n "$qt_cv_includes"; then
QT_INCLUDES="-I$qt_cv_includes"
-   for i in Qt QtCore QtGui QtWidgets QtSvg QtConcurrent 
QtMacExtras; do
+   for i in Qt QtCore QtGui QtWidgets QtSvg QtConcurrent 
QtSvgWidgets QtCore5Compat QtMacExtras; do
QT_INCLUDES="$QT_INCLUDES -I$qt_cv_includes/$i"
+   if test "$lyx_use_packaging" = "macosx" ; then
+   QT_INCLUDES="$QT_INCLUDES 
-I$qt_cv_libraries/${i}.framework/Headers"
+   fi
done
QT_CORE_INCLUDES="-I$qt_cv_includes -I$qt_cv_includes/QtCore"
fi
case "$qt_cv_libraries" in
-   *framework*)
-   QT_LDFLAGS="-F$qt_cv_libraries"
-   QT_CORE_LDFLAGS="-F$qt_cv_libraries"
-   ;;
"")
;;
*)
-   QT_LDFLAGS="-L$qt_cv_libraries"
-   QT_CORE_LDFLAGS="-L$qt_cv_libraries"
+   if test "$lyx_use_packaging" = "macosx" ; then
+   QT_INCLUDES="$QT_INCLUDES -F$qt_cv_libraries"
+   QT_CORE_INCLUDES="$QT_CORE_INCLUDES 
-I$qt_cv_libraries/QtCore.framework/Headers -F$qt_cv_libraries"
+   QT_LDFLAGS="-F$qt_cv_libraries"
+   QT_CORE_LDFLAGS="-F$qt_cv_libraries"
+   else
+   QT_LDFLAGS="-L$qt_cv_libraries"
+   QT_CORE_LDFLAGS="-L$qt_cv_libraries"
+   fi
;;
esac
AC_SUBST(QT_INCLUDES)
diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index 00b58e4..7cd3b79 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -374,6 +374,10 @@ case "${QtVersion}" in
QtLibraries=${QtLibraries:-"QtSvg QtXml QtPrintSupport QtMacExtras 
QtWidgets QtGui QtNetwork QtConcurrent QtCore"}
QtFrameworkVersion="5"
;;
+6*)
+   QtLibraries=${QtLibraries:-"QtCore5Compat QtDBus QtSvg QtXml 
QtPrintSupport QtSvgWidgets QtWidgets QtGui QtNetwork QtConcurrent QtCore"}
+   QtFrameworkVersion="A"
+   ;;
 *)
QtLibraries=${QtLibraries:-"QtSvg QtXml QtGui QtNetwork QtCore"}
QtFrameworkVersion="4"
@@ -425,16 +429,6 @@ build_qt() {
"${QtSourceDir}"/configure ${QtConfigureOptions} ${QTARCHS} 
-prefix "${QtInstallDir}"
make -j1 && make -j1 install
)
-   if [ -d "${QtInstallDir}" -a ! -f "${QtInstallDir}"/include/QtCore ]; 
then
-   cd "${QtInstallDir}" && (
-   mkdir -p include
-   cd include
-   for libnm in ${QtLibraries} ; do
-   test -d ${libnm} -o -L ${libnm} || \
-   ( ln -s ../lib/${libnm}.framework/Headers 
${libnm} && echo Link to framework ${libnm} )
-   done
-   )
-   fi
 }
 
 case ${QtOnlyPackage:-"no"} in
@@ -697,7 +691,7 @@ build_lyx() {
mkdir -p "${LyxBuildDir}" && cd "${LyxBuildDir}"
 
CPPFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} 
${MYCFLAGS}"
-   LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} 
${MYLDFLAGS} -F${QtInstallDir}/lib"
+   LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} 
${MYLDFLAGS}"
 
if [ "$configure_qt_frameworks" = "yes" ]; then
export QT_CORE_CFLAGS="-FQtCore"
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] #12150 don't set the directory file permissions of LyX app bundle to 444 anymore

2021-10-24 Thread Stephan Witt
commit c38e759b283df3074f1cfb2897115162af337464
Author: Stephan Witt 
Date:   Sun Oct 24 21:43:23 2021 +0200

#12150 don't set the directory file permissions of LyX app bundle to 444 
anymore
---
 development/LyX-Mac-binary-release.sh |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index 7cd3b79..30233cc 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -1076,6 +1076,6 @@ if [ ${LyxOnlyPackage:-"no"} = "no" ]; then
convert_universal
copy_dictionaries
test -n "${CODESIGN_IDENTITY}" && code_sign "${LYX_BUNDLE_PATH}"
-   find "${LyxAppPrefix}" -type d -exec chmod a-w '{}' \;
+   find "${LyxAppPrefix}" -type d -exec chmod go-w '{}' \;
 fi
 build_package
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] #12408 improved release notes text for changed shortcuts on macOS

2021-10-24 Thread Stephan Witt
commit c52344e8590bef4ca034eb03270125dd37bef3e3
Author: Stephan Witt 
Date:   Sun Oct 24 11:28:03 2021 +0200

#12408 improved release notes text for changed shortcuts on macOS
---
 lib/RELEASE-NOTES |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/RELEASE-NOTES b/lib/RELEASE-NOTES
index ffcbeb5..b779b62 100644
--- a/lib/RELEASE-NOTES
+++ b/lib/RELEASE-NOTES
@@ -24,8 +24,10 @@
 * This allows Shift-F3 to be used for word-find-backwards (i.e., find previous)
   on Linux and Windows.
 
-* The shortcut for word-find on OSX is now Cmd-E, as is the Apple standard. The
-  shortcut for word-find-previous is Cmd-G.
+* The shortcut to use the selection for a find on macOS is now Cmd-E, as is the
+  Apple standard.  The shortcut for find the next occurrence of the current
+  find buffer text is Cmd-G.  The shortcut for toggle of font emphasis has 
been 
+  changed to Cmd-Ctrl-E.
 
 * Continuous spellcheck is now on by default, but only if the user does not 
have
   an existing preferences file. In that case, the old setting is preserved.
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] #12201 force open document in tabs on Mac when user preference is Always

2021-10-23 Thread Stephan Witt
commit 436620a881dd85141d89bd3c26c462056b4d9c2a
Author: Stephan Witt 
Date:   Sat Oct 23 13:34:18 2021 +0200

#12201 force open document in tabs on Mac when user preference is Always
---
 src/LyXRC.cpp |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp
index 6bc28e9..62673f4 100644
--- a/src/LyXRC.cpp
+++ b/src/LyXRC.cpp
@@ -286,10 +286,6 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool 
check_format)
// format prior to 2.0 and introduction of format tag
unsigned int rc_format = 0;
 
-#ifdef USE_MACOSX_PACKAGING
-   open_buffers_in_tabs = appleUserTabbingPreferenceAlways();
-#endif
-
while (lexrc.isOK()) {
// By using two switches we take advantage of the compiler
// telling us if we have missed a LyXRCTags element in
@@ -1064,6 +1060,10 @@ LyXRC::ReturnValues LyXRC::read(Lexer & lexrc, bool 
check_format)
break;
case RC_OPEN_BUFFERS_IN_TABS:
lexrc >> open_buffers_in_tabs;
+#ifdef USE_MACOSX_PACKAGING
+   if (appleUserTabbingPreferenceAlways())
+   open_buffers_in_tabs = true;
+#endif
break;
case RC_SINGLE_CLOSE_TAB_BUTTON:
lexrc >> single_close_tab_button;
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] #12368 correct spelling of toolbars visibility check function name

2021-10-13 Thread Stephan Witt
commit b59eed3846613d1ade80df12932f497d03db1c4d
Author: Stephan Witt 
Date:   Wed Oct 13 18:11:37 2021 +0200

#12368 correct spelling of toolbars visibility check function name
---
 src/frontends/qt/GuiToolbar.cpp |6 +++---
 src/frontends/qt/GuiToolbar.h   |2 +-
 src/frontends/qt/GuiView.cpp|4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/frontends/qt/GuiToolbar.cpp b/src/frontends/qt/GuiToolbar.cpp
index 351e826..bc2613d 100644
--- a/src/frontends/qt/GuiToolbar.cpp
+++ b/src/frontends/qt/GuiToolbar.cpp
@@ -626,7 +626,7 @@ void GuiToolbar::restoreSession()
 }
 
 
-bool GuiToolbar::isVisibiltyOn() const
+bool GuiToolbar::isVisibilityOn() const
 {
return visibility_ & Toolbars::ON;
 }
@@ -663,10 +663,10 @@ void GuiToolbar::setState(string const state)
 void GuiToolbar::toggle()
 {
if (visibility_ & Toolbars::ALLOWAUTO) {
-   if (!(visibility_ & Toolbars::AUTO) && !isVisibiltyOn()) {
+   if (!(visibility_ & Toolbars::AUTO) && !isVisibilityOn()) {
setState("auto");
} else {
-   if (isVisibiltyOn())
+   if (isVisibilityOn())
setState("off");
else
setState("on");
diff --git a/src/frontends/qt/GuiToolbar.h b/src/frontends/qt/GuiToolbar.h
index cf269b6..f1cc13a 100644
--- a/src/frontends/qt/GuiToolbar.h
+++ b/src/frontends/qt/GuiToolbar.h
@@ -149,7 +149,7 @@ public:
bool isRestored() const;
 
///
-   bool isVisibiltyOn() const;
+   bool isVisibilityOn() const;
int visibility() const { return visibility_; }
 
/// Refresh the contents of the bar.
diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index 6e433e1..767791f 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -1516,7 +1516,7 @@ bool GuiView::event(QEvent * e)
menuBar()->hide();
if (lyxrc.full_screen_toolbars) {
for (auto const & tb_p  : d.toolbars_)
-   if (tb_p.second->isVisibiltyOn() && 
tb_p.second->isVisible())
+   if (tb_p.second->isVisibilityOn() && 
tb_p.second->isVisible())
tb_p.second->hide();
}
for (int i = 0; i != d.splitter_->count(); ++i)
@@ -1537,7 +1537,7 @@ bool GuiView::event(QEvent * e)
menuBar()->show();
if (lyxrc.full_screen_toolbars) {
for (auto const & tb_p  : d.toolbars_)
-   if (tb_p.second->isVisibiltyOn() && 
!tb_p.second->isVisible())
+   if (tb_p.second->isVisibilityOn() && 
!tb_p.second->isVisible())
tb_p.second->show();
//updateToolbars();
}
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] #12247 disable Qt5 modifier hack for Qt-5.12 version or newer

2021-08-23 Thread Stephan Witt
commit c5262f04a266cc2e499a4a341daf9528feaa8dd3
Author: Stephan Witt 
Date:   Mon Aug 23 14:44:36 2021 +0200

#12247 disable Qt5 modifier hack for Qt-5.12 version or newer

Initially Qt5 modifier handling was broken. Therefore a workaround was 
introduced.
This workaround broke the LyX modifier handling with swap of 
Command-Control-key disabled.
The change disables the hack to get the correct behavior in LyX.
---
 src/frontends/qt/GuiKeySymbol.cpp |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt/GuiKeySymbol.cpp 
b/src/frontends/qt/GuiKeySymbol.cpp
index c1882f7..77e3dc3 100644
--- a/src/frontends/qt/GuiKeySymbol.cpp
+++ b/src/frontends/qt/GuiKeySymbol.cpp
@@ -859,10 +859,11 @@ bool KeySymbol::operator==(KeySymbol const & ks) const
 KeyModifier q_key_state(Qt::KeyboardModifiers state)
 {
KeyModifier k = NoModifier;
-#if defined(Q_OS_MAC) && QT_VERSION > 0x05
+#if defined(Q_OS_MAC) && (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)) && 
(QT_VERSION < QT_VERSION_CHECK(5, 12, 0))
/// Additional check for Control and Meta modifier swap state.
/// Starting with Qt 5 the modifiers aren't reported correctly.
/// Until this is fixed a correction is required.
+   /// AFAIK it is fixed at least with Qt 5.12.0
const bool dontSwapCtrlAndMeta =

frontend::theGuiApp()->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta);
 #else
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Correct moc compiler version extractor regex for patch level greater 9.

2021-07-16 Thread Stephan Witt
commit c93c94fd22b30841e3d36fc8fc583a70091cc72f
Author: Stephan Witt 
Date:   Fri Jul 16 18:12:33 2021 +0200

Correct moc compiler version extractor regex for patch level greater 9.
---
 config/qt.m4 |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/config/qt.m4 b/config/qt.m4
index 7fe329f..d41332a 100644
--- a/config/qt.m4
+++ b/config/qt.m4
@@ -272,7 +272,7 @@ AC_DEFUN([QT_DO_IT_ALL],
QT_FIND_TOOL([QT_RCC], [rcc])
 
dnl Safety check
-   mocqtver=`$QT_MOC -v 2>&1 | sed -e 
's/.*\([[0-9]]\.[[0-9]]*\.[[0-9]]\).*/\1/'`
+   mocqtver=`$QT_MOC -v 2>&1 | sed -e 
's/.*\([[0-9]]\.[[0-9]]*\.[[0-9]]*\).*/\1/'`
if test "x$mocqtver" != "x$QTLIB_VERSION"; then
LYX_WARNING([The found moc compiler is for Qt $mocqtver but the 
Qt library version is $QTLIB_VERSION.])
fi
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Care for included hunspell library.

2021-07-16 Thread Stephan Witt
commit 39caab265d89446132275c23d360193b5f26202c
Author: Stephan Witt 
Date:   Fri Jul 16 16:35:30 2021 +0200

Care for included hunspell library.
---
 development/LyX-Mac-binary-release.sh |   14 +-
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index dcc6316..00b58e4 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -268,9 +268,15 @@ while [ $# -gt 0 ]; do
aspell_deployment="no"
shift
;;
+   --with-included-hunspell)
+   LyXConfigureOptions="${LyXConfigureOptions} ${1}"
+   hunspell_deployment="no"
+   shift
+   ;;
--without-hunspell)
LyXConfigureOptions="${LyXConfigureOptions} ${1}"
hunspell_deployment="no"
+   hunspell_dictionaries="no"
shift
;;
--only-qt*=*)
@@ -946,12 +952,10 @@ copy_dictionaries() {
cp -p -r "${ASpellInstallDir}/lib/aspell-0.60"/* 
"${ASpellResources}"/data
cp -p -r "${ASpellInstallDir}/share/aspell"/* 
"${ASpellResources}"/dicts
fi
-   if [ -d "${HunSpellInstallDir}" -a "yes" = "${hunspell_dictionaries}" 
]; then
+   if [ -d "${DictionarySourceDir}" -a "yes" = "${hunspell_dictionaries}" 
]; then
HunSpellResources="${LyxAppPrefix}/Contents/Resources"
-   if [ -d "${DictionarySourceDir}" ]; then
-   ( cd "${DictionarySourceDir}" && find dicts -name .svn 
-prune -o -type f -print | cpio -pmdv "${HunSpellResources}" )
-   deduplicate "${HunSpellResources}"/dicts
-   fi
+   ( cd "${DictionarySourceDir}" && find dicts -name .svn -prune 
-o -type f -print | cpio -pmdv "${HunSpellResources}" )
+   deduplicate "${HunSpellResources}"/dicts
fi
if [ -d "${DictionarySourceDir}" -a "yes" = "${thesaurus_deployment}" 
]; then
MyThesResources="${LyxAppPrefix}/Contents/Resources"
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Use a central typedef for vectors of WordLangTuple.

2021-07-16 Thread Stephan Witt
commit 4716b1f91a4d48532c92c40b8c4a879d083de7c8
Author: Stephan Witt 
Date:   Fri Jul 16 16:39:05 2021 +0200

Use a central typedef for vectors of WordLangTuple.
---
 src/BufferParams.cpp|9 +++--
 src/BufferParams.h  |6 ++
 src/HunspellChecker.cpp |8 +++-
 src/WordLangTuple.h |5 +
 4 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp
index ec4cc0d..d9fb39e 100644
--- a/src/BufferParams.cpp
+++ b/src/BufferParams.cpp
@@ -341,7 +341,7 @@ public:
 
AuthorList authorlist;
BranchList branchlist;
-   IgnoreList spellignore;
+   WordLangTable spellignore;
Bullet temp_bullets[4];
Bullet user_defined_bullets[4];
IndicesList indiceslist;
@@ -602,16 +602,13 @@ IndicesList const & BufferParams::indiceslist() const
 }
 
 
-typedef std::vector IgnoreList;
-
-
-IgnoreList & BufferParams::spellignore()
+WordLangTable & BufferParams::spellignore()
 {
return pimpl_->spellignore;
 }
 
 
-IgnoreList const & BufferParams::spellignore() const
+WordLangTable const & BufferParams::spellignore() const
 {
return pimpl_->spellignore;
 }
diff --git a/src/BufferParams.h b/src/BufferParams.h
index 2c74f70..a1dfaa9 100644
--- a/src/BufferParams.h
+++ b/src/BufferParams.h
@@ -337,10 +337,8 @@ public:
IndicesList & indiceslist();
IndicesList const & indiceslist() const;
///
-   typedef std::vector IgnoreList;
-   ///
-   IgnoreList & spellignore();
-   IgnoreList const & spellignore() const;
+   WordLangTable & spellignore();
+   WordLangTable const & spellignore() const;
bool spellignored(WordLangTuple const & wl) const;
/**
 * The LyX name of the input encoding for LaTeX. This can be one of
diff --git a/src/HunspellChecker.cpp b/src/HunspellChecker.cpp
index 1cac9ad..01ec194 100644
--- a/src/HunspellChecker.cpp
+++ b/src/HunspellChecker.cpp
@@ -41,8 +41,6 @@ namespace {
 typedef map Spellers;
 typedef map LangPersonalWordList;
 
-typedef vector IgnoreList;
-
 docstring remap_result(docstring const & s)
 {
// substitute RIGHT SINGLE QUOTATION MARK
@@ -78,7 +76,7 @@ struct HunspellChecker::Private
/// the spellers
Spellers spellers_;
///
-   IgnoreList ignored_;
+   WordLangTable ignored_;
///
LangPersonalWordList personal_;
///
@@ -283,7 +281,7 @@ int HunspellChecker::Private::numDictionaries() const
 
 bool HunspellChecker::Private::isIgnored(WordLangTuple const & wl) const
 {
-   IgnoreList::const_iterator it = ignored_.begin();
+   WordLangTable::const_iterator it = ignored_.begin();
for (; it != ignored_.end(); ++it) {
if (it->lang()->code() != wl.lang()->code())
continue;
@@ -350,7 +348,7 @@ SpellChecker::Result HunspellChecker::check(WordLangTuple 
const & wl,
if (d->isIgnored(wl))
return WORD_OK;
 
-   IgnoreList::const_iterator it = docdict.begin();
+   WordLangTable::const_iterator it = docdict.begin();
for (; it != docdict.end(); ++it) {
if (it->lang()->code() != wl.lang()->code())
continue;
diff --git a/src/WordLangTuple.h b/src/WordLangTuple.h
index baf9338..6459c46 100644
--- a/src/WordLangTuple.h
+++ b/src/WordLangTuple.h
@@ -16,6 +16,8 @@
 
 #include "support/docstring.h"
 
+#include 
+
 
 namespace lyx {
 
@@ -51,6 +53,9 @@ private:
 };
 
 
+typedef std::vector WordLangTable;
+
+
 } // namespace lyx
 
 #endif // WORD_LANG_TUPLE_H
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/2.3.x] #12305 add status entry for back-port

2021-07-04 Thread Stephan Witt
commit 3be447c9d86293ee854a08d96f78b1d6547c1208
Author: Stephan Witt 
Date:   Wed Jun 16 07:58:32 2021 +0200

#12305 add status entry for back-port
---
 status.23x |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/status.23x b/status.23x
index 21230cf..9ab48d5 100644
--- a/status.23x
+++ b/status.23x
@@ -46,6 +46,7 @@ What's new
 
 * BUILD/INSTALLATION
 
+- Fix framework name case error for QtDBus on Mac (bug 12305)
 
 
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/2.3.x] #12305 Correct typo in library name QtDBus - fatal error with case sensitive file systems

2021-07-04 Thread Stephan Witt
commit beac25f08e66081a55133e76395a91735e469123
Author: Stephan Witt 
Date:   Wed Jun 16 07:45:20 2021 +0200

#12305 Correct typo in library name QtDBus - fatal error with case 
sensitive file systems

(cherry picked from commit 15d1f2c76d523f89c7223022e2f73aec3f2e7e15)
---
 development/LyX-Mac-binary-release.sh |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index 5812360..94dc534 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -361,7 +361,7 @@ case "${QtVersion}" in
QtFrameworkVersion="5"
;;
 5.12.*)
-   QtLibraries=${QtLibraries:-"QtDbus QtSvg QtXml QtPrintSupport 
QtMacExtras QtWidgets QtGui QtNetwork QtConcurrent QtCore"}
+   QtLibraries=${QtLibraries:-"QtDBus QtSvg QtXml QtPrintSupport 
QtMacExtras QtWidgets QtGui QtNetwork QtConcurrent QtCore"}
QtFrameworkVersion="5"
;;
 5*)
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] #12305 Correct typo in library name QtDBus - fatal error with case sensitive file systems

2021-06-15 Thread Stephan Witt
commit 15d1f2c76d523f89c7223022e2f73aec3f2e7e15
Author: Stephan Witt 
Date:   Wed Jun 16 07:45:20 2021 +0200

#12305 Correct typo in library name QtDBus - fatal error with case 
sensitive file systems
---
 development/LyX-Mac-binary-release.sh |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index 2399394..dcc6316 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -361,7 +361,7 @@ case "${QtVersion}" in
QtFrameworkVersion="5"
;;
 5.12.*)
-   QtLibraries=${QtLibraries:-"QtDbus QtSvg QtXml QtPrintSupport 
QtMacExtras QtWidgets QtGui QtNetwork QtConcurrent QtCore"}
+   QtLibraries=${QtLibraries:-"QtDBus QtSvg QtXml QtPrintSupport 
QtMacExtras QtWidgets QtGui QtNetwork QtConcurrent QtCore"}
QtFrameworkVersion="5"
;;
 5*)
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Pass Qt library location as link option for frameworks on Mac

2021-05-30 Thread Stephan Witt
commit c518c57a78f3d240ed59deb81febe7800cca2d70
Author: Stephan Witt 
Date:   Sun May 30 17:30:08 2021 +0200

Pass Qt library location as link option for frameworks on Mac
---
 development/LyX-Mac-binary-release.sh |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index 1a48a0d..2399394 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -691,7 +691,7 @@ build_lyx() {
mkdir -p "${LyxBuildDir}" && cd "${LyxBuildDir}"
 
CPPFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} 
${MYCFLAGS}"
-   LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} 
${MYLDFLAGS}"
+   LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} 
${MYLDFLAGS} -F${QtInstallDir}/lib"
 
if [ "$configure_qt_frameworks" = "yes" ]; then
export QT_CORE_CFLAGS="-FQtCore"
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Add macOS 11 to SDK detection for builds on Mac

2021-05-30 Thread Stephan Witt
commit 187a9d643902215f881d172ca7c7da71b341bb2c
Author: Stephan Witt 
Date:   Sun May 30 17:22:42 2021 +0200

Add macOS 11 to SDK detection for builds on Mac
---
 development/LyX-Mac-binary-release.sh |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/development/LyX-Mac-binary-release.sh 
b/development/LyX-Mac-binary-release.sh
index f918bca..1a48a0d 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -378,7 +378,7 @@ 
DMGNAME="${LyxBase}${LyXGitCommitHash:+-}${LyXGitCommitHash}"
 DMGSIZE="550m"
 
 # Check for existing SDKs
-SDKs=$(echo ${DEVELOPER_SDKS}/MacOSX10*sdk)
+SDKs=$(echo ${DEVELOPER_SDKS}/MacOSX1[01]*sdk)
 case $SDKs in
 *${SDKROOT}*)
;;
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Amend change 07122f066b - correct string access.

2021-03-08 Thread Stephan Witt
commit 6273c1f66d9b920053119d59a8ecf07dcf02bcc1
Author: Stephan Witt 
Date:   Mon Mar 8 21:26:58 2021 +0100

Amend change 07122f066b - correct string access.
---
 src/Paragraph.cpp |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 9bfa3b8..f0e6741 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -4949,6 +4949,7 @@ void Paragraph::Private::markMisspelledWords(
/// should not happen if speller supports range checks
if (!wlen)
continue;
+   WordLangTuple const candidate(word.substr(wstart, wlen), lang);
wstart += first + numskipped;
if (snext < wstart) {
/// mark the range of correct spelling
@@ -4958,7 +4959,6 @@ void Paragraph::Private::markMisspelledWords(
}
snext = wstart + wlen;
// Check whether the candidate is in the document's local dict
-   WordLangTuple const candidate(word.substr(wstart, wlen), lang);
SpellChecker::Result actresult = result;
if (inset_owner_->buffer().params().spellignored(candidate))
actresult = SpellChecker::DOCUMENT_LEARNED_WORD;
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Refactoring: move check for match in spellignore() to buffer params.

2021-03-07 Thread Stephan Witt
commit 07122f066b43f9dd41462932894a91aed78201d0
Author: Stephan Witt 
Date:   Sun Mar 7 17:46:01 2021 +0100

Refactoring: move check for match in spellignore() to buffer params.
---
 src/BufferParams.cpp |   17 +
 src/BufferParams.h   |1 +
 src/Paragraph.cpp|   26 --
 src/Text3.cpp|   12 +---
 4 files changed, 27 insertions(+), 29 deletions(-)

diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp
index d4fb384..35c2172 100644
--- a/src/BufferParams.cpp
+++ b/src/BufferParams.cpp
@@ -616,6 +616,23 @@ IgnoreList const & BufferParams::spellignore() const
 }
 
 
+bool BufferParams::spellignored(WordLangTuple const & wl) const
+{
+   bool has_item = false;
+   vector il = spellignore();
+   vector::const_iterator it = il.begin();
+   for (; it != il.end(); ++it) {
+   if (it->lang()->code() != wl.lang()->code())
+   continue;
+   if (it->word() == wl.word()) {
+   has_item = true;
+   break;
+   }
+   }
+   return has_item;
+}
+
+
 Bullet & BufferParams::temp_bullet(lyx::size_type const index)
 {
LASSERT(index < 4, return pimpl_->temp_bullets[0]);
diff --git a/src/BufferParams.h b/src/BufferParams.h
index 10233e6..497332b 100644
--- a/src/BufferParams.h
+++ b/src/BufferParams.h
@@ -341,6 +341,7 @@ public:
///
IgnoreList & spellignore();
IgnoreList const & spellignore() const;
+   bool spellignored(WordLangTuple const & wl) const;
/**
 * The LyX name of the input encoding for LaTeX. This can be one of
 * - \c auto: find out the input encoding from the used languages
diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 1faedd6..e4ebf8b 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -464,8 +464,7 @@ public:
 pos_type const & first, pos_type const & last,
 SpellChecker::Result result,
 docstring const & word,
-SkipPositions const & skips,
-vector const & docdict);
+SkipPositions const & skips);
 
InsetCode ownerCode() const
{
@@ -4930,8 +4929,7 @@ void Paragraph::Private::markMisspelledWords(
pos_type const & first, pos_type const & last,
SpellChecker::Result result,
docstring const & word,
-   SkipPositions const & skips,
-   vector const & docdict)
+   SkipPositions const & skips)
 {
if (!SpellChecker::misspelled(result)) {
setMisspelled(first, last, SpellChecker::WORD_OK);
@@ -4951,7 +4949,6 @@ void Paragraph::Private::markMisspelledWords(
/// should not happen if speller supports range checks
if (!wlen)
continue;
-   docstring const candidate = word.substr(wstart, wlen);
wstart += first + numskipped;
if (snext < wstart) {
/// mark the range of correct spelling
@@ -4961,26 +4958,20 @@ void Paragraph::Private::markMisspelledWords(
}
snext = wstart + wlen;
// Check whether the candidate is in the document's local dict
-   vector::const_iterator iit = docdict.begin();
+   WordLangTuple const candidate(word.substr(wstart, wlen), lang);
SpellChecker::Result actresult = result;
-   for (; iit != docdict.end(); ++iit) {
-   if (iit->lang()->code() != lang->code())
-   continue;
-   if (iit->word() == candidate) {
-   actresult = SpellChecker::WORD_OK;
-   break;
-   }
-   }
+   if (inset_owner_->buffer().params().spellignored(candidate))
+   actresult = SpellChecker::WORD_OK;
numskipped += countSkips(it, et, snext);
/// mark the range of misspelling
setMisspelled(wstart, snext, actresult);
if (actresult == SpellChecker::WORD_OK)
LYXERR(Debug::GUI, "local dictionary word: \"" <<
-  candidate << "\" [" <<
+  candidate.word() << "\" [" <<
   wstart << ".." << (snext-1) << "]");
else
LYXERR(Debug::GUI, "misspelled word: \"" <<
-  candidate << "\" [" <<
+

[LyX/master] Amend 07396ab2445720b21dc8195816eb1aee1f2ae3a7 - fix white space.

2021-03-07 Thread Stephan Witt
commit 3f75fb7a481e8a12653b02523f855c16625c4526
Author: Stephan Witt 
Date:   Sun Mar 7 10:46:00 2021 +0100

Amend 07396ab2445720b21dc8195816eb1aee1f2ae3a7 - fix white space.
---
 src/AppleSpellChecker.cpp |2 +-
 src/Text3.cpp |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/AppleSpellChecker.cpp b/src/AppleSpellChecker.cpp
index 1975121..4f22a5e 100644
--- a/src/AppleSpellChecker.cpp
+++ b/src/AppleSpellChecker.cpp
@@ -87,7 +87,7 @@ SpellChecker::Result AppleSpellChecker::check(WordLangTuple 
const & word,
string const word_str = to_utf8(word.word());
string const lang = d->languageMap[word.lang()->lang()];
 
-   vector::const_iterator it = docdict.begin();
+   vector::const_iterator it = docdict.begin();
for (; it != docdict.end(); ++it) {
if (it->lang()->code() != word.lang()->code())
continue;
diff --git a/src/Text3.cpp b/src/Text3.cpp
index 5e9f6cf..794e962 100644
--- a/src/Text3.cpp
+++ b/src/Text3.cpp
@@ -2770,7 +2770,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
}
break;
}
-   
+
 
case LFUN_SPELLING_IGNORE: {
Language const * language = getLanguage(cur, cmd.getArg(1));
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Amend 07396ab2445720b21dc8195816eb1aee1f2ae3a7 - fix compilation error for Apple spell checker.

2021-03-07 Thread Stephan Witt
commit 2cf86771ed0bc60b13f6303fcfe10baf95133fac
Author: Stephan Witt 
Date:   Sun Mar 7 10:46:31 2021 +0100

Amend 07396ab2445720b21dc8195816eb1aee1f2ae3a7 - fix compilation error for 
Apple spell checker.
---
 src/AppleSpellChecker.cpp |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/AppleSpellChecker.cpp b/src/AppleSpellChecker.cpp
index 4f22a5e..763b809 100644
--- a/src/AppleSpellChecker.cpp
+++ b/src/AppleSpellChecker.cpp
@@ -79,7 +79,7 @@ string AppleSpellChecker::Private::toString(SpellCheckResult 
status)
 
 
 SpellChecker::Result AppleSpellChecker::check(WordLangTuple const & word,
-std::vector docdict)
+std::vector const & docdict)
 {
if (!hasDictionary(word.lang()))
return NO_DICTIONARY;
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Fix Disable Editing "Lock" icon protrudes into tab title on macOS

2021-03-02 Thread Stephan Witt
commit fde432493d62607f8d6a3bd87adc1b1dcded75aa
Author: Daniel Ramoeller 
Date:   Mon Feb 22 11:04:10 2021 +0100

Fix Disable Editing "Lock" icon protrudes into tab title on macOS

On macOS the Disable Editing "Lock" icon protrudes into tab title

Also, since the close button is on the left, the lock is better positioned 
on the right.

The detour via QIcon is to avoid a pixelated pixmap (because in LyX pixmaps 
don't adjust by default to the device's pixel ratio correctly).

Also

Fix for bug #12160.
---
 src/frontends/qt/GuiWorkArea.cpp |   11 +++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/src/frontends/qt/GuiWorkArea.cpp b/src/frontends/qt/GuiWorkArea.cpp
index 39be80c..2ce276d 100644
--- a/src/frontends/qt/GuiWorkArea.cpp
+++ b/src/frontends/qt/GuiWorkArea.cpp
@@ -2020,10 +2020,21 @@ void TabWorkArea::updateTabTexts()
tab_text += "*";
QString tab_tooltip = it->abs();
if (buf.hasReadonlyFlag()) {
+#ifdef Q_OS_MAC
+   QLabel * readOnlyButton = new QLabel();
+   QIcon icon = QIcon(getPixmap("images/", 
"emblem-readonly", "svgz,png"));
+   readOnlyButton->setPixmap(icon.pixmap(QSize(16, 16)));
+   tabBar()->setTabButton(tab_index, QTabBar::RightSide, 
readOnlyButton);
+#else
setTabIcon(tab_index, QIcon(getPixmap("images/", 
"emblem-readonly", "svgz,png")));
+#endif
tab_tooltip = qt_("%1 (read only)").arg(tab_tooltip);
} else
+#ifdef Q_OS_MAC
+   tabBar()->setTabButton(tab_index, QTabBar::RightSide, 
0);
+#else
setTabIcon(tab_index, QIcon());
+#endif
if (buf.notifiesExternalModification()) {
QString const warn = qt_("%1 (modified externally)");
tab_tooltip = warn.arg(tab_tooltip);
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Use document mode on work area and docks on macOS

2021-02-26 Thread Stephan Witt
commit d74367a96e33e3f6cdea273261e262a13339d781
Author: Daniel Ramoeller 
Date:   Mon Feb 22 06:22:51 2021 +0100

Use document mode on work area and docks on macOS

- More fittingly (plain) looking tabs for documents and docks.
- Also macOS fix for bug #9391.
---
 src/frontends/qt/GuiView.cpp |5 
 src/frontends/qt/GuiWorkArea.cpp |   47 +++--
 2 files changed, 19 insertions(+), 33 deletions(-)

diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index c287889..a48540d 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -602,6 +602,11 @@ GuiView::GuiView(int id)
// (such as "source" and "messages")
setDockOptions(QMainWindow::ForceTabbedDocks);
 
+#ifdef Q_OS_MAC
+   // use document mode tabs on docks
+   setDocumentMode(true);
+#endif
+
// For Drag
setAcceptDrops(true);
 
diff --git a/src/frontends/qt/GuiWorkArea.cpp b/src/frontends/qt/GuiWorkArea.cpp
index 02e03aa..39be80c 100644
--- a/src/frontends/qt/GuiWorkArea.cpp
+++ b/src/frontends/qt/GuiWorkArea.cpp
@@ -1470,41 +1470,9 @@ void EmbeddedWorkArea::disable()
 //
 
 
-#ifdef Q_OS_MAC
-class NoTabFrameMacStyle : public QProxyStyle {
-public:
-   ///
-   QRect subElementRect(SubElement element, const QStyleOption * option,
-const QWidget * widget = 0) const
-   {
-   QRect rect = QProxyStyle::subElementRect(element, option, 
widget);
-   bool noBar = static_cast(widget)->count() 
<= 1;
-
-   // The Qt Mac style puts the contents into a 3 pixel wide box
-   // which looks very ugly and not like other Mac applications.
-   // Hence we remove this here, and moreover the 16 pixel round
-   // frame above if the tab bar is hidden.
-   if (element == QStyle::SE_TabWidgetTabContents) {
-   rect.adjust(- rect.left(), 0, rect.left(), 0);
-   if (noBar)
-   rect.setTop(0);
-   }
-
-   return rect;
-   }
-};
-
-NoTabFrameMacStyle noTabFrameMacStyle;
-#endif
-
-
 TabWorkArea::TabWorkArea(QWidget * parent)
: QTabWidget(parent), clicked_tab_(-1), midpressed_tab_(-1)
 {
-#ifdef Q_OS_MAC
-   setStyle();
-#endif
-
QPalette pal = palette();
pal.setColor(QPalette::Active, QPalette::Button,
pal.color(QPalette::Active, QPalette::Window));
@@ -1544,6 +1512,10 @@ TabWorkArea::TabWorkArea(QWidget * parent)
this, SLOT(closeTab(int)));
 
setUsesScrollButtons(true);
+#ifdef Q_OS_MAC
+   // use document mode tabs
+   setDocumentMode(true);
+#endif
 }
 
 
@@ -1634,7 +1606,16 @@ void TabWorkArea::showBar(bool show)
 {
tabBar()->setEnabled(show);
tabBar()->setVisible(show);
-   closeBufferButton->setVisible(show && lyxrc.single_close_tab_button);
+   if (documentMode()) {
+   // avoid blank corner widget when documentMode(true) is used
+   if (show && lyxrc.single_close_tab_button) {
+   setCornerWidget(closeBufferButton, Qt::TopRightCorner);
+   closeBufferButton->setVisible(true);
+   } else
+   // remove corner widget
+   setCornerWidget(nullptr);
+   } else
+   closeBufferButton->setVisible(show && 
lyxrc.single_close_tab_button);
setTabsClosable(!lyxrc.single_close_tab_button);
 }
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Revert "#8055 use standard shortcut for font-emph on Mac"

2021-02-15 Thread Stephan Witt
commit 80f855581c5e553e7be7f7b94679e14e69b9726d
Author: Stephan Witt 
Date:   Mon Feb 15 16:37:14 2021 +0100

Revert "#8055 use standard shortcut for font-emph on Mac"

This reverts commit a9342ae098024e363891653d1bcf7a8d485a271c.
---
 lib/bind/mac.bind |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/bind/mac.bind b/lib/bind/mac.bind
index 531465b..8d54e4c 100644
--- a/lib/bind/mac.bind
+++ b/lib/bind/mac.bind
@@ -141,6 +141,7 @@ Format 5
 \bind "C-S-D""buffer-update dvi"   # 'd' for dvi
 #  +: "Command-E"# Use the selection for a find
 \bind "C-e"  "search-string-set"
+\bind "C-M-e""font-emph"
 #  +: "Command-F"# Open a Find window
 \bind "C-f"  "dialog-toggle findreplace"
 \bind "C-S-f""dialog-toggle findreplaceadv"
@@ -151,8 +152,8 @@ Format 5
 \bind "C-S-g""word-find-backward"
 #  +: "Command-H"# Hide the windows of the currently 
running application
 #  +: "Option-Command-H" # Hide the windows of all other running 
applications
-#  +: "Command-I"# Italicize the selected text or toggle 
italic text on or off
-\bind "C-i"  "command-alternatives inset-toggle; 
font-emph" # 'i' for Inset
+#  -: "Command-I"# Italicize the selected text or toggle 
italic text on or off
+\bind "C-i"  "inset-toggle" # 'i' for Inset
 \bind "C-M-i""inset-settings"
 #  -: "Option-Command-I" # Display an inspector window
 #  -: "Command-J"# Scroll to a selection
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Use explicit initialization for plain pointer to buffer view.

2021-02-15 Thread Stephan Witt
commit 3841304f80513f55ac1bb68336b713e056a72091
Author: Stephan Witt 
Date:   Mon Feb 15 10:03:39 2021 +0100

Use explicit initialization for plain pointer to buffer view.
---
 src/frontends/qt/GuiSearch.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt/GuiSearch.h b/src/frontends/qt/GuiSearch.h
index 92324df..5898229 100644
--- a/src/frontends/qt/GuiSearch.h
+++ b/src/frontends/qt/GuiSearch.h
@@ -66,7 +66,7 @@ private:
 bool casesensitive, bool matchword,
 bool forward, bool all);
///
-   BufferView const * bv_ = {};
+   BufferView const * bv_ = nullptr;
///
bool minimized_ = false;
 };
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] #8055 use standard shortcut for font-emph on Mac

2021-02-15 Thread Stephan Witt
commit a9342ae098024e363891653d1bcf7a8d485a271c
Author: Stephan Witt 
Date:   Mon Feb 15 09:35:31 2021 +0100

#8055 use standard shortcut for font-emph on Mac
---
 lib/bind/mac.bind |5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/bind/mac.bind b/lib/bind/mac.bind
index 8d54e4c..531465b 100644
--- a/lib/bind/mac.bind
+++ b/lib/bind/mac.bind
@@ -141,7 +141,6 @@ Format 5
 \bind "C-S-D""buffer-update dvi"   # 'd' for dvi
 #  +: "Command-E"# Use the selection for a find
 \bind "C-e"  "search-string-set"
-\bind "C-M-e""font-emph"
 #  +: "Command-F"# Open a Find window
 \bind "C-f"  "dialog-toggle findreplace"
 \bind "C-S-f""dialog-toggle findreplaceadv"
@@ -152,8 +151,8 @@ Format 5
 \bind "C-S-g""word-find-backward"
 #  +: "Command-H"# Hide the windows of the currently 
running application
 #  +: "Option-Command-H" # Hide the windows of all other running 
applications
-#  -: "Command-I"# Italicize the selected text or toggle 
italic text on or off
-\bind "C-i"  "inset-toggle" # 'i' for Inset
+#  +: "Command-I"# Italicize the selected text or toggle 
italic text on or off
+\bind "C-i"  "command-alternatives inset-toggle; 
font-emph" # 'i' for Inset
 \bind "C-M-i""inset-settings"
 #  -: "Option-Command-I" # Display an inspector window
 #  -: "Command-J"# Scroll to a selection
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] Additional check for clipboards find buffer support - otherwise Qt complains with unsupported clipboard mode

2021-02-14 Thread Stephan Witt
commit d65e7a8c87a20b67046ac5cfeaf6961d908b5aeb
Author: Stephan Witt 
Date:   Sun Feb 14 22:18:07 2021 +0100

Additional check for clipboards find buffer support - otherwise Qt 
complains with unsupported clipboard mode
---
 src/frontends/qt/GuiClipboard.cpp |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt/GuiClipboard.cpp 
b/src/frontends/qt/GuiClipboard.cpp
index 697977d..6c1d981 100644
--- a/src/frontends/qt/GuiClipboard.cpp
+++ b/src/frontends/qt/GuiClipboard.cpp
@@ -554,7 +554,9 @@ void GuiClipboard::setFindBuffer(docstring const & text)
 {
LYXERR(Debug::CLIPBOARD, "new findbuffer: " << text);
Clipboard::setFindBuffer(text);
-   qApp->clipboard()->setText(toqstr(text), QClipboard::FindBuffer);
+   if(qApp->clipboard()->supportsFindBuffer()) {
+   qApp->clipboard()->setText(toqstr(text), 
QClipboard::FindBuffer);
+   }
 }
 
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/master] #11925 Remove the gap between button frame and button background (by Daniel Ramoeller)

2021-02-14 Thread Stephan Witt
commit 3d616bfc79866a8b7c97f1fd4d566eefb3da6f40
Author: Stephan Witt 
Date:   Sun Feb 14 19:04:33 2021 +0100

#11925 Remove the gap between button frame and button background (by Daniel 
Ramoeller)
---
 src/frontends/qt/GuiPainter.cpp |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/frontends/qt/GuiPainter.cpp b/src/frontends/qt/GuiPainter.cpp
index 3b3b955..1de3d14 100644
--- a/src/frontends/qt/GuiPainter.cpp
+++ b/src/frontends/qt/GuiPainter.cpp
@@ -424,8 +424,8 @@ void GuiPainter::buttonText(int x, int baseline, docstring 
const & s,
 
int const d = offset / 2;
 
-   fillRectangle(x + d + 1, baseline - ascent + 1, width - offset - 1,
- ascent + descent - 1, back);
+   fillRectangle(x + d, baseline - ascent, width - offset,
+ ascent + descent, back);
rectangle(x + d, baseline - ascent, width - offset, ascent + descent, 
frame);
text(x + offset, baseline, s, font);
 }
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


  1   2   3   4   5   6   >