/* ============================================================ * QupZilla - WebKit based browser * Copyright (C) 2010-2013 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 * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program 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 . * ============================================================ */ #include "aboutdialog.h" #include "ui_aboutdialog.h" #include "qupzilla.h" #include "mainapplication.h" #include "tabbedwebview.h" #include "webpage.h" #include "qtwin.h" AboutDialog::AboutDialog(QWidget* parent) : QDialog(parent), ui(new Ui::AboutDialog) { ui->setupUi(this); #ifdef Q_OS_WIN if (QtWin::isCompositionEnabled()) { QtWin::extendFrameIntoClientArea(this); ui->verticalLayout->setContentsMargins(0, 0, 0, 0); } #endif connect(ui->buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(close())); connect(ui->authorsButton, SIGNAL(clicked()), this, SLOT(buttonClicked())); showAbout(); #ifdef Q_OS_WIN resize(300, height()); #endif } void AboutDialog::buttonClicked() { if (ui->authorsButton->text() == tr("Authors and Contributors")) { showAuthors(); } else if (ui->authorsButton->text() == tr("< About QupZilla")) { showAbout(); } } void AboutDialog::showAbout() { ui->authorsButton->setText(tr("Authors and Contributors")); if (m_aboutHtml.isEmpty()) { m_aboutHtml += "
"; m_aboutHtml += tr("

Application version %1
").arg(QupZilla::VERSION #ifdef GIT_REVISION + " (" + GIT_REVISION + ")" #endif ); m_aboutHtml += tr("WebKit version %1

").arg(QupZilla::WEBKITVERSION); m_aboutHtml += QString("

© %1 %2
").arg(QupZilla::COPYRIGHT, QupZilla::AUTHOR); m_aboutHtml += tr("Build time: %1

").arg(QupZilla::BUILDTIME); m_aboutHtml += QString("

%1

").arg(QupZilla::WWWADDRESS); m_aboutHtml += "

" + (mApp->windowCount() > 0 ? mApp->getWindow()->weView()->page()->userAgentForUrl(QUrl()) : QString()) + "

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

Main developer:
%1 <%2>

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

Contributors:
%1

").arg( QString::fromUtf8("Mladen Pejaković
" "Alexander Samilov
" "Seyyed Razi Alavizadeh
" "Franz Fellner
" "Bryan M Dunsmore
" "Mariusz Fik
" "Jan Rajnoha
" "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
" "Xabier Aramendi") ); m_authorsHtml += "
"; } ui->textBrowser->setHtml(m_authorsHtml); } AboutDialog::~AboutDialog() { delete ui; }