Changeset 170 for smplayer/trunk/src/sharedialog.cpp
- Timestamp:
- Oct 9, 2014, 2:54:21 PM (11 years ago)
- Location:
- smplayer/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
smplayer/trunk
- Property svn:mergeinfo changed
/smplayer/vendor/current merged: 168
- Property svn:mergeinfo changed
-
smplayer/trunk/src/sharedialog.cpp
r165 r170 50 50 //layout()->setSizeConstraint(QLayout::SetFixedSize); 51 51 52 share_text = QString("SMPlayer - Free Media Player with built-in codecs that can play and download Youtube videos").replace(" ","+");53 52 share_url = "http://smplayer.sourceforge.net"; 54 53 } … … 69 68 qDebug("ShareDialog::on_donate_button_clicked"); 70 69 actions_taken |= Donate; 71 QDesktopServices::openUrl(QUrl("http://s ourceforge.net/donate/index.php?group_id=185512"));70 QDesktopServices::openUrl(QUrl("http://smplayer.sourceforge.net/donate.php")); 72 71 } 73 72 … … 75 74 qDebug("ShareDialog::on_facebook_button_clicked"); 76 75 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 */ )); 78 77 } 79 78 … … 81 80 qDebug("ShareDialog::on_twitter_button_clicked"); 82 81 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())); 84 95 } 85 96
Note:
See TracChangeset
for help on using the changeset viewer.