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 $(CLIENT) src/tex2lyx
EXTRA_DIST = ANNOUNCE INSTALL.autoconf RELEASE-NOTES UPGRADING \ EXTRA_DIST = ANNOUNCE INSTALL.autoconf UPGRADING \
INSTALL.Win32 INSTALL.MacOSX INSTALL.cmake \ INSTALL.Win32 INSTALL.MacOSX INSTALL.cmake \
README.Win32 README.Cygwin README.localization lyx.1in \ README.Win32 README.Cygwin README.localization lyx.1in \
autogen.sh CMakeLists.txt po/CMakeLists.txt 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 EXTRA_DIST = examples/CMakeLists.txt scripts/CMakeLists.txt
dist_pkgdata_DATA = CREDITS autocorrect chkconfig.ltx external_templates \ dist_pkgdata_DATA = CREDITS autocorrect chkconfig.ltx external_templates \
encodings layouttranslations languages latexfonts symbols syntax.default \ encodings layouttranslations languages latexfonts RELEASE-NOTES \
unicodesymbols symbols syntax.default unicodesymbols
# We use DATA now instead of PYTHON because automake 1.11.2 complains. # 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. # 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() static QString copyright()
{ {
QString release_year = release_date().toString("yyyy"); QString release_year = release_date().toString("yyyy");
@ -178,6 +266,7 @@ GuiAbout::GuiAbout(GuiView & lv)
d->ui.versionLA->setText(version()); d->ui.versionLA->setText(version());
d->ui.buildinfoTB->setText(buildinfo()); d->ui.buildinfoTB->setText(buildinfo());
d->ui.releasenotesTB->setHtml(release_notes());
d->ui.creditsTB->setHtml(credits()); d->ui.creditsTB->setHtml(credits());
} }

View File

@ -1,10 +1,8 @@
<ui version="4.0" > <?xml version="1.0" encoding="UTF-8"?>
<author></author> <ui version="4.0">
<comment></comment>
<exportmacro></exportmacro>
<class>AboutUi</class> <class>AboutUi</class>
<widget class="QDialog" name="AboutUi" > <widget class="QDialog" name="AboutUi">
<property name="geometry" > <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
@ -12,47 +10,50 @@
<height>232</height> <height>232</height>
</rect> </rect>
</property> </property>
<property name="windowTitle" > <property name="windowTitle">
<string/> <string/>
</property> </property>
<property name="sizeGripEnabled" > <property name="sizeGripEnabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
<layout class="QGridLayout" > <layout class="QGridLayout">
<property name="margin" > <property name="margin">
<number>9</number> <number>9</number>
</property> </property>
<property name="spacing" > <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<item row="0" column="0" > <item row="0" column="0">
<widget class="QTabWidget" name="tab" > <widget class="QTabWidget" name="tab">
<widget class="QWidget" name="versiontab" > <property name="currentIndex">
<attribute name="title" > <number>0</number>
</property>
<widget class="QWidget" name="versiontab">
<attribute name="title">
<string>Version</string> <string>Version</string>
</attribute> </attribute>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout">
<property name="margin" > <property name="spacing">
<number>11</number>
</property>
<property name="spacing" >
<number>6</number> <number>6</number>
</property> </property>
<property name="margin">
<number>11</number>
</property>
<item> <item>
<widget class="QLabel" name="versionLA" > <widget class="QLabel" name="versionLA">
<property name="frameShape" > <property name="frameShape">
<enum>QFrame::Box</enum> <enum>QFrame::Box</enum>
</property> </property>
<property name="frameShadow" > <property name="frameShadow">
<enum>QFrame::Sunken</enum> <enum>QFrame::Sunken</enum>
</property> </property>
<property name="text" > <property name="text">
<string>Version goes here</string> <string>Version goes here</string>
</property> </property>
<property name="alignment" > <property name="alignment">
<set>Qt::AlignCenter</set> <set>Qt::AlignCenter</set>
</property> </property>
<property name="margin" > <property name="margin">
<number>6</number> <number>6</number>
</property> </property>
<property name="textInteractionFlags"> <property name="textInteractionFlags">
@ -62,73 +63,83 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="creditstab" > <widget class="QWidget" name="creditstab">
<attribute name="title" > <attribute name="title">
<string>Credits</string> <string>Credits</string>
</attribute> </attribute>
<layout class="QGridLayout" > <layout class="QGridLayout">
<property name="margin" > <property name="margin">
<number>9</number> <number>9</number>
</property> </property>
<property name="spacing" > <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<item row="0" column="0" > <item row="0" column="0">
<widget class="QTextBrowser" name="creditsTB" /> <widget class="QTextBrowser" name="creditsTB"/>
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="copyrighttab" > <widget class="QWidget" name="copyrighttab">
<attribute name="title" > <attribute name="title">
<string>Copyright</string> <string>Copyright</string>
</attribute> </attribute>
<layout class="QGridLayout" > <layout class="QGridLayout">
<property name="margin" > <property name="margin">
<number>9</number> <number>9</number>
</property> </property>
<property name="spacing" > <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<item row="0" column="0" > <item row="0" column="0">
<widget class="QTextBrowser" name="copyrightTB" /> <widget class="QTextBrowser" name="copyrightTB"/>
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="buildinfotab" > <widget class="QWidget" name="buildinfotab">
<attribute name="title" > <attribute name="title">
<string>Build Info</string> <string>Build Info</string>
</attribute> </attribute>
<layout class="QGridLayout" > <layout class="QGridLayout">
<property name="margin" > <property name="margin">
<number>9</number> <number>9</number>
</property> </property>
<property name="spacing" > <property name="spacing">
<number>6</number> <number>6</number>
</property> </property>
<item row="0" column="0" > <item row="0" column="0">
<widget class="QTextBrowser" name="buildinfoTB" /> <widget class="QTextBrowser" name="buildinfoTB"/>
</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> </item>
</layout> </layout>
</widget> </widget>
</widget> </widget>
</item> </item>
<item row="1" column="0" > <item row="1" column="0">
<layout class="QHBoxLayout" > <layout class="QHBoxLayout">
<property name="margin" > <property name="spacing">
<number>0</number>
</property>
<property name="spacing" >
<number>6</number> <number>6</number>
</property> </property>
<property name="margin">
<number>0</number>
</property>
<item> <item>
<spacer> <spacer>
<property name="orientation" > <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeType" > <property name="sizeType">
<enum>QSizePolicy::Expanding</enum> <enum>QSizePolicy::Expanding</enum>
</property> </property>
<property name="sizeHint" > <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>
@ -137,19 +148,17 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QPushButton" name="closePB" > <widget class="QPushButton" name="closePB">
<property name="sizePolicy" > <property name="sizePolicy">
<sizepolicy> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text" > <property name="text">
<string>&amp;Close</string> <string>&amp;Close</string>
</property> </property>
<property name="default" > <property name="default">
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
@ -158,9 +167,8 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<pixmapfunction></pixmapfunction>
<includes> <includes>
<include location="local" >qt_i18n.h</include> <include location="local">qt_i18n.h</include>
</includes> </includes>
<resources/> <resources/>
<connections/> <connections/>