diff --git a/qt/AboutDialog.cc b/qt/AboutDialog.cc index de0a2a786..1013d8339 100644 --- a/qt/AboutDialog.cc +++ b/qt/AboutDialog.cc @@ -16,15 +16,34 @@ #include "AboutDialog.h" #include "LicenseDialog.h" +#include "Session.h" #include "Utils.h" -AboutDialog::AboutDialog(QWidget* parent) : +AboutDialog::AboutDialog(Session& session, QWidget* parent) : BaseDialog(parent) { ui_.setupUi(this); ui_.iconLabel->setPixmap(QApplication::windowIcon().pixmap(48)); - ui_.titleLabel->setText(tr("Transmission %1").arg(QStringLiteral(LONG_VERSION_STRING))); + + if (session.isServer()) + { + auto const title = QStringLiteral("Transmission %1") + .arg(QStringLiteral(LONG_VERSION_STRING)); + ui_.titleLabel->setText(title); + } + else + { + QString title = QStringLiteral( + "
Transmission
"); + title += QStringLiteral("
%1: %2
") + .arg(tr("This GUI")) + .arg(QStringLiteral(LONG_VERSION_STRING)); + title += QStringLiteral("
%1: %2
") + .arg(tr("Remote")) + .arg(session.sessionVersion()); + ui_.titleLabel->setText(title); + } QPushButton const* b = ui_.dialogButtons->addButton(tr("C&redits"), QDialogButtonBox::ActionRole); connect(b, &QAbstractButton::clicked, this, &AboutDialog::showCredits); diff --git a/qt/AboutDialog.h b/qt/AboutDialog.h index df19ef454..a998206f1 100644 --- a/qt/AboutDialog.h +++ b/qt/AboutDialog.h @@ -15,6 +15,7 @@ #include "ui_AboutDialog.h" class LicenseDialog; +class Session; class AboutDialog : public BaseDialog { @@ -22,7 +23,7 @@ class AboutDialog : public BaseDialog TR_DISABLE_COPY_MOVE(AboutDialog) public: - explicit AboutDialog(QWidget* parent = nullptr); + explicit AboutDialog(Session& session, QWidget* parent = nullptr); private slots: void showCredits(); diff --git a/qt/MainWindow.cc b/qt/MainWindow.cc index 60b87a099..d8a489cd2 100644 --- a/qt/MainWindow.cc +++ b/qt/MainWindow.cc @@ -676,7 +676,7 @@ void MainWindow::openDonate() const void MainWindow::openAbout() { - Utils::openDialog(about_dialog_, this); + Utils::openDialog(about_dialog_, session_, this); } void MainWindow::openHelp() const