Ignore:
Timestamp:
Oct 9, 2014, 2:54:21 PM (11 years ago)
Author:
Silvan Scherrer
Message:

SMPlayer: updated trunk to 14.9.0

Location:
smplayer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • smplayer/trunk

  • smplayer/trunk/src/sharedialog.cpp

    r165 r170  
    5050        //layout()->setSizeConstraint(QLayout::SetFixedSize);
    5151
    52         share_text = QString("SMPlayer - Free Media Player with built-in codecs that can play and download Youtube videos").replace(" ","+");
    5352        share_url = "http://smplayer.sourceforge.net";
    5453}
     
    6968        qDebug("ShareDialog::on_donate_button_clicked");
    7069        actions_taken |= Donate;
    71         QDesktopServices::openUrl(QUrl("http://sourceforge.net/donate/index.php?group_id=185512"));
     70        QDesktopServices::openUrl(QUrl("http://smplayer.sourceforge.net/donate.php"));
    7271}
    7372
     
    7574        qDebug("ShareDialog::on_facebook_button_clicked");
    7675        actions_taken |= Facebook;
    77         QDesktopServices::openUrl(QUrl("http://www.facebook.com/sharer.php?u=" + share_url + "&t=" + share_text));
     76        QDesktopServices::openUrl(QUrl("http://www.facebook.com/sharer.php?u=" + share_url /* + "&t=" + share_text */ ));
    7877}
    7978
     
    8180        qDebug("ShareDialog::on_twitter_button_clicked");
    8281        actions_taken |= Twitter;
    83         QDesktopServices::openUrl(QUrl("http://twitter.com/intent/tweet?text=" + share_text + "&url=" + share_url + "/&via=smplayer_dev"));
     82
     83        QString text = tr("SMPlayer is a free media player for PC. It plays all formats and can even download Youtube videos.",
     84                                          "This text is to be published on twitter and the translation should not be more than 99 characters long");
     85
     86        qDebug("ShareDialog::on_twitter_button_clicked: length: %d", text.length());
     87        if (text.length() > 99) {
     88                qDebug("ShareDialog::on_twitter_button_clicked: the translation text is too long (%d), it shouldn't be longer than 99 characters. Using the English text.", text.length());
     89                text = "SMPlayer is a free media player for PC. It plays all formats and can even download Youtube videos.";
     90        }
     91        //text = text.replace("SMPlayer", "#SMPlayer");
     92        text = QUrl::toPercentEncoding(text);
     93        QString url = "http://twitter.com/intent/tweet?text=" + text + "&url=" + QUrl::toPercentEncoding(share_url) + "/&via=smplayer_dev";
     94        QDesktopServices::openUrl(QUrl::fromEncoded(url.toLatin1()));
    8495}
    8596
Note: See TracChangeset for help on using the changeset viewer.