Browse Source

Merge pull request #2805 from ngosang/typo_revision

Changes in typography
adaptive-webui-19844
sledgehammer999 10 years ago
parent
commit
f5b0008158
  1. 2
      src/app/main.cpp
  2. 8
      src/core/bittorrent/session.cpp
  3. 2
      src/gui/mainwindow.cpp
  4. 4
      src/gui/mainwindow.ui
  5. 4
      src/gui/options_imp.cpp
  6. 8
      src/gui/properties/propertieswidget.cpp
  7. 2
      src/gui/properties/trackerlist.cpp
  8. 4
      src/gui/rss/rss_imp.cpp
  9. 6
      src/gui/transferlistfilterswidget.cpp
  10. 2
      src/webui/webui.cpp
  11. 8
      src/webui/www/private/index.html
  12. 4
      src/webui/www/public/download.html
  13. 2
      src/webui/www/public/scripts/mocha-init.js

2
src/app/main.cpp

@ -382,7 +382,7 @@ QString makeUsage(const QString &prg_name)
#endif #endif
text += QLatin1String("\t-h | --help\t\t") + QObject::tr("Displays this help message") + QLatin1Char('\n'); text += QLatin1String("\t-h | --help\t\t") + QObject::tr("Displays this help message") + QLatin1Char('\n');
text += QLatin1String("\t--webui-port=<port>\t") text += QLatin1String("\t--webui-port=<port>\t")
+ QObject::tr("Changes the webui port (current: %1)").arg(QString::number(Preferences::instance()->getWebUiPort())) + QObject::tr("Changes the Web UI port (current: %1)").arg(QString::number(Preferences::instance()->getWebUiPort()))
+ QLatin1Char('\n'); + QLatin1Char('\n');
#ifndef DISABLE_GUI #ifndef DISABLE_GUI
text += QLatin1String("\t--no-splash\t\t") + QObject::tr("Disable splash screen") + QLatin1Char('\n'); text += QLatin1String("\t--no-splash\t\t") + QObject::tr("Disable splash screen") + QLatin1Char('\n');

8
src/core/bittorrent/session.cpp

@ -163,7 +163,7 @@ Session::Session(QObject *parent)
// Construct session // Construct session
libt::fingerprint fingerprint(PEER_ID, VERSION_MAJOR, VERSION_MINOR, VERSION_BUGFIX, VERSION_BUILD); libt::fingerprint fingerprint(PEER_ID, VERSION_MAJOR, VERSION_MINOR, VERSION_BUGFIX, VERSION_BUILD);
m_nativeSession = new libt::session(fingerprint, 0); m_nativeSession = new libt::session(fingerprint, 0);
Logger::instance()->addMessage("Peer ID: " + Utils::String::fromStdString(fingerprint.to_string())); Logger::instance()->addMessage(tr("Peer ID: ") + Utils::String::fromStdString(fingerprint.to_string()));
m_nativeSession->set_alert_dispatch(boost::bind(&Session::dispatchAlerts, this, _1)); m_nativeSession->set_alert_dispatch(boost::bind(&Session::dispatchAlerts, this, _1));
@ -363,8 +363,8 @@ void Session::setSessionSettings()
libt::session_settings sessionSettings = m_nativeSession->settings(); libt::session_settings sessionSettings = m_nativeSession->settings();
sessionSettings.user_agent = "qBittorrent " VERSION; sessionSettings.user_agent = "qBittorrent " VERSION;
//std::cout << "HTTP user agent is " << sessionSettings.user_agent << std::endl; //std::cout << "HTTP User-Agent is " << sessionSettings.user_agent << std::endl;
logger->addMessage(tr("HTTP user agent is %1").arg(Utils::String::fromStdString(sessionSettings.user_agent))); logger->addMessage(tr("HTTP User-Agent is %1").arg(Utils::String::fromStdString(sessionSettings.user_agent)));
sessionSettings.upnp_ignore_nonrouters = true; sessionSettings.upnp_ignore_nonrouters = true;
sessionSettings.use_dht_as_fallback = false; sessionSettings.use_dht_as_fallback = false;
@ -2257,7 +2257,7 @@ void Session::handlePeerBanAlert(libt::peer_ban_alert *p)
void Session::handleUrlSeedAlert(libt::url_seed_alert *p) void Session::handleUrlSeedAlert(libt::url_seed_alert *p)
{ {
Logger::instance()->addMessage(tr("Url seed lookup failed for url: %1, message: %2").arg(Utils::String::fromStdString(p->url)).arg(Utils::String::fromStdString(p->message())), Log::CRITICAL); Logger::instance()->addMessage(tr("URL seed lookup failed for url: %1, message: %2").arg(Utils::String::fromStdString(p->url)).arg(Utils::String::fromStdString(p->message())), Log::CRITICAL);
} }
void Session::handleListenSucceededAlert(libt::listen_succeeded_alert *p) void Session::handleListenSucceededAlert(libt::listen_succeeded_alert *p)

2
src/gui/mainwindow.cpp

@ -723,7 +723,7 @@ void MainWindow::askRecursiveTorrentDownloadConfirmation(BitTorrent::TorrentHand
void MainWindow::handleDownloadFromUrlFailure(QString url, QString reason) const void MainWindow::handleDownloadFromUrlFailure(QString url, QString reason) const
{ {
// Display a message box // Display a message box
showNotificationBaloon(tr("Url download error"), tr("Couldn't download file at url: %1, reason: %2.").arg(url).arg(reason)); showNotificationBaloon(tr("URL download error"), tr("Couldn't download file at URL: %1, reason: %2.").arg(url).arg(reason));
} }
void MainWindow::on_actionSet_global_upload_limit_triggered() void MainWindow::on_actionSet_global_upload_limit_triggered()

4
src/gui/mainwindow.ui

@ -143,7 +143,7 @@
<widget class="QStatusBar" name="statusBar"/> <widget class="QStatusBar" name="statusBar"/>
<action name="actionOpen"> <action name="actionOpen">
<property name="text"> <property name="text">
<string>&amp;Add torrent file...</string> <string>&amp;Add Torrent File...</string>
</property> </property>
<property name="iconText"> <property name="iconText">
<string>Open</string> <string>Open</string>
@ -205,7 +205,7 @@
</action> </action>
<action name="actionDownload_from_URL"> <action name="actionDownload_from_URL">
<property name="text"> <property name="text">
<string>Add &amp;link to torrent...</string> <string>Add Torrent &amp;Link...</string>
</property> </property>
<property name="iconText"> <property name="iconText">
<string>Open URL</string> <string>Open URL</string>

4
src/gui/options_imp.cpp

@ -1187,9 +1187,9 @@ void options_imp::on_browseFilterButton_clicked() {
QDir filterDir(filter_path); QDir filterDir(filter_path);
QString ipfilter; QString ipfilter;
if (!filter_path.isEmpty() && filterDir.exists()) { if (!filter_path.isEmpty() && filterDir.exists()) {
ipfilter = QFileDialog::getOpenFileName(this, tr("Choose an ip filter file"), filterDir.absolutePath(), tr("Filters")+QString(" (*.dat *.p2p *.p2b)")); ipfilter = QFileDialog::getOpenFileName(this, tr("Choose an IP filter file"), filterDir.absolutePath(), tr("Filters")+QString(" (*.dat *.p2p *.p2b)"));
} else { } else {
ipfilter = QFileDialog::getOpenFileName(this, tr("Choose an ip filter file"), QDir::homePath(), tr("Filters")+QString(" (*.dat *.p2p *.p2b)")); ipfilter = QFileDialog::getOpenFileName(this, tr("Choose an IP filter file"), QDir::homePath(), tr("Filters")+QString(" (*.dat *.p2p *.p2b)"));
} }
if (!ipfilter.isNull()) if (!ipfilter.isNull())
textFilterPath->setText(Utils::Fs::toNativePath(ipfilter)); textFilterPath->setText(Utils::Fs::toNativePath(ipfilter));

8
src/gui/properties/propertieswidget.cpp

@ -737,14 +737,14 @@ void PropertiesWidget::openSelectedFile() {
void PropertiesWidget::askWebSeed() { void PropertiesWidget::askWebSeed() {
bool ok; bool ok;
// Ask user for a new url seed // Ask user for a new url seed
const QString url_seed = AutoExpandableDialog::getText(this, tr("New url seed", "New HTTP source"), const QString url_seed = AutoExpandableDialog::getText(this, tr("New URL seed", "New HTTP source"),
tr("New url seed:"), QLineEdit::Normal, tr("New URL seed:"), QLineEdit::Normal,
QString::fromUtf8("http://www."), &ok); QString::fromUtf8("http://www."), &ok);
if (!ok) return; if (!ok) return;
qDebug("Adding %s web seed", qPrintable(url_seed)); qDebug("Adding %s web seed", qPrintable(url_seed));
if (!listWebSeeds->findItems(url_seed, Qt::MatchFixedString).empty()) { if (!listWebSeeds->findItems(url_seed, Qt::MatchFixedString).empty()) {
QMessageBox::warning(this, "qBittorrent", QMessageBox::warning(this, "qBittorrent",
tr("This url seed is already in the list."), tr("This URL seed is already in the list."),
QMessageBox::Ok); QMessageBox::Ok);
return; return;
} }
@ -795,7 +795,7 @@ void PropertiesWidget::editWebSeed() {
if (!listWebSeeds->findItems(new_seed, Qt::MatchFixedString).empty()) { if (!listWebSeeds->findItems(new_seed, Qt::MatchFixedString).empty()) {
QMessageBox::warning(this, tr("qBittorrent"), QMessageBox::warning(this, tr("qBittorrent"),
tr("This url seed is already in the list."), tr("This URL seed is already in the list."),
QMessageBox::Ok); QMessageBox::Ok);
return; return;
} }

2
src/gui/properties/trackerlist.cpp

@ -433,7 +433,7 @@ void TrackerList::showTrackerListMenu(QPoint) {
QAction *editAct = 0; QAction *editAct = 0;
if (!getSelectedTrackerItems().isEmpty()) { if (!getSelectedTrackerItems().isEmpty()) {
delAct = menu.addAction(GuiIconProvider::instance()->getIcon("list-remove"), tr("Remove tracker")); delAct = menu.addAction(GuiIconProvider::instance()->getIcon("list-remove"), tr("Remove tracker"));
copyAct = menu.addAction(GuiIconProvider::instance()->getIcon("edit-copy"), tr("Copy tracker url")); copyAct = menu.addAction(GuiIconProvider::instance()->getIcon("edit-copy"), tr("Copy tracker URL"));
editAct = menu.addAction(GuiIconProvider::instance()->getIcon("edit-rename"),tr("Edit selected tracker URL")); editAct = menu.addAction(GuiIconProvider::instance()->getIcon("edit-rename"),tr("Edit selected tracker URL"));
} }
#if LIBTORRENT_VERSION_NUM >= 10000 #if LIBTORRENT_VERSION_NUM >= 10000

4
src/gui/rss/rss_imp.cpp

@ -204,7 +204,7 @@ void RSSImp::on_newFeedButton_clicked()
if (clip_txt.startsWith("http://", Qt::CaseInsensitive) || clip_txt.startsWith("https://", Qt::CaseInsensitive) || clip_txt.startsWith("ftp://", Qt::CaseInsensitive)) if (clip_txt.startsWith("http://", Qt::CaseInsensitive) || clip_txt.startsWith("https://", Qt::CaseInsensitive) || clip_txt.startsWith("ftp://", Qt::CaseInsensitive))
default_url = clip_txt; default_url = clip_txt;
QString newUrl = AutoExpandableDialog::getText(this, tr("Please type a rss stream url"), tr("Stream URL:"), QLineEdit::Normal, default_url, &ok); QString newUrl = AutoExpandableDialog::getText(this, tr("Please type a RSS stream URL"), tr("Stream URL:"), QLineEdit::Normal, default_url, &ok);
if (!ok) if (!ok)
return; return;
@ -214,7 +214,7 @@ void RSSImp::on_newFeedButton_clicked()
if (m_feedList->hasFeed(newUrl)) { if (m_feedList->hasFeed(newUrl)) {
QMessageBox::warning(this, "qBittorrent", QMessageBox::warning(this, "qBittorrent",
tr("This rss feed is already in the list."), tr("This RSS feed is already in the list."),
QMessageBox::Ok); QMessageBox::Ok);
return; return;
} }

6
src/gui/transferlistfilterswidget.cpp

@ -625,14 +625,14 @@ void TrackerFiltersList::handleFavicoDownload(const QString& url, const QString&
bool invalid = (sizes.size() > 0 ? icon.pixmap(sizes.first()).isNull() : true); bool invalid = (sizes.size() > 0 ? icon.pixmap(sizes.first()).isNull() : true);
if (invalid) { if (invalid) {
if (url.endsWith(".ico", Qt::CaseInsensitive)) { if (url.endsWith(".ico", Qt::CaseInsensitive)) {
Logger::instance()->addMessage(tr("Couldn't decode favico for url `%1`. Trying to download favico in PNG format.").arg(url), Logger::instance()->addMessage(tr("Couldn't decode favicon for URL `%1`. Trying to download favicon in PNG format.").arg(url),
Log::WARNING); Log::WARNING);
Net::DownloadHandler *h = Net::DownloadManager::instance()->downloadUrl(url.left(url.size() - 4) + ".png"); Net::DownloadHandler *h = Net::DownloadManager::instance()->downloadUrl(url.left(url.size() - 4) + ".png");
connect(h, SIGNAL(downloadFinished(QString, QString)), this, SLOT(handleFavicoDownload(QString, QString))); connect(h, SIGNAL(downloadFinished(QString, QString)), this, SLOT(handleFavicoDownload(QString, QString)));
connect(h, SIGNAL(downloadFailed(QString, QString)), this, SLOT(handleFavicoFailure(QString, QString))); connect(h, SIGNAL(downloadFailed(QString, QString)), this, SLOT(handleFavicoFailure(QString, QString)));
} }
else { else {
Logger::instance()->addMessage(tr("Couldn't decode favico for url `%1`.").arg(url), Log::WARNING); Logger::instance()->addMessage(tr("Couldn't decode favicon for URL `%1`.").arg(url), Log::WARNING);
} }
Utils::Fs::forceRemove(filePath); Utils::Fs::forceRemove(filePath);
} }
@ -646,7 +646,7 @@ void TrackerFiltersList::handleFavicoFailure(const QString& url, const QString&
{ {
// Don't use getHost() on the url here. Print the full url. The error might relate to // Don't use getHost() on the url here. Print the full url. The error might relate to
// that. // that.
Logger::instance()->addMessage(tr("Couldn't download favico for url `%1`. Reason: `%2`").arg(url).arg(error), Logger::instance()->addMessage(tr("Couldn't download favicon for URL `%1`. Reason: `%2`").arg(url).arg(error),
Log::WARNING); Log::WARNING);
} }

2
src/webui/webui.cpp

@ -83,7 +83,7 @@ void WebUI::init()
if (success) if (success)
logger->addMessage(tr("The Web UI is listening on port %1").arg(m_port)); logger->addMessage(tr("The Web UI is listening on port %1").arg(m_port));
else else
logger->addMessage(tr("Web User Interface Error - Unable to bind Web UI to port %1").arg(m_port), Log::CRITICAL); logger->addMessage(tr("Web UI Error - Unable to bind Web UI to port %1").arg(m_port), Log::CRITICAL);
} }
// DynDNS // DynDNS

8
src/webui/www/private/index.html

@ -35,8 +35,8 @@
<li> <li>
<a class="returnFalse">QBT_TR(File)QBT_TR</a> <a class="returnFalse">QBT_TR(File)QBT_TR</a>
<ul> <ul>
<li><a id="uploadLink"><img class="MyMenuIcon" alt="QBT_TR(&Add torrent file...)QBT_TR" src="theme/list-add" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(&Add torrent file...)QBT_TR</a></li> <li><a id="uploadLink"><img class="MyMenuIcon" alt="QBT_TR(&Add Torrent File...)QBT_TR" src="theme/list-add" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(&Add Torrent File...)QBT_TR</a></li>
<li><a id="downloadLink"><img class="MyMenuIcon" alt="QBT_TR(Add &link to torrent...)QBT_TR" src="theme/insert-link" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(Add &link to torrent...)QBT_TR</a></li> <li><a id="downloadLink"><img class="MyMenuIcon" alt="QBT_TR(Add Torrent &Link...)QBT_TR" src="theme/insert-link" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(Add Torrent &Link...)QBT_TR</a></li>
<li class="divider"><a id="logoutLink"><img class="MyMenuIcon" alt="QBT_TR(Logout)QBT_TR" src="theme/system-log-out" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(Logout)QBT_TR</a></li> <li class="divider"><a id="logoutLink"><img class="MyMenuIcon" alt="QBT_TR(Logout)QBT_TR" src="theme/system-log-out" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(Logout)QBT_TR</a></li>
<li><a id="shutdownLink"><img class="MyMenuIcon" alt="QBT_TR(Exit qBittorrent)QBT_TR" src="theme/application-exit" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(Exit qBittorrent)QBT_TR</a></li> <li><a id="shutdownLink"><img class="MyMenuIcon" alt="QBT_TR(Exit qBittorrent)QBT_TR" src="theme/application-exit" width="16" height="16" onload="fixPNG(this)"/>QBT_TR(Exit qBittorrent)QBT_TR</a></li>
</ul> </ul>
@ -77,8 +77,8 @@
</div> </div>
<div id="mochaToolbar"> <div id="mochaToolbar">
&nbsp;&nbsp; &nbsp;&nbsp;
<a id="uploadButton"><img class="mochaToolButton" title="QBT_TR(&Add torrent file...)QBT_TR" src="theme/list-add" alt="QBT_TR(&Add torrent file...)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a> <a id="uploadButton"><img class="mochaToolButton" title="QBT_TR(&Add Torrent File...)QBT_TR" src="theme/list-add" alt="QBT_TR(&Add Torrent File...)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="downloadButton"><img class="mochaToolButton" title="QBT_TR(Add &link to torrent...)QBT_TR" src="theme/insert-link" alt="QBT_TR(Add &link to torrent...)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a> <a id="downloadButton"><img class="mochaToolButton" title="QBT_TR(Add Torrent &Link...)QBT_TR" src="theme/insert-link" alt="QBT_TR(Add Torrent &Link...)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="deleteButton" class="divider"><img class="mochaToolButton" title="QBT_TR(Delete)QBT_TR" src="theme/list-remove" alt="QBT_TR(Delete)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a> <a id="deleteButton" class="divider"><img class="mochaToolButton" title="QBT_TR(Delete)QBT_TR" src="theme/list-remove" alt="QBT_TR(Delete)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="resumeButton" class="divider"><img class="mochaToolButton" title="QBT_TR(Resume)QBT_TR" src="theme/media-playback-start" alt="QBT_TR(Resume)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a> <a id="resumeButton" class="divider"><img class="mochaToolButton" title="QBT_TR(Resume)QBT_TR" src="theme/media-playback-start" alt="QBT_TR(Resume)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a>
<a id="pauseButton"><img class="mochaToolButton" title="QBT_TR(Pause)QBT_TR" src="theme/media-playback-pause" alt="QBT_TR(Pause)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a> <a id="pauseButton"><img class="mochaToolButton" title="QBT_TR(Pause)QBT_TR" src="theme/media-playback-pause" alt="QBT_TR(Pause)QBT_TR" width="24" height="24" onload="fixPNG(this)"/></a>

4
src/webui/www/public/download.html

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>QBT_TR(Add &link to torrent...)QBT_TR</title> <title>QBT_TR(Add Torrent Link)QBT_TR</title>
<link rel="stylesheet" href="css/style.css" type="text/css" /> <link rel="stylesheet" href="css/style.css" type="text/css" />
<script type="text/javascript" src="scripts/mootools-1.2-core-yc.js" charset="utf-8"></script> <script type="text/javascript" src="scripts/mootools-1.2-core-yc.js" charset="utf-8"></script>
<script type="text/javascript" src="scripts/download.js" charset="utf-8"></script> <script type="text/javascript" src="scripts/download.js" charset="utf-8"></script>
@ -10,7 +10,7 @@
<body> <body>
<center> <center>
<br/> <br/>
<h2 class="vcenter">QBT_TR(Download Torrents from their URL or Magnet link)QBT_TR</h2> <h2 class="vcenter">QBT_TR(Download Torrents from their URLs or Magnet links)QBT_TR</h2>
<textarea id="urls" rows="10"></textarea> <textarea id="urls" rows="10"></textarea>
<p>QBT_TR(Only one link per line)QBT_TR</p> <p>QBT_TR(Only one link per line)QBT_TR</p>
<input type="button" value="QBT_TR(Download)QBT_TR" id="downButton"/> <input type="button" value="QBT_TR(Download)QBT_TR" id="downButton"/>

2
src/webui/www/public/scripts/mocha-init.js

@ -47,7 +47,7 @@ initializeWindows = function() {
new Event(e).stop(); new Event(e).stop();
new MochaUI.Window({ new MochaUI.Window({
id: 'downloadPage', id: 'downloadPage',
title: "QBT_TR(Download from urls)QBT_TR", title: "QBT_TR(Download from URLs)QBT_TR",
loadMethod: 'iframe', loadMethod: 'iframe',
contentURL: 'download.html', contentURL: 'download.html',
scrollbars: true, scrollbars: true,

Loading…
Cancel
Save