/* smplayer, GUI front-end for mplayer. Copyright (C) 2006-2008 Ricardo Villalba 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 2 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, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "about.h" #include "images.h" #include "version.h" #include "global.h" #include "preferences.h" #include "paths.h" #include "mplayerversion.h" #include //#define TRANS_ORIG #define TRANS_LIST //#define TRANS_TABLE using namespace Global; About::About(QWidget * parent, Qt::WindowFlags f) : QDialog(parent, f) { setupUi(this); setWindowIcon( Images::icon("logo", 64) ); logo->setPixmap( Images::icon("logo", 64) ); contrib_icon->setPixmap( Images::icon("contributors" ) ); translators_icon->setPixmap( Images::icon("translators" ) ); license_icon->setPixmap( Images::icon("license" ) ); QString mplayer_version; if (pref->mplayer_detected_version > 0) { mplayer_version = tr("Using MPlayer %1").arg(MplayerVersion::toString(pref->mplayer_detected_version)) + "

"; } info->setText( "SMPlayer © 2006-2008 Ricardo Villalba <rvm@escomposlinux.org>

" "" + tr("Version: %1").arg(smplayerVersion()) + "" + #if PORTABLE_APP " (" + tr("Portable Edition") + ")" + #endif "
" + tr("Using Qt %1 (compiled with Qt %2)").arg(qVersion()).arg(QT_VERSION_STR) + "

" + mplayer_version + tr("Visit our web for updates:") +"
"+ link("http://smplayer.berlios.de") + "
" + link("http://smplayer.sf.net") + "

" + tr("Get help in our forum:") +"
" + link("http://smplayer.berlios.de/forums") + "

" + tr("You can support SMPlayer by making a donation.") +" "+ link("https://sourceforge.net/donate/index.php?group_id=185512", tr("More info")) //link("http://www.qt-apps.org/content/donate.php?content=61041", tr("More info")) ); QString license_file = Paths::doc("gpl.html", pref->language); if (QFile::exists(license_file)) { QFont fixed_font; fixed_font.setStyleHint(QFont::TypeWriter); fixed_font.setFamily("Courier"); license->setFont(fixed_font); QFile f(license_file); if (f.open(QIODevice::ReadOnly)) { license->setText(QString::fromUtf8(f.readAll().constData())); } f.close(); } else { license->setText( "" + tr("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 2 of the License, or " "(at your option) any later version.") + ""); } translators->setHtml( getTranslators() ); contributions->setText( tr("SMPlayer logo by %1").arg("Charles Barcza <kbarcza@blackpanther.hu>") + "

" + tr("The following people have contributed with patches " "(see the changelog for details):") + "
" +
        QString(
		"corentin1234 \n"
		"Florin Braghis \n"
		"Francesco Cosoleto \n"
		"Glaydus \n"
		"Kamil Dziobek \n"
		"LoRd_MuldeR (http://forum.doom9.org/member.php?u=78667)\n"
		"Matthias Petri \n"
		"profoX \n"
		"redxii \n"
		"Sikon \n"
		"Simon \n"
		"Stanislav Maslovski \n"
		"Tanguy Krotoff \n"
		).replace("<", "<").replace(">", ">") + 
		"
" + tr("If there's any omission, please report.") ); // Copy the background color ("window") of the tab widget to the "base" color of the qtextbrowsers // Problem, it doesn't work with some styles, so first we change the "window" color of the tab widgets. info_tab->setAutoFillBackground(true); contributions_tab->setAutoFillBackground(true); translations_tab->setAutoFillBackground(true); license_tab->setAutoFillBackground(true); QPalette pal = info_tab->palette(); pal.setColor(QPalette::Window, palette().color(QPalette::Window) ); info_tab->setPalette(pal); contributions_tab->setPalette(pal); translations_tab->setPalette(pal); license_tab->setPalette(pal); QPalette p = info->palette(); //p.setBrush(QPalette::Base, info_tab->palette().window()); p.setColor(QPalette::Base, info_tab->palette().color(QPalette::Window)); info->setPalette(p); contributions->setPalette(p); translators->setPalette(p); //license->setPalette(p); adjustSize(); } About::~About() { } QString About::getTranslators() { return QString( tr("The following people have contributed with translations:") + #ifndef TRANS_TABLE "