Accepting request 852040 from Publishing

- Add  0001-Store-correctly-the-window-position-with-Wayland.patch
  to fix possible menu shifting on GNOME Wayland (see upstream bug
  https://www.lyx.org/trac/ticket/11746)

- Update to 2.3.6:
  * Small improvements and bug fixes all over the place. For
    details see included ANNOUNCE
    or https://www.lyx.org/announce/2_3_6.txt
  Some highlights:
  * On openSUSE: the correct mathfonts are now displayed
  * Added the ability to create new child documents from within the
    'include file' dialog
  * Pasting table content outside a table no longer pastes tab
    characters

- Add texlive-tablefootnote to recommends: The package tablefootnote
  is needed by LyX to be able to output footnotes in floating tables

OBS-URL: https://build.opensuse.org/request/show/852040
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/lyx?expand=0&rev=101
This commit is contained in:
Dominique Leuenberger 2020-12-03 17:42:12 +00:00 committed by Git OBS Bridge
commit 598e561982
8 changed files with 133 additions and 12 deletions

View File

@ -0,0 +1,98 @@
Index: src/frontends/qt4/GuiApplication.cpp
===================================================================
--- src/frontends/qt4/GuiApplication.cpp (revision dc5eda84b8bb4d4eed09047d1c55a33a8173e746)
+++ src/frontends/qt4/GuiApplication.cpp (revision d418b6f4c8207cc84c7a3b890de5aec2c837a672)
@@ -1112,4 +1112,27 @@
+#if QT_VERSION < 0x050000
+// Emulate platformName() for Qt4
+
+// FIXME: when ditching this method, remove all tests
+// platformName() == "qt4x11"
+// in the code
+QString GuiApplication::platformName() const
+{
+# if defined(Q_WS_X11)
+ // Note that this one does not really exist
+ return "qt4x11";
+# elif defined(Q_OS_MAC)
+ return "cocoa";
+# elif defined(Q_OS_WIN) || defined(Q_CYGWIN_WIN)
+ return "windows";
+# else
+ LYXERR0("Unknown platform!");
+ return "unknown";
+# endif
+}
+#endif
+
+
double GuiApplication::pixelRatio() const
{
Index: src/frontends/qt4/GuiApplication.h
===================================================================
--- src/frontends/qt4/GuiApplication.h (revision b9116e8b81f55ee795ea444ee02ff921bf82606a)
+++ src/frontends/qt4/GuiApplication.h (revision d418b6f4c8207cc84c7a3b890de5aec2c837a672)
@@ -155,4 +155,9 @@
GuiView & view(int id) const;
+#if (QT_VERSION < 0x050000)
+ /// Emulate platformName() for Qt4
+ QString platformName() const;
+#endif
+
/// Current ratio between physical pixels and device-independent pixels
double pixelRatio() const;
Index: src/frontends/qt4/GuiView.cpp
===================================================================
--- src/frontends/qt4/GuiView.cpp (revision 1ae510b6287d5c96c3f106909c1cc8b0711b6d57)
+++ src/frontends/qt4/GuiView.cpp (revision d418b6f4c8207cc84c7a3b890de5aec2c837a672)
@@ -751,10 +751,9 @@
settings.beginGroup("views");
settings.beginGroup(QString::number(id_));
-#if defined(Q_WS_X11) || defined(QPA_XCB)
- settings.setValue("pos", pos());
- settings.setValue("size", size());
-#else
- settings.setValue("geometry", saveGeometry());
-#endif
+ if (guiApp->platformName() == "qt4x11" || guiApp->platformName() == "xcb") {
+ settings.setValue("pos", pos());
+ settings.setValue("size", size());
+ } else
+ settings.setValue("geometry", saveGeometry());
settings.setValue("layout", saveState(0));
settings.setValue("icon_size", toqstr(d.iconSize(iconSize())));
@@ -796,17 +795,18 @@
setIconSize(d.iconSize(settings.value(icon_key).toString()));
-#if defined(Q_WS_X11) || defined(QPA_XCB)
- QPoint pos = settings.value("pos", QPoint(50, 50)).toPoint();
- QSize size = settings.value("size", QSize(690, 510)).toSize();
- resize(size);
- move(pos);
-#else
- // Work-around for bug #6034: the window ends up in an undetermined
- // state when trying to restore a maximized window when it is
- // already maximized.
- if (!(windowState() & Qt::WindowMaximized))
- if (!restoreGeometry(settings.value("geometry").toByteArray()))
- setGeometry(50, 50, 690, 510);
-#endif
+ if (guiApp->platformName() == "qt4x11" || guiApp->platformName() == "xcb") {
+ QPoint pos = settings.value("pos", QPoint(50, 50)).toPoint();
+ QSize size = settings.value("size", QSize(690, 510)).toSize();
+ resize(size);
+ move(pos);
+ } else {
+ // Work-around for bug #6034: the window ends up in an undetermined
+ // state when trying to restore a maximized window when it is
+ // already maximized.
+ if (!(windowState() & Qt::WindowMaximized))
+ if (!restoreGeometry(settings.value("geometry").toByteArray()))
+ setGeometry(50, 50, 690, 510);
+ }
+
// Make sure layout is correctly oriented.
setLayoutDirection(qApp->layoutDirection());

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ca2654ae7ae5d921980449757ec08b30c7920cb915eb3d902a959e2629808ddf
size 16139804

Binary file not shown.

3
lyx-2.3.6.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6ff6ceae5a10138c5f8fee104eb575182e83584f6e523955fbb1d7ccb9841c98
size 16237696

BIN
lyx-2.3.6.tar.xz.sig Normal file

Binary file not shown.

View File

@ -1,3 +1,30 @@
-------------------------------------------------------------------
Tue Dec 1 08:26:16 UTC 2020 - Cor Blom <cornelis@solcon.nl>
- Add 0001-Store-correctly-the-window-position-with-Wayland.patch
to fix possible menu shifting on GNOME Wayland (see upstream bug
https://www.lyx.org/trac/ticket/11746)
-------------------------------------------------------------------
Sat Nov 28 09:58:37 UTC 2020 - Cor Blom <cornelis@solcon.nl>
- Update to 2.3.6:
* Small improvements and bug fixes all over the place. For
details see included ANNOUNCE
or https://www.lyx.org/announce/2_3_6.txt
Some highlights:
* On openSUSE: the correct mathfonts are now displayed
* Added the ability to create new child documents from within the
'include file' dialog
* Pasting table content outside a table no longer pastes tab
characters
-------------------------------------------------------------------
Sat Nov 21 20:41:51 UTC 2020 - Cor Blom <cornelis@solcon.nl>
- Add texlive-tablefootnote to recommends: The package tablefootnote
is needed by LyX to be able to output footnotes in floating tables
-------------------------------------------------------------------
Thu Sep 3 19:19:34 UTC 2020 - Cor Blom <cornelis@solcon.nl>

View File

@ -17,7 +17,7 @@
Name: lyx
Version: 2.3.5.2
Version: 2.3.6
Release: 0
Summary: WYSIWYM (What You See Is What You Mean) document processor
License: GPL-2.0-or-later
@ -36,6 +36,8 @@ Patch0: correct-shebang.patch
# PATCH-FIX-UPSTREAM remove_python_shebang.patch mcepl@suse.com
# remove all instances of python2 shebang lines
Patch1: remove_python_shebang.patch
# PATCH-FIX-UPSTREAM see https://www.lyx.org/trac/ticket/11746
Patch2: 0001-Store-correctly-the-window-position-with-Wayland.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bc
@ -99,6 +101,7 @@ Recommends: texlive-prettyref
Recommends: texlive-refstyle
Recommends: texlive-rotfloat
Recommends: texlive-splitindex
Recommends: texlive-tablefootnote
Recommends: texlive-tcolorbox
Recommends: texlive-textgreek
Recommends: texlive-todonotes
@ -140,6 +143,7 @@ A collection of Math symbol fonts for LyX.
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p0
%build
#./autogen.sh

View File

@ -97,14 +97,6 @@
# -*- coding: utf-8 -*-
# file lyx_pot.py
--- a/po/postats.py
+++ b/po/postats.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (C) 2007 Michael Gerz <michael.gerz@teststep.org>
# Copyright (C) 2007 José Matos <jamatos@lyx.org>
--- a/src/tex2lyx/test/runtests.py
+++ b/src/tex2lyx/test/runtests.py
@@ -1,4 +1,4 @@