Make RELEASE-NOTES accessible from GUI (#8616)

CMake people, please check if something needs to be done to install
lib/RELEASE-NOTES.
This commit is contained in:
Juergen Spitzmueller 2015-05-19 09:57:52 +02:00
parent 77d6028586
commit 9f55ce9b04
6 changed files with 247 additions and 152 deletions

View File

@ -19,7 +19,7 @@ SUBDIRS = config development po $(BOOST) src sourcedoc lib \
$(CLIENT) src/tex2lyx
EXTRA_DIST = ANNOUNCE INSTALL.autoconf RELEASE-NOTES UPGRADING \
EXTRA_DIST = ANNOUNCE INSTALL.autoconf UPGRADING \
INSTALL.Win32 INSTALL.MacOSX INSTALL.cmake \
README.Win32 README.Cygwin README.localization lyx.1in \
autogen.sh CMakeLists.txt po/CMakeLists.txt

View File

@ -1,84 +0,0 @@
This file lists interface changes that might affect users in 2.2.0, some
known problems in LyX 2.2.0 and some things you have to take into account
when upgrading from earlier versions to a version of the 2.2.x series.
Interface changes
-----------------
The following pref variables were added in 2.2:
The following pref variables were changed in 2.2:
The following pref variables are obsoleted in 2.2:
- \\rtl
This variable was introduced to guard against any bad consequence of
the then-new right-to-left languages support. It is no longer needed
because of improvements. Now right-to-left support is always enabled.
The following new LyX functions have been introduced in 2.2:
- buffer-view-cache
Opens the last previewed output of the buffer, if it exists.
- buffer-move-next
Moves the current tab one spot to the right.
- buffer-move-previous
Moves the current tab one spot to the left.
The following LyX functions have been changed in 2.2:
The following LyX key bindings have been changed in 2.2:
- For bindings where Control + {PgDn, PgUp} switches to the
{next, previous} tab, Control + Shift + {PgDn, PgUp} moves the current
tab to the {next, previous} tab.
The following LyX documents have been moved in 2.2:
The following metadata files have been added to the tarball in 2.2:
Changes with respect to external programs and libraries in 2.2:
--------------------------------------------------------
- LyX is not yet supposed to work with Qt5. It is advised to compile and
run LyX against Qt 4.8.x. On Windows, Qt 4.8.5 suffers from a bug that
breaks the use of shortcuts, so on Windows Qt 4.8.4 is advised.
- LyX now gives an error if the underlying LaTeX command exited with error.
Known issues in version 2.2.0
-----------------------------
- LyX needs to be run under Python 2 and will not work properly on systems
where Python 3 is the default binary. See bug #7030 to know how to fix
this properly, since simple sheebang conversion in *.py files will not
be enough.
Caveats when upgrading from earlier versions to 2.2.x
-------------------------------------------------------
- BibTeX errors are now processed and cause LyX to show the errors dialog.
Before, these errors were ignored, which means that it may happen that
documents that compiled without error with a previous version now
compile with error. However, because now in 2.2.x users can click on
the "Show Output Anyway" button, the document can still be viewed.

View File

@ -7,8 +7,8 @@ CHMOD = chmod
EXTRA_DIST = examples/CMakeLists.txt scripts/CMakeLists.txt
dist_pkgdata_DATA = CREDITS autocorrect chkconfig.ltx external_templates \
encodings layouttranslations languages latexfonts symbols syntax.default \
unicodesymbols
encodings layouttranslations languages latexfonts RELEASE-NOTES \
symbols syntax.default unicodesymbols
# We use DATA now instead of PYTHON because automake 1.11.2 complains.
# Note that we "chmod 755" manually this file in install-data-hook.

82
lib/RELEASE-NOTES Normal file
View File

@ -0,0 +1,82 @@
!Important Changes in LyX 2.2.0
(: This file lists interface changes that might affect users in 2.2.0, some
known problems in LyX 2.2.0 and some things you have to take into account
when upgrading from earlier versions to a version of the 2.2.x series. :)
!!Interface changes
!!!The following pref variables were added in 2.2:
!!!The following pref variables were changed in 2.2:
!!!The following pref variables are obsoleted in 2.2:
* \rtl:
This variable was introduced to guard against any bad consequence of
the then-new right-to-left languages support. It is no longer needed
because of improvements. Now right-to-left support is always enabled.
!!!The following new LyX functions have been introduced in 2.2:
* buffer-view-cache:
Opens the last previewed output of the buffer, if it exists.
* buffer-move-next:
Moves the current tab one spot to the right.
* buffer-move-previous:
Moves the current tab one spot to the left.
!!!The following LyX functions have been changed in 2.2:
!!!The following LyX key bindings have been changed in 2.2:
* For bindings where Control + {PgDn, PgUp} switches to the
{next, previous} tab, Control + Shift + {PgDn, PgUp} moves the current
tab to the {next, previous} tab.
!!!The following LyX documents have been moved in 2.2:
!!!The following metadata files have been added to the tarball in 2.2:
!!Changes with respect to external programs and libraries in 2.2:
* LyX is not yet supposed to work with Qt5. It is advised to compile and
run LyX against Qt 4.8.x. On Windows, Qt 4.8.5 suffers from a bug that
breaks the use of shortcuts, so on Windows Qt 4.8.4 is advised.
* LyX now gives an error if the underlying LaTeX command exited with error.
!!Known issues in version 2.2.0
* LyX needs to be run under Python 2 and will not work properly on systems
where Python 3 is the default binary. See bug #7030 to know how to fix
this properly, since simple sheebang conversion in *.py files will not
be enough.
!!Caveats when upgrading from earlier versions to 2.2.x
* BibTeX errors are now processed and cause LyX to show the errors dialog.
Before, these errors were ignored, which means that it may happen that
documents that compiled without error with a previous version now
compile with error. However, because now in 2.2.x users can click on
the "Show Output Anyway" button, the document can still be viewed.

View File

@ -83,6 +83,94 @@ static QString credits()
}
static QString release_notes()
{
QString res;
QFile file(toqstr(package().system_support().absFileName()) + "/RELEASE-NOTES");
QTextStream out(&res);
if (!file.exists()) {
out << qt_("ERROR: LyX wasn't able to find the RELEASE-NOTES file\n");
out << qt_("Please install correctly to see what has changed\n");
out << qt_("for this version of LyX.");
} else {
file.open(QIODevice::ReadOnly);
if (!file.isReadable()) {
out << qt_("ERROR: LyX wasn't able to read the RELEASE-NOTES file\n");
out << qt_("Please install correctly to see what has changed\n");
out << qt_("for this version of LyX.");
} else {
QTextStream ts(&file);
ts.setCodec("UTF-8");
QString line;
bool incomment = false;
bool inlist = false;
do {
// a simple markdown parser
line = ts.readLine();
// skipe empty lines
if (line.isEmpty())
continue;
// parse (:comments:)
if (line.startsWith("(:")) {
if (!line.endsWith(":)"))
incomment = true;
continue;
} if (line.endsWith(":)") && incomment) {
incomment = false;
continue;
} if (incomment)
continue;
// headings
if (line.startsWith("!!!")) {
if (inlist) {
out << "</li>";
out << "</ul><br>";
inlist = false;
}
out << "<h4>" << line.mid(3) << "</h4>";
}
else if (line.startsWith("!!")) {
if (inlist) {
out << "</li>";
out << "</ul><br>";
inlist = false;
}
out << "<h3>" << line.mid(2) << "</h3>";
} else if (line.startsWith("!")) {
if (inlist) {
out << "</li>";
out << "</ul><br>";
inlist = false;
}
out << "<h2>" << line.mid(1) << "</h2>";
// lists
} else if (line.startsWith("* ")) {
if (inlist)
out << "</li>";
else
out << "<ul>";
inlist = true;
out << "<li>" << line.mid(2);
} else if (inlist && line.startsWith(" ")) {
out << line.mid(2);
} else if (inlist) {
inlist = false;
out << "</li>";
out << "</ul><br>";
out << line;
} else
out << line;
out << " ";
} while (!line.isNull());
}
}
out.flush();
return res;
}
static QString copyright()
{
QString release_year = release_date().toString("yyyy");
@ -178,6 +266,7 @@ GuiAbout::GuiAbout(GuiView & lv)
d->ui.versionLA->setText(version());
d->ui.buildinfoTB->setText(buildinfo());
d->ui.releasenotesTB->setHtml(release_notes());
d->ui.creditsTB->setHtml(credits());
}

View File

@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>AboutUi</class>
<widget class="QDialog" name="AboutUi">
<property name="geometry">
@ -27,17 +25,20 @@
</property>
<item row="0" column="0">
<widget class="QTabWidget" name="tab">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="versiontab">
<attribute name="title">
<string>Version</string>
</attribute>
<layout class="QVBoxLayout">
<property name="margin" >
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>11</number>
</property>
<item>
<widget class="QLabel" name="versionLA">
<property name="frameShape">
@ -110,16 +111,26 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="releasenotestab">
<attribute name="title">
<string>Release Notes</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QTextBrowser" name="releasenotesTB"/>
</item>
</layout>
</widget>
</widget>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout">
<property name="margin" >
<number>0</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<spacer>
<property name="orientation">
@ -128,7 +139,7 @@
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" >
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
@ -139,9 +150,7 @@
<item>
<widget class="QPushButton" name="closePB">
<property name="sizePolicy">
<sizepolicy>
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -158,7 +167,6 @@
</item>
</layout>
</widget>
<pixmapfunction></pixmapfunction>
<includes>
<include location="local">qt_i18n.h</include>
</includes>