Added build revision information and clickable links to about box

FossilOrigin-Name: 6c585dffad9f240a390a241dd71f5f2f95f46d49
This commit is contained in:
Kostas 2015-08-26 09:58:28 +00:00
parent a296b622ef
commit 66695b38bc
6 changed files with 212 additions and 183 deletions

View File

@ -0,0 +1 @@
on

View File

@ -1,5 +1,6 @@
C Updated\sChanges.md C Added\sbuild\srevision\sinformation\sand\sclickable\slinks\sto\sabout\sbox
D 2015-08-25T13:07:48.374 D 2015-08-26T09:58:28.636
F .fossil-settings/manifest a09a968bf05a50058f3ad50132730b719bc39e76
F .travis.yml 77966888a81c4ceee1fcc79bce842c9667ad8a35 F .travis.yml 77966888a81c4ceee1fcc79bce842c9667ad8a35
F debian/changelog eb4304dfcb6bb66850ec740838090eb50ce1249b F debian/changelog eb4304dfcb6bb66850ec740838090eb50ce1249b
F debian/compat b6abd567fa79cbe0196d093a067271361dc6ca8b F debian/compat b6abd567fa79cbe0196d093a067271361dc6ca8b
@ -210,8 +211,8 @@ F rsrc/icons/Zoom-01.png 67ca532922e9166325c5c75fce1ca3fbb0d2b6a6
F rsrc/icons/fuel.icns 81e535004b62db801a02f3e15d0a33afc9d4070b F rsrc/icons/fuel.icns 81e535004b62db801a02f3e15d0a33afc9d4070b
F rsrc/icons/fuel.ico eb529ab3332a17b9302ef3e851db5b9ebce2a038 F rsrc/icons/fuel.ico eb529ab3332a17b9302ef3e851db5b9ebce2a038
F rsrc/icons/fuel.png 40daf53b7f6bdcdd0d6aa5ef433d078ec5ea4342 F rsrc/icons/fuel.png 40daf53b7f6bdcdd0d6aa5ef433d078ec5ea4342
F rsrc/resources.qrc 21ae6205e27ac989001eb0edc075d7e405b992c8 F rsrc/resources.qrc a69b05ceb3d614f9aaae3adc2734af8ce3013fa2
F src/AboutDialog.cpp fc9e3ba03aa6cb145ace610d9b38a2de157551ba F src/AboutDialog.cpp aaa3e614c9aace66531bccc35a3dbf398cb79b7b
F src/AboutDialog.h 269f3a0589067c08f19b542e4576b0ef58bc6ec5 F src/AboutDialog.h 269f3a0589067c08f19b542e4576b0ef58bc6ec5
F src/BrowserWidget.cpp 8b8f545cdff4a4188edc698a1b4777f5df46f056 F src/BrowserWidget.cpp 8b8f545cdff4a4188edc698a1b4777f5df46f056
F src/BrowserWidget.h 764d66aa9a93b890298bd0301097739cb4e16597 F src/BrowserWidget.h 764d66aa9a93b890298bd0301097739cb4e16597
@ -250,7 +251,7 @@ F src/Workspace.h 50970993b6f49c0f4dc55ba5954e7e4c2a723539
F src/main.cpp d8c65ea5e54102e4989fef9fd8cfd4f13ef8a8f0 F src/main.cpp d8c65ea5e54102e4989fef9fd8cfd4f13ef8a8f0
F tools/git-push.sh 62cc58434cae5b7bcd6bd9d4cce8b08739f31cd7 x F tools/git-push.sh 62cc58434cae5b7bcd6bd9d4cce8b08739f31cd7 x
F tools/pack.sh d7f38a498c4e9327fecd6a6e5ac27be270d43008 x F tools/pack.sh d7f38a498c4e9327fecd6a6e5ac27be270d43008 x
F ui/AboutDialog.ui 77704a7422a59ccdddbdf00979bd20a861d9ee5a F ui/AboutDialog.ui 6c96b147f0e8c5cf8190ce0e3c471e38e934d5c1
F ui/BrowserWidget.ui 994ad9ea0e9f5815d6b1a27acc2f6f39164c507f F ui/BrowserWidget.ui 994ad9ea0e9f5815d6b1a27acc2f6f39164c507f
F ui/CloneDialog.ui 4886e7d4f258ea8b852b5eefc860396e35145712 F ui/CloneDialog.ui 4886e7d4f258ea8b852b5eefc860396e35145712
F ui/CommitDialog.ui 1e5dafa742e9ae07ec937bcda8cda3297ddc6199 F ui/CommitDialog.ui 1e5dafa742e9ae07ec937bcda8cda3297ddc6199
@ -260,7 +261,7 @@ F ui/MainWindow.ui e2a18caa7482b3ee0dff477592cdc9574b35fe4f
F ui/RemoteDialog.ui 95a4750d972ed8c49bb10b95db91ff16cfe2dd0b F ui/RemoteDialog.ui 95a4750d972ed8c49bb10b95db91ff16cfe2dd0b
F ui/RevisionDialog.ui 27c3b98c665fec014a50cbf3352c0627f75e68cd F ui/RevisionDialog.ui 27c3b98c665fec014a50cbf3352c0627f75e68cd
F ui/SettingsDialog.ui 2e1b6ce7a49100088c5649292c1319e62e0302e1 F ui/SettingsDialog.ui 2e1b6ce7a49100088c5649292c1319e62e0302e1
P 8a83bfb691fc72a4208c24b547c9c38fc668ec97 P 3490f7140197453a7a45fea01b93281cf0c8ca3d
R 53814be492792eadbc8740da254dc306 R 8a6e79d50e33c1e363a9a88f9991f593
U kostas U Kostas
Z 50d6c6e9520bb3b791eaf9b75e5e6c9e Z c023957da1ec26362f32c34c0fd943d2

View File

@ -1 +1 @@
3490f7140197453a7a45fea01b93281cf0c8ca3d 6c585dffad9f240a390a241dd71f5f2f95f46d49

View File

@ -171,4 +171,7 @@
<file>docs/Translators.txt</file> <file>docs/Translators.txt</file>
<file>docs/Licenses.txt</file> <file>docs/Licenses.txt</file>
</qresource> </qresource>
<qresource prefix="/version">
<file alias="manifest">../manifest.uuid</file>
</qresource>
</RCC> </RCC>

View File

@ -1,41 +1,58 @@
#include "AboutDialog.h" #include "AboutDialog.h"
#include "ui_AboutDialog.h" #include "ui_AboutDialog.h"
#include <QFile> #include <QFile>
AboutDialog::AboutDialog(QWidget *parent, const QString &fossilVersion) : AboutDialog::AboutDialog(QWidget *parent, const QString &fossilVersion) :
QDialog(parent), QDialog(parent),
ui(new Ui::AboutDialog) ui(new Ui::AboutDialog)
{ {
ui->setupUi(this); ui->setupUi(this);
QString banner(QCoreApplication::applicationName() + " " + QCoreApplication::applicationVersion()); QString banner(QCoreApplication::applicationName() + " " + QCoreApplication::applicationVersion());
ui->lblBanner->setText(banner + "\n" + ui->lblBanner->text()); banner += "\n" + ui->lblBanner->text();
banner += "\n<a href=\"https://fuel-scm.org/\">https://fuel-scm.org/</a>";
ui->lblQtVersion->setText(tr("QT version %0").arg(QT_VERSION_STR)); banner = banner.replace("\n", "<br/>");
ui->lblBanner->setText(banner);
if(!fossilVersion.isEmpty()) ui->lblBanner->setOpenExternalLinks(true);
ui->lblFossilVersion->setText(tr("Fossil version %0").arg(fossilVersion)); ui->lblBanner->setTextFormat(Qt::RichText);
QString additional; ui->lblQtVersion->setText(tr("QT version %0").arg(QT_VERSION_STR));
QFile ftrans(":/docs/docs/Translators.txt");
if(ftrans.open(QFile::ReadOnly)) if(!fossilVersion.isEmpty())
{ ui->lblFossilVersion->setText(tr("Fossil version %0").arg(fossilVersion));
additional.append(tr("Translations with the help of:")+"\n");
additional.append(ftrans.readAll()); QString revisiontxt;
additional.append("\n\n"); QFile fmanifest(":/version/manifest");
ftrans.close(); if(fmanifest.open(QFile::ReadOnly))
} {
QString revision = QString(fmanifest.readAll()).trimmed();
QFile flicenses(":/docs/docs/Licenses.txt"); revisiontxt = QString(tr("Fuel revision %0").arg("<a href=\"https://fuel-scm.org/fossil/timeline?c=%0\">%0</a>").arg(revision));
if(flicenses.open(QFile::ReadOnly)) ui->lblFuelRevision->setOpenExternalLinks(true);
{ ui->lblFuelRevision->setTextFormat(Qt::RichText);
additional.append(tr("This sofware uses the following open-source libraries and assets:")+"\n"); fmanifest.close();
additional.append(flicenses.readAll()); }
flicenses.close(); ui->lblFuelRevision->setText(revisiontxt);
}
ui->txtAdditional->setText(additional); QString additional;
} QFile ftrans(":/docs/docs/Translators.txt");
if(ftrans.open(QFile::ReadOnly))
AboutDialog::~AboutDialog() {
{ additional.append(tr("Translations with the help of:")+"\n");
delete ui; additional.append(ftrans.readAll());
} additional.append("\n\n");
ftrans.close();
}
QFile flicenses(":/docs/docs/Licenses.txt");
if(flicenses.open(QFile::ReadOnly))
{
additional.append(tr("This sofware uses the following open-source libraries and assets:")+"\n");
additional.append(flicenses.readAll());
flicenses.close();
}
ui->txtAdditional->setText(additional);
}
AboutDialog::~AboutDialog()
{
delete ui;
}

View File

@ -1,132 +1,139 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>AboutDialog</class> <class>AboutDialog</class>
<widget class="QDialog" name="AboutDialog"> <widget class="QDialog" name="AboutDialog">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>577</width> <width>577</width>
<height>349</height> <height>349</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>About Fuel...</string> <string>About Fuel...</string>
</property> </property>
<property name="modal"> <property name="modal">
<bool>true</bool> <bool>true</bool>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="0" column="1">
<widget class="QLabel" name="lblIcon"> <widget class="QLabel" name="lblBanner">
<property name="maximumSize"> <property name="text">
<size> <string>A GUI front-end for the Fossil SCM by Kostas Karanikolas
<width>64</width> Released under the GNU GPL</string>
<height>64</height> </property>
</size> <property name="alignment">
</property> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
<property name="text"> </property>
<string notr="true"/> </widget>
</property> </item>
<property name="pixmap"> <item row="2" column="1">
<pixmap resource="../rsrc/resources.qrc">:/icons/icon-application</pixmap> <widget class="QLabel" name="lblFossilVersion">
</property> <property name="text">
<property name="scaledContents"> <string notr="true">FOSSIL VERSION</string>
<bool>true</bool> </property>
</property> <property name="alignment">
<property name="alignment"> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
<set>Qt::AlignHCenter|Qt::AlignTop</set> </property>
</property> </widget>
</widget> </item>
</item> <item row="0" column="0">
<item row="0" column="1"> <widget class="QLabel" name="lblIcon">
<widget class="QLabel" name="lblBanner"> <property name="maximumSize">
<property name="text"> <size>
<string>A GUI front-end for the Fossil SCM by Kostas Karanikolas <width>64</width>
Released under the GNU GPL</string> <height>64</height>
</property> </size>
<property name="alignment"> </property>
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> <property name="text">
</property> <string notr="true"/>
</widget> </property>
</item> <property name="pixmap">
<item row="1" column="1"> <pixmap resource="../rsrc/resources.qrc">:/icons/icon-application</pixmap>
<widget class="QLabel" name="lblFossilVersion"> </property>
<property name="text"> <property name="scaledContents">
<string notr="true">FOSSIL VERSION</string> <bool>true</bool>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> <set>Qt::AlignHCenter|Qt::AlignTop</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="1"> <item row="4" column="1">
<widget class="QLabel" name="lblQtVersion"> <widget class="QTextEdit" name="txtAdditional">
<property name="text"> <property name="readOnly">
<string notr="true">QT VERSION</string> <bool>true</bool>
</property> </property>
<property name="alignment"> <property name="textInteractionFlags">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> <set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="1"> <item row="5" column="1">
<widget class="QTextEdit" name="txtAdditional"> <widget class="QDialogButtonBox" name="buttonBox">
<property name="readOnly"> <property name="orientation">
<bool>true</bool> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="textInteractionFlags"> <property name="standardButtons">
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set> <set>QDialogButtonBox::Ok</set>
</property> </property>
</widget> </widget>
</item> </item>
<item row="4" column="1"> <item row="3" column="1">
<widget class="QDialogButtonBox" name="buttonBox"> <widget class="QLabel" name="lblQtVersion">
<property name="orientation"> <property name="text">
<enum>Qt::Horizontal</enum> <string notr="true">QT VERSION</string>
</property> </property>
<property name="standardButtons"> <property name="alignment">
<set>QDialogButtonBox::Ok</set> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property> </property>
</widget> </widget>
</item> </item>
</layout> <item row="1" column="1">
</widget> <widget class="QLabel" name="lblFuelRevision">
<resources> <property name="text">
<include location="../rsrc/resources.qrc"/> <string notr="true">FUEL REVISION</string>
</resources> </property>
<connections> </widget>
<connection> </item>
<sender>buttonBox</sender> </layout>
<signal>accepted()</signal> </widget>
<receiver>AboutDialog</receiver> <resources>
<slot>accept()</slot> <include location="../rsrc/resources.qrc"/>
<hints> </resources>
<hint type="sourcelabel"> <connections>
<x>248</x> <connection>
<y>254</y> <sender>buttonBox</sender>
</hint> <signal>accepted()</signal>
<hint type="destinationlabel"> <receiver>AboutDialog</receiver>
<x>157</x> <slot>accept()</slot>
<y>274</y> <hints>
</hint> <hint type="sourcelabel">
</hints> <x>248</x>
</connection> <y>254</y>
<connection> </hint>
<sender>buttonBox</sender> <hint type="destinationlabel">
<signal>rejected()</signal> <x>157</x>
<receiver>AboutDialog</receiver> <y>274</y>
<slot>reject()</slot> </hint>
<hints> </hints>
<hint type="sourcelabel"> </connection>
<x>316</x> <connection>
<y>260</y> <sender>buttonBox</sender>
</hint> <signal>rejected()</signal>
<hint type="destinationlabel"> <receiver>AboutDialog</receiver>
<x>286</x> <slot>reject()</slot>
<y>274</y> <hints>
</hint> <hint type="sourcelabel">
</hints> <x>316</x>
</connection> <y>260</y>
</connections> </hint>
</ui> <hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>