Add tab with build information to Help > About LyX

The tab displays the same information as the 'lyx --version' command.
This commit is contained in:
Scott Kostyshak 2012-10-07 11:27:07 -04:00
parent 5b6fec1bfd
commit 4ab8e4a009
2 changed files with 29 additions and 0 deletions

View File

@ -132,6 +132,18 @@ static QString version()
return res; return res;
} }
static QString buildinfo()
{
QString res;
QTextStream out(&res);
out << "LyX " << lyx_version
<< " (" << lyx_release_date << ")" << endl;
out << "Built on " << __DATE__ << ", " << __TIME__ << endl;
out << lyx_version_info << endl;
return res;
}
struct GuiAbout::Private struct GuiAbout::Private
{ {
@ -152,6 +164,7 @@ GuiAbout::GuiAbout(GuiView & lv)
d->ui.copyrightTB->append(disclaimer()); d->ui.copyrightTB->append(disclaimer());
d->ui.versionLA->setText(version()); d->ui.versionLA->setText(version());
d->ui.buildinfoTB->setText(buildinfo());
d->ui.creditsTB->setHtml(credits()); d->ui.creditsTB->setHtml(credits());
} }

View File

@ -94,6 +94,22 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="buildinfotab" >
<attribute name="title" >
<string>Build Info</string>
</attribute>
<layout class="QGridLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" >
<number>6</number>
</property>
<item row="0" column="0" >
<widget class="QTextBrowser" name="buildinfoTB" />
</item>
</layout>
</widget>
</widget> </widget>
</item> </item>
<item row="1" column="0" > <item row="1" column="0" >