2012-06-10 16:50:54 +00:00
|
|
|
/*
|
|
|
|
|
* synergy -- mouse and keyboard sharing utility
|
2016-09-07 14:24:00 +00:00
|
|
|
* Copyright (C) 2012-2016 Symless Ltd.
|
2012-06-10 16:50:54 +00:00
|
|
|
* Copyright (C) 2008 Volker Lanz (vl@fidra.de)
|
2024-07-02 19:07:06 +00:00
|
|
|
*
|
2012-06-10 16:50:54 +00:00
|
|
|
* This package is free software; you can redistribute it and/or
|
|
|
|
|
* modify it under the terms of the GNU General Public License
|
2015-05-03 02:33:52 +00:00
|
|
|
* found in the file LICENSE that should have accompanied this file.
|
2024-07-02 19:07:06 +00:00
|
|
|
*
|
2012-06-10 16:50:54 +00:00
|
|
|
* This package is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
|
2022-09-13 15:31:45 +00:00
|
|
|
#include "AboutDialog.h"
|
2024-07-02 19:07:06 +00:00
|
|
|
#include "OSXHelpers.h"
|
2020-12-21 11:09:52 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
AboutDialog::AboutDialog(MainWindow *parent, const AppConfig &config)
|
|
|
|
|
: QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
|
|
|
|
|
Ui::AboutDialogBase() {
|
|
|
|
|
setupUi(this);
|
2020-08-18 12:55:25 +00:00
|
|
|
|
2024-07-22 16:48:02 +00:00
|
|
|
m_versionChecker.setApp(parent->appPath(config.coreClientName()));
|
2024-07-08 10:40:22 +00:00
|
|
|
|
|
|
|
|
QString version = SYNERGY_VERSION;
|
|
|
|
|
#ifdef GIT_SHA_SHORT
|
|
|
|
|
version += " (" GIT_SHA_SHORT ")";
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
m_pLabelSynergyVersion->setText(version);
|
2012-07-29 01:01:33 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
QString buildDateString = QString::fromLocal8Bit(__DATE__).simplified();
|
|
|
|
|
QDate buildDate = QLocale("en_US").toDate(buildDateString, "MMM d yyyy");
|
2024-07-08 14:37:51 +00:00
|
|
|
m_pLabelBuildDate->setText(
|
|
|
|
|
buildDate.toString(QLocale::system().dateFormat(QLocale::LongFormat)));
|
2022-09-13 15:31:45 +00:00
|
|
|
}
|
2020-08-18 12:55:25 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
int AboutDialog::exec() {
|
2024-07-08 14:37:51 +00:00
|
|
|
m_pDevelopersLabel->setText(getImportantDevelopers());
|
|
|
|
|
m_pCopyrightLabel->setText(getCopyright());
|
2024-07-02 19:07:06 +00:00
|
|
|
resizeWindow();
|
|
|
|
|
updateLogo();
|
2022-09-13 15:31:45 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
return QDialog::exec();
|
2022-09-13 15:31:45 +00:00
|
|
|
}
|
2020-12-21 11:09:52 +00:00
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void AboutDialog::resizeWindow() {
|
|
|
|
|
QSize size(600, 310);
|
|
|
|
|
setMaximumSize(size);
|
|
|
|
|
setMinimumSize(size);
|
|
|
|
|
resize(size);
|
2022-09-13 15:31:45 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 19:07:06 +00:00
|
|
|
void AboutDialog::updateLogo() const {
|
2022-09-13 15:31:45 +00:00
|
|
|
#if defined(Q_OS_MAC)
|
2024-07-02 19:07:06 +00:00
|
|
|
if (isOSXInterfaceStyleDark()) {
|
|
|
|
|
QPixmap logo(":/res/image/about-dark.png");
|
|
|
|
|
if (!logo.isNull()) {
|
2024-07-08 14:37:51 +00:00
|
|
|
m_pLabel_Logo->setPixmap(logo);
|
2020-12-21 11:09:52 +00:00
|
|
|
}
|
2024-07-02 19:07:06 +00:00
|
|
|
}
|
2012-07-29 01:01:33 +00:00
|
|
|
#endif
|
2012-06-10 16:50:54 +00:00
|
|
|
}
|
2022-06-30 11:48:26 +00:00
|
|
|
|
2024-07-08 14:37:51 +00:00
|
|
|
QString AboutDialog::getImportantDevelopers() const {
|
|
|
|
|
return QString(
|
|
|
|
|
// The ultimate creator
|
|
|
|
|
"Chris Schoeneman, "
|
|
|
|
|
|
|
|
|
|
// Precursor developers
|
|
|
|
|
"Richard Lee, Adam Feder, "
|
|
|
|
|
|
|
|
|
|
// Contributors
|
|
|
|
|
"Nick Bolton, Volker Lanz, Ryan Breen, Guido Poschta, "
|
|
|
|
|
"Bertrand Landry Hetu, Tom Chadwick, Brent Priddy, Jason Axelson, "
|
|
|
|
|
"Jake Petroules, Sorin Sbârnea, "
|
|
|
|
|
|
|
|
|
|
// Symless employees
|
|
|
|
|
"Kyle Bloom, Daun Chung, Serhii Hadzhylov, "
|
|
|
|
|
"Oleksandr Lysytsia, Olena Kutytska, Francisco Magalhães.");
|
2022-06-30 11:48:26 +00:00
|
|
|
}
|
|
|
|
|
|
2024-07-08 14:37:51 +00:00
|
|
|
QString AboutDialog::getCopyright() const {
|
2024-07-02 19:07:06 +00:00
|
|
|
QString buildDateString = QString::fromLocal8Bit(__DATE__).simplified();
|
|
|
|
|
QDate buildDate = QLocale("en_US").toDate(buildDateString, "MMM d yyyy");
|
2022-09-13 15:31:45 +00:00
|
|
|
|
2024-07-08 14:37:51 +00:00
|
|
|
QString copyright("Copyright © 2012-%%YEAR%% Symless Ltd.\n"
|
|
|
|
|
"Copyright © 2009-2012 Nick Bolton\n"
|
|
|
|
|
"Copyright © 2002-2009 Chris Schoeneman");
|
2024-07-16 13:36:44 +00:00
|
|
|
return copyright.replace(
|
|
|
|
|
QString("%%YEAR%%"), QString::number(buildDate.year()));
|
2022-06-30 11:48:26 +00:00
|
|
|
}
|