This commit is contained in:
Chocobo1 2021-10-10 00:14:18 +08:00
parent 3467358663
commit 7087565d92
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
7 changed files with 45 additions and 45 deletions

View file

@ -415,7 +415,7 @@ MainWindow::MainWindow(QWidget *parent)
hide();
if (!pref->minimizeToTrayNotified())
{
showNotificationBaloon(tr("qBittorrent is minimized to tray"), tr("This behavior can be changed in the settings. You won't be reminded again."));
showNotificationBalloon(tr("qBittorrent is minimized to tray"), tr("This behavior can be changed in the settings. You won't be reminded again."));
pref->setMinimizeToTrayNotified(true);
}
}
@ -857,26 +857,26 @@ void MainWindow::balloonClicked()
void MainWindow::addTorrentFailed(const QString &error) const
{
showNotificationBaloon(tr("Error"), tr("Failed to add torrent: %1").arg(error));
showNotificationBalloon(tr("Error"), tr("Failed to add torrent: %1").arg(error));
}
// called when a torrent was added
void MainWindow::torrentNew(BitTorrent::Torrent *const torrent) const
{
if (isTorrentAddedNotificationsEnabled())
showNotificationBaloon(tr("Torrent added"), tr("'%1' was added.", "e.g: xxx.avi was added.").arg(torrent->name()));
showNotificationBalloon(tr("Torrent added"), tr("'%1' was added.", "e.g: xxx.avi was added.").arg(torrent->name()));
}
// called when a torrent has finished
void MainWindow::finishedTorrent(BitTorrent::Torrent *const torrent) const
{
showNotificationBaloon(tr("Download completed"), tr("'%1' has finished downloading.", "e.g: xxx.avi has finished downloading.").arg(torrent->name()));
showNotificationBalloon(tr("Download completed"), tr("'%1' has finished downloading.", "e.g: xxx.avi has finished downloading.").arg(torrent->name()));
}
// Notification when disk is full
void MainWindow::fullDiskError(BitTorrent::Torrent *const torrent, const QString &msg) const
{
showNotificationBaloon(tr("I/O Error", "i.e: Input/Output Error")
showNotificationBalloon(tr("I/O Error", "i.e: Input/Output Error")
, tr("An I/O error occurred for torrent '%1'.\n Reason: %2"
, "e.g: An error occurred for torrent 'xxx.avi'.\n Reason: disk is full.").arg(torrent->name(), msg));
}
@ -993,7 +993,7 @@ void MainWindow::askRecursiveTorrentDownloadConfirmation(BitTorrent::Torrent *co
void MainWindow::handleDownloadFromUrlFailure(const QString &url, const QString &reason) const
{
// Display a message box
showNotificationBaloon(tr("URL download error")
showNotificationBalloon(tr("URL download error")
, tr("Couldn't download file at URL '%1', reason: %2.").arg(url, reason));
}
@ -1203,7 +1203,7 @@ void MainWindow::closeEvent(QCloseEvent *e)
QTimer::singleShot(0, this, &QWidget::hide);
if (!pref->closeToTrayNotified())
{
showNotificationBaloon(tr("qBittorrent is closed to tray"), tr("This behavior can be changed in the settings. You won't be reminded again."));
showNotificationBalloon(tr("qBittorrent is closed to tray"), tr("This behavior can be changed in the settings. You won't be reminded again."));
pref->setCloseToTrayNotified(true);
}
return;
@ -1303,7 +1303,7 @@ bool MainWindow::event(QEvent *e)
QTimer::singleShot(0, this, &QWidget::hide);
if (!pref->minimizeToTrayNotified())
{
showNotificationBaloon(tr("qBittorrent is minimized to tray"), tr("This behavior can be changed in the settings. You won't be reminded again."));
showNotificationBalloon(tr("qBittorrent is minimized to tray"), tr("This behavior can be changed in the settings. You won't be reminded again."));
pref->setMinimizeToTrayNotified(true);
}
return true;
@ -1666,7 +1666,7 @@ void MainWindow::reloadTorrentStats(const QVector<BitTorrent::Torrent *> &torren
}
}
void MainWindow::showNotificationBaloon(const QString &title, const QString &msg) const
void MainWindow::showNotificationBalloon(const QString &title, const QString &msg) const
{
if (!isNotificationsEnabled())
return;