mirror of
https://github.com/RetroShare/RetroShare.git
synced 2026-01-14 23:11:17 -05:00
Merge pull request #3108 from jolavillette/DisplayEngineVersion
display libretroshare version in About dialogs and enable dirty flag support
This commit is contained in:
commit
7beaa8bb6f
5 changed files with 35 additions and 17 deletions
|
|
@ -217,7 +217,6 @@ void AWidget::initImages()
|
|||
image1 = QImage(width(),height(),QImage::Format_ARGB32);
|
||||
image1.fill(palette().color(QPalette::Window));
|
||||
|
||||
//QImage image(":/images/logo/logo_info.png");
|
||||
QPixmap image(":/images/logo/logo_splash.png");
|
||||
QPainter p(&image1);
|
||||
p.setPen(Qt::black);
|
||||
|
|
@ -226,22 +225,23 @@ void AWidget::initImages()
|
|||
font.setPointSizeF(font.pointSizeF() + 2);
|
||||
p.setFont(font);
|
||||
|
||||
//p.drawPixmap(QRect(10, 10, width()-10, 60), image);
|
||||
|
||||
/* Draw RetroShare version */
|
||||
/* [Fix] Removed space before colon to match English typography */
|
||||
#ifdef RS_ONLYHIDDENNODE
|
||||
p.drawText(QPointF(10, 50), QString("%1 : %2 (With embedded Tor)").arg(tr("Retroshare version"), Rshare::retroshareVersion(true)));
|
||||
p.drawText(QPointF(10, 50), QString("%1: %2 (With embedded Tor)").arg(tr("RetroShare version"), RsApplication::retroshareVersion(true)));
|
||||
#else
|
||||
p.drawText(QPointF(10, 50), QString("%1 : %2").arg(tr("Retroshare version"), RsApplication::retroshareVersion(true)));
|
||||
p.drawText(QPointF(10, 50), QString("%1: %2").arg(tr("RetroShare version"), RsApplication::retroshareVersion(true)));
|
||||
#endif
|
||||
|
||||
/* [Added] Draw libretroshare version below the GUI version */
|
||||
/* [Fix] Removed space before colon here too */
|
||||
p.drawText(QPointF(10, 70), QString("%1: %2").arg(tr("libretroshare version"), QString::fromUtf8(RsInit::libRetroShareVersion())));
|
||||
|
||||
/* Draw Qt's version number */
|
||||
p.drawText(QPointF(10, 90), QString("Qt %1 : %2").arg(tr("version"), QT_VERSION_STR));
|
||||
p.drawText(QPointF(10, 90), QString("Qt %1: %2").arg(tr("version"), QT_VERSION_STR));
|
||||
|
||||
p.end();
|
||||
|
||||
// setFixedSize(image1.size());
|
||||
|
||||
image2 = image1 ;
|
||||
mImagesReady = true ;
|
||||
|
||||
|
|
@ -940,13 +940,17 @@ static QString addLibraries(const std::string &name, const std::list<RsLibraryIn
|
|||
return mTextEdit;
|
||||
}
|
||||
|
||||
|
||||
void AboutWidget::on_copy_button_clicked()
|
||||
{
|
||||
QString verInfo;
|
||||
QString rsVerString = "RetroShare Version: ";
|
||||
rsVerString+=RsApplication::retroshareVersion(true);
|
||||
verInfo+=rsVerString;
|
||||
|
||||
/* [Added] Append libretroshare version to clipboard info */
|
||||
verInfo+= "\nlibretroshare: ";
|
||||
verInfo+= QString::fromUtf8(RsInit::libRetroShareVersion());
|
||||
|
||||
#ifdef RS_ONLYHIDDENNODE
|
||||
verInfo+=" " + tr("Only Hidden Node");
|
||||
#endif
|
||||
|
|
@ -1003,3 +1007,4 @@ void AboutWidget::on_copy_button_clicked()
|
|||
|
||||
QApplication::clipboard()->setText(verInfo);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,11 +80,20 @@ HelpDialog::HelpDialog(QWidget *parent) :
|
|||
ui->thanks->setHtml(in.readAll());
|
||||
}
|
||||
|
||||
ui->version->setText(RsApplication::retroshareVersion(true));
|
||||
/* [Modified] Display both RetroShare and libretroshare versions clearly */
|
||||
QString versionText = QString("RetroShare: %1\nlibretroshare: %2")
|
||||
.arg(RsApplication::retroshareVersion(true))
|
||||
.arg(QString::fromUtf8(RsInit::libRetroShareVersion()));
|
||||
|
||||
ui->version->setText(versionText);
|
||||
|
||||
/* Add version numbers of libretroshare */
|
||||
std::list<RsLibraryInfo> libraries;
|
||||
RsControl::instance()->getLibraries(libraries);
|
||||
|
||||
/* [Added] Insert libretroshare version at the top of the libraries list */
|
||||
libraries.push_front(RsLibraryInfo("libretroshare", RsInit::libRetroShareVersion()));
|
||||
|
||||
addLibraries(ui->libraryLayout, "libretroshare", libraries);
|
||||
|
||||
// #ifdef RS_WEBUI
|
||||
|
|
|
|||
|
|
@ -95,7 +95,6 @@ void CryptoPage::exportProfile()
|
|||
QMessageBox::information(this, tr("Identity not saved"), tr("Your identity was not saved. An error occurred."));
|
||||
}
|
||||
|
||||
|
||||
void CryptoPage::showEvent ( QShowEvent * /*event*/ )
|
||||
{
|
||||
RsPeerDetails detail;
|
||||
|
|
@ -112,8 +111,15 @@ void CryptoPage::showEvent ( QShowEvent * /*event*/ )
|
|||
rsPeers->getShortInvite(invite,rsPeers->getOwnId(),RetroshareInviteFlags::RADIX_FORMAT | RsPeers::defaultCertificateFlags);
|
||||
ui.retroshareId_content_LB->setText(QString::fromUtf8(invite.c_str()));
|
||||
|
||||
/* set retroshare version */
|
||||
ui.version->setText(RsApplication::retroshareVersion(true));
|
||||
/* [Modified] Show both RetroShare and libretroshare versions */
|
||||
/* We rename the label "Software Version:" to "RetroShare version:" and add the lbretroshare line */
|
||||
/* Using newlines (\n) allows us to display both without modifying the .ui grid layout */
|
||||
ui.label_3->setText(tr("RetroShare version:") + "\n" + tr("libretroshare version:"));
|
||||
|
||||
QString versionText = RsApplication::retroshareVersion(true);
|
||||
versionText += "\n";
|
||||
versionText += QString::fromUtf8(RsInit::libRetroShareVersion());
|
||||
ui.version->setText(versionText);
|
||||
|
||||
std::list<RsPgpId> ids;
|
||||
ids.clear();
|
||||
|
|
@ -122,7 +128,6 @@ void CryptoPage::showEvent ( QShowEvent * /*event*/ )
|
|||
|
||||
ui.friendsEdit->setText(QString::number(friends));
|
||||
|
||||
|
||||
QString string ;
|
||||
string = rsFiles->getPartialsDirectory().c_str();
|
||||
QString datadir = string;
|
||||
|
|
@ -135,7 +140,6 @@ void CryptoPage::showEvent ( QShowEvent * /*event*/ )
|
|||
load() ;
|
||||
}
|
||||
|
||||
|
||||
CryptoPage::~CryptoPage()
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@
|
|||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>PGP Id :</string>
|
||||
<string>PGP Id:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
|
|||
|
|
@ -479,7 +479,7 @@ defined in command line")
|
|||
DEFINES += RS_MINI_VERSION=$${RS_MINI_VERSION}
|
||||
DEFINES += RS_EXTRA_VERSION=\\\"$${RS_EXTRA_VERSION}\\\"
|
||||
} else {
|
||||
RS_GIT_DESCRIBE = $$system(git describe --long --match v*.*.*)
|
||||
RS_GIT_DESCRIBE = $$system(git describe --long --dirty --match v*.*.*)
|
||||
contains(RS_GIT_DESCRIBE, ^v\d+\.\d+\.\d+.*) {
|
||||
RS_GIT_DESCRIBE_SPLIT = $$split(RS_GIT_DESCRIBE, v)
|
||||
RS_GIT_DESCRIBE_SPLIT = $$split(RS_GIT_DESCRIBE_SPLIT, .)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue