Ignore:
Timestamp:
Mar 16, 2012, 4:02:47 PM (13 years ago)
Author:
Silvan Scherrer
Message:

SMPlayer: 0.7.1 trunk update

Location:
smplayer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • smplayer/trunk

  • smplayer/trunk/src/about.cpp

    r119 r124  
    11/*  smplayer, GUI front-end for mplayer.
    2     Copyright (C) 2006-2011 Ricardo Villalba <rvm@escomposlinux.org>
     2    Copyright (C) 2006-2012 Ricardo Villalba <rvm@users.sourceforge.net>
    33
    44    This program is free software; you can redistribute it and/or modify
     
    2626
    2727#include <QFile>
     28#include <QDesktopServices>
    2829
    2930//#define TRANS_ORIG
     
    3435
    3536About::About(QWidget * parent, Qt::WindowFlags f)
    36         : QDialog(parent, f) 
     37        : QDialog(parent, f)
    3738{
    3839        setupUi(this);
    3940        setWindowIcon( Images::icon("logo", 64) );
    4041
    41         logo->setPixmap( Images::icon("logo", 64) );
     42        logo->setPixmap( QPixmap(":/icons-png/logo.png").scaledToHeight(64, Qt::SmoothTransformation) );
    4243        contrib_icon->setPixmap( Images::icon("contributors" ) );
    4344        translators_icon->setPixmap( Images::icon("translators" ) );
     
    4647        QString mplayer_version;
    4748        if (pref->mplayer_detected_version > 0) {
    48                 mplayer_version = tr("Using MPlayer %1").arg(MplayerVersion::toString(pref->mplayer_detected_version)) + "<br><br>";
    49         }
    50 
    51         info->setText(
    52                 "<b>SMPlayer</b> &copy; 2006-2011 Ricardo Villalba &lt;rvm@escomposlinux.org&gt;<br><br>"
     49                if (pref->mplayer_is_mplayer2) {
     50                        mplayer_version = tr("Using MPlayer2 %1").arg(pref->mplayer2_detected_version);
     51                } else {
     52                        mplayer_version = tr("Using MPlayer %1").arg(MplayerVersion::toString(pref->mplayer_detected_version));
     53                }
     54                mplayer_version += "<br><br>";
     55        }
     56
     57        info->setText(
     58                "<b>SMPlayer</b> &copy; 2006-2012 Ricardo Villalba &lt;rvm@users.sourceforge.net&gt;<br><br>"
    5359                "<b>" + tr("Version: %1").arg(smplayerVersion()) + "</b>" +
    5460#if PORTABLE_APP
     
    5864        tr("Using Qt %1 (compiled with Qt %2)").arg(qVersion()).arg(QT_VERSION_STR) + "<br><br>" +
    5965                mplayer_version +
    60                 tr("Visit our web for updates:") +"<br>"+ 
    61         link("http://smplayer.sf.net") + 
     66                tr("Visit our web for updates:") +"<br>"+
     67        link("http://smplayer.sf.net") +
    6268        "<br><br>" +
    63                 tr("Get help in our forum:") +"<br>" + link("http://smplayer.sf.net/forum")
     69                tr("Get help in our forum:") +"<br>" + link("http://smplayer.sf.net/forum") +
     70        "<br><br>" +
     71                tr("SMPlayer uses the award-winning MPlayer as playback engine. See %1")
     72                   .arg("<a href=\"http://www.mplayerhq.hu\">http://www.mplayerhq.hu</a>")
    6473        );
    6574
    6675
    67         QString license_file = Paths::doc("gpl.html", pref->language);
    68         if (QFile::exists(license_file)) {
    69                 QFont fixed_font;
    70                 fixed_font.setStyleHint(QFont::TypeWriter);
    71                 fixed_font.setFamily("Courier");
    72                 license->setFont(fixed_font);
    73 
    74                 QFile f(license_file);
    75                 if (f.open(QIODevice::ReadOnly)) {
    76                         license->setText(QString::fromUtf8(f.readAll().constData()));
    77                 }
    78                 f.close();
    79         } else {
    80                 license->setText(
    81                 "<i>" +
    82                 tr("This program is free software; you can redistribute it and/or modify "
     76        QString license_text =
     77                "<i>"
     78                "This program is free software; you can redistribute it and/or modify "
    8379            "it under the terms of the GNU General Public License as published by "
    8480            "the Free Software Foundation; either version 2 of the License, or "
    85             "(at your option) any later version.") + "</i>");
    86         }
     81            "(at your option) any later version."  "</i><br><br>";
     82               
     83        QString license_file = Paths::doc("gpl.html", "en");
     84        if (QFile::exists(license_file)) {
     85                license_file = QUrl::fromLocalFile(license_file).toString();
     86                license_text += QString("<a href=\"%1\">%2</a>").arg(license_file).arg(tr("Read the entire license"));
     87        }
     88
     89        if ((pref->language != "en") && (pref->language != "en_US")) {
     90                QString license_trans_file = Paths::doc("gpl.html", pref->language, false);
     91                //qDebug("license_trans_file: %s", license_trans_file.toUtf8().constData());
     92                if (QFile::exists(license_trans_file)) {
     93                        license_trans_file = QUrl::fromLocalFile(license_trans_file).toString();
     94                        license_text += QString("<br><a href=\"%1\">%2</a>").arg(license_trans_file).arg(tr("Read a translation"));
     95                }
     96        }
     97        license->setText(license_text);
     98        license->setOpenLinks(false);
     99        license->setOpenExternalLinks(false);
     100        connect(license, SIGNAL(anchorClicked(const QUrl &)), this, SLOT(openLink(const QUrl&)));
    87101
    88102        translators->setHtml( getTranslators() );
     
    90104        contributions->setText(
    91105        tr("SMPlayer logo by %1").arg("Charles Barcza &lt;kbarcza@blackpanther.hu&gt;") + "<br><br>" +
    92                 tr("The following people have contributed with patches "
    93                    "(see the changelog for details):") +
    94                 "<pre>" +
    95         QString(
    96                 "corentin1234 <corentin1234@hotmail.com>\n"
    97                 "Florin Braghis <florin@libertv.ro>\n"
    98                 "Francesco Cosoleto <cosoleto@users.sourceforge.net>\n"
    99                 "Glaydus <glaydus@gmail.com>\n"
    100                 "Kamil Dziobek <turbos11@gmail.com>\n"
    101                 "LoRd_MuldeR (http://forum.doom9.org/member.php?u=78667)\n"
    102                 "Matthias Petri <matt@endboss.org>\n"
    103                 "profoX <wesley@ubuntu.com>\n"
    104                 "redxii <redxii1234@gmail.com>\n"
    105                 "Sikon <sikon@users.sourceforge.net>\n"
    106                 "Simon <hackykid@users.sourceforge.net>\n"
    107                 "Stanislav Maslovski <s_i_m@users.sourceforge.net>\n"
    108                 "Tanguy Krotoff <tkrotoff@gmail.com>\n"
    109                 "Stivo <helifan@users.sourceforge.net>\n"
    110                 ).replace("<", "&lt;").replace(">", "&gt;") +
    111                 "</pre>" +
    112                 tr("If there's any omission, please report.")
     106                tr("Packages for Windows created by %1").arg("redxii &lt;redxii@users.sourceforge.net&gt;") + "<br><br>" +
     107                tr("Many other people contributed with patches. See the Changelog for details.")
    113108        );
    114109
     
    119114        translations_tab->setAutoFillBackground(true);
    120115        license_tab->setAutoFillBackground(true);
    121        
     116
    122117        QPalette pal = info_tab->palette();
    123118        pal.setColor(QPalette::Window, palette().color(QPalette::Window) );
    124        
     119
    125120        info_tab->setPalette(pal);
    126121        contributions_tab->setPalette(pal);
    127122        translations_tab->setPalette(pal);
    128123        license_tab->setPalette(pal);
    129        
     124
    130125        QPalette p = info->palette();
    131126        //p.setBrush(QPalette::Base, info_tab->palette().window());
     
    135130        contributions->setPalette(p);
    136131        translators->setPalette(p);
    137         //license->setPalette(p);
     132        license->setPalette(p);
    138133
    139134        adjustSize();
     
    145140QString About::getTranslators() {
    146141        return QString(
    147                  tr("The following people have contributed with translations:") + 
     142                 tr("The following people have contributed with translations:") +
    148143#ifndef TRANS_TABLE
    149144         "<ul>" +
     
    151146         "<table>" +
    152147#endif
    153          trad(tr("German"), "Panagiotis Papadopoulos <pano_90@gmx.net>") + 
     148         trad(tr("German"), "Panagiotis Papadopoulos <pano_90@gmx.net>") +
    154149                 trad(tr("Slovak"), "Sweto <peter.mendel@gmail.com>") +
    155150                 trad(tr("Italian"), QStringList()
    156                         << "greengreat <gmeildeno@gmail.com>"
     151                        << "greengreat <gmeildeno@gmail.com>"
    157152                        << "Giancarlo Scola <scola.giancarlo@libero.it>") +
    158          trad(tr("French"), QStringList() 
     153         trad(tr("French"), QStringList()
    159154                        << "Olivier g <1got@caramail.com>"
    160155                        << "Temet <goondy@free.fr>"
    161156                        << "Erwann MEST <kud.gray@gmail.com>") +
    162                  trad(tr("Simplified-Chinese"), "Tim Green <iamtimgreen@gmail.com>") +
    163          trad(tr("Russian"), QString::fromUtf8("Белый ВлаЎОЌОр <wiselord1983@gmail.com>"))+
     157         trad(tr("Simplified-Chinese"), QStringList()
     158                        << "Tim Green <iamtimgreen@gmail.com>"
     159                        << "OpenBDH <opensource@bendihua.org>") +
     160         trad(tr("Russian"), QString::fromUtf8("Белый ВлаЎОЌОр <wiselord1983@gmail.com>"))+
    164161         trad(tr("Hungarian"), QStringList()
    165162                        << "Charles Barcza <kbarcza@blackpanther.hu>"
    166                         << "CyberDragon <cyberdragon777@gmail.com>") + 
     163                        << "CyberDragon <cyberdragon777@gmail.com>") +
    167164         trad(tr("Polish"), QStringList()
    168165                        << "qla <qla0@vp.pl>"
    169166                        << "Jarek <ajep9691@wp.pl>"
    170167                        << "sake12 <sake12@gmail.com>" ) +
    171          trad(tr("Japanese"), "Nardog <nardog@e2umail.com>") +
     168         trad(tr("Japanese"), "Nardog <alphisation@gmail.com>") +
    172169         trad(tr("Dutch"), QStringList()
    173170                        << "profoX <wesley@ubuntu-nl.org>"
     
    177174                        << "Motsyo Gennadi <drool@altlinux.ru>"
    178175                        << "Oleksandr Kovalenko <alx.kovalenko@gmail.com>" ) +
    179          trad(tr("Portuguese - Brazil"), "Ventura <ventura.barbeiro@terra.com.br>") + 
    180          trad(tr("Georgian"), "George Machitidze <giomac@gmail.com>") + 
     176         trad(tr("Portuguese - Brazil"), "Ventura <ventura.barbeiro@terra.com.br>") +
     177         trad(tr("Georgian"), "George Machitidze <giomac@gmail.com>") +
    181178         trad(tr("Czech"), QStringList()
    182179                        << QString::fromUtf8("Martin Dvořák <martin.dvorak@centrum.cz>")
     
    185182         trad(tr("Turkish"), "alper er <alperer@gmail.com>") +
    186183         trad(tr("Swedish"), "Leif Larsson <leif.larsson@gmail.com>") +
    187          trad(tr("Serbian"), "Kunalagon Umuhanik <kunalagon@gmail.com>") + 
    188          trad(tr("Traditional Chinese"), "Hoopoe <dai715.tw@yahoo.com.tw>") + 
    189          trad(tr("Romanian"), "DoruH <DoruHushHush@gmail.com>") + 
     184         trad(tr("Serbian"), "Kunalagon Umuhanik <kunalagon@gmail.com>") +
     185         trad(tr("Traditional Chinese"), "Hoopoe <dai715.tw@yahoo.com.tw>") +
     186         trad(tr("Romanian"), "DoruH <DoruHushHush@gmail.com>") +
    190187         trad(tr("Portuguese - Portugal"), QStringList()
    191188                        << "Waxman <waxman.pt@gmail.com>"
     
    203200                trad(tr("Vietnamese"), QString::fromUtf8("Lê Xuân Thảo <thaolx@gmail.com>")) +
    204201                trad(tr("Estonian"), QString::fromUtf8("Olav MÀgi <olav.magi@hotmail.com>")) +
    205                 trad(tr("Lithuanian"), "Freemail <ricka_g@freemail.lt>") +
    206                 trad(tr("Danish"), "Martin Schlander <mschlander@opensuse.org>") +
     202        trad(tr("Lithuanian"), "Freemail <ricka_g@freemail.lt>") +
     203        trad(tr("Danish"), "Martin Schlander <mschlander@opensuse.org>") +
     204        trad(tr("Croatian"), QString::fromUtf8("Josip KujundÅŸija <marshsmello@gmail.com>")) +
    207205#ifndef TRANS_TABLE
    208206        "</ul>");
     
    272270}
    273271
     272void About::openLink(const QUrl & link) {
     273        qDebug("About::openLink: '%s'", link.toString().toUtf8().constData());
     274        QDesktopServices::openUrl(link);
     275}
     276
    274277#include "moc_about.cpp"
Note: See TracChangeset for help on using the changeset viewer.