diff --git a/src/lib/other/aboutdialog.cpp b/src/lib/other/aboutdialog.cpp index e00bacf02..67951082d 100644 --- a/src/lib/other/aboutdialog.cpp +++ b/src/lib/other/aboutdialog.cpp @@ -28,112 +28,35 @@ AboutDialog::AboutDialog(QWidget* parent) : QDialog(parent) , ui(new Ui::AboutDialog) - , m_showingAuthors(false) { setAttribute(Qt::WA_DeleteOnClose); ui->setupUi(this); ui->label->setPixmap(QIcon(QSL(":icons/other/about.png")).pixmap(300, 130)); - connect(ui->buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(close())); - connect(ui->authorsButton, SIGNAL(clicked()), this, SLOT(buttonClicked())); - showAbout(); } -void AboutDialog::buttonClicked() -{ - if (m_showingAuthors) - showAbout(); - else - showAuthors(); -} - -void AboutDialog::showAbout() -{ - m_showingAuthors = false; - ui->authorsButton->setText(tr("Authors and Contributors")); - if (m_aboutHtml.isEmpty()) { - m_aboutHtml += "
"; - m_aboutHtml += tr("

Application version %1
").arg( -#ifdef FALKON_GIT_REVISION - QString("%1 (%2)").arg(Qz::VERSION, FALKON_GIT_REVISION) -#else - Qz::VERSION -#endif - ); - m_aboutHtml += tr("QtWebEngine version %1

").arg(qVersion()); - m_aboutHtml += QString("

© %1 %2
").arg(Qz::COPYRIGHT, Qz::AUTHOR); - m_aboutHtml += QString("%1

").arg(Qz::WWWADDRESS); - m_aboutHtml += "

" + mApp->userAgentManager()->defaultUserAgent() + "

"; - m_aboutHtml += "
"; - } - ui->textBrowser->setHtml(m_aboutHtml); -} - -void AboutDialog::showAuthors() -{ - m_showingAuthors = true; - ui->authorsButton->setText(tr("< About Falkon")); - if (m_authorsHtml.isEmpty()) { - m_authorsHtml += "
"; - m_authorsHtml += tr("

Main developer:
%1 <%2>

").arg(Qz::AUTHOR, "nowrep@gmail.com"); - m_authorsHtml += tr("

Contributors:
%1

").arg( - QString::fromUtf8("Mladen Pejaković
" - "Seyyed Razi Alavizadeh
" - "Adrien Vigneron
" - "Elio Qoshi
" - "Alexander Samilov
" - "Franz Fellner
" - "Bryan M Dunsmore
" - "Mariusz Fik
" - "Daniele Cocca") - ); - - m_authorsHtml += tr("

Translators:
%1

").arg( - QString::fromUtf8("Heimen Stoffels
" - "Peter Vacula
" - "Jonathan Hooverman
" - "Federico Fabiani
" - "Francesco Marinucci
" - "Jorge Sevilla
" - "Ștefan Comănescu
" - "Michał Szymanowski
" - "Mariusz Fik
" - "Jérôme Giry
" - "Nicolas Ourceau
" - "Vasilis Tsivikis
" - "Rustam Salakhutdinov
" - "Oleg Brezhnev
" - "Sérgio Marques
" - "Alexandre Carvalho
" - "Mladen Pejaković
" - "Unink-Lio
" - "Wu Cheng-Hong
" - "Widya Walesa
" - "Beqa Arabuli
" - "Daiki Noda
" - "Gábor Oberle
" - "Piccoro McKay Lenz
" - "Stanislav Kuznietsov
" - "Seyyed Razi Alavizadeh
" - "Guillem Prats
" - "Clara Villalba
" - "Yu Hai
" - "Muhammad Fawwaz Orabi
" - "Lasso Kante
" - "Kizito Birabwa
" - "Juan Carlos Sánchez
" - "Xabier Aramendi
" - "Ferhat AYDIN") - ); - m_authorsHtml += "
"; - } - - ui->textBrowser->setHtml(m_authorsHtml); -} - AboutDialog::~AboutDialog() { delete ui; } + +void AboutDialog::showAbout() +{ + QString aboutHtml; + aboutHtml += "
"; + aboutHtml += tr("

Application version %1
").arg( +#ifdef FALKON_GIT_REVISION + QString("%1 (%2)").arg(Qz::VERSION, FALKON_GIT_REVISION) +#else + Qz::VERSION +#endif + ); + aboutHtml += tr("QtWebEngine version %1

").arg(qVersion()); + aboutHtml += QString("

© %1 %2
").arg(Qz::COPYRIGHT, Qz::AUTHOR); + aboutHtml += QString("%1

").arg(Qz::WWWADDRESS); + aboutHtml += "

" + mApp->userAgentManager()->defaultUserAgent() + "

"; + aboutHtml += "
"; + ui->textBrowser->setHtml(aboutHtml); +} diff --git a/src/lib/other/aboutdialog.h b/src/lib/other/aboutdialog.h index 6e4b8d5de..a7411352b 100644 --- a/src/lib/other/aboutdialog.h +++ b/src/lib/other/aboutdialog.h @@ -1,6 +1,6 @@ /* ============================================================ * Falkon - Qt web browser -* Copyright (C) 2010-2014 David Rosca +* Copyright (C) 2010-2018 David Rosca * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -37,15 +37,11 @@ public: private slots: void showAbout(); - void showAuthors(); - void buttonClicked(); private: Ui::AboutDialog* ui; QString m_aboutHtml; - QString m_authorsHtml; - bool m_showingAuthors; }; #endif // ABOUTDIALOG_H diff --git a/src/lib/other/aboutdialog.ui b/src/lib/other/aboutdialog.ui index 8e06f52f2..8db9dafc9 100644 --- a/src/lib/other/aboutdialog.ui +++ b/src/lib/other/aboutdialog.ui @@ -6,8 +6,8 @@ 0 0 - 446 - 382 + 440 + 350 @@ -48,19 +48,6 @@ 5 - - - - - 0 - 0 - - - - Authors - - -