Skip to content

Commit

Permalink
Standardize web seed naming in GUI
Browse files Browse the repository at this point in the history
The GUI referred to these items as both "web seeds" and "URL seeds". This also removes the arbitrary capitalization of "Web" and standardizes on the verb of "Add". Lastly, menu items that open a dialog now end with an ellipsis.
  • Loading branch information
Piccirello committed Sep 12, 2024
1 parent f51bc3a commit dfafb1f
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/gui/properties/propertieswidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,11 +531,11 @@ void PropertiesWidget::loadUrlSeeds()
return;

m_ui->listWebSeeds->clear();
qDebug("Loading URL seeds");
qDebug("Loading web seeds");
// Add url seeds
for (const QUrl &urlSeed : urlSeeds)
{
qDebug("Loading URL seed: %s", qUtf8Printable(urlSeed.toString()));
qDebug("Loading web seed: %s", qUtf8Printable(urlSeed.toString()));
new QListWidgetItem(urlSeed.toString(), m_ui->listWebSeeds);
}
});
Expand All @@ -550,16 +550,16 @@ void PropertiesWidget::displayWebSeedListMenu()
QMenu *menu = new QMenu(this);
menu->setAttribute(Qt::WA_DeleteOnClose);

menu->addAction(UIThemeManager::instance()->getIcon(u"list-add"_s), tr("New Web seed"), this, &PropertiesWidget::askWebSeed);
menu->addAction(UIThemeManager::instance()->getIcon(u"list-add"_s), tr("Add web seed..."), this, &PropertiesWidget::askWebSeed);

if (!rows.isEmpty())
{
menu->addAction(UIThemeManager::instance()->getIcon(u"edit-clear"_s, u"list-remove"_s), tr("Remove Web seed")
menu->addAction(UIThemeManager::instance()->getIcon(u"edit-clear"_s, u"list-remove"_s), tr("Remove web seed")
, this, &PropertiesWidget::deleteSelectedUrlSeeds);
menu->addSeparator();
menu->addAction(UIThemeManager::instance()->getIcon(u"edit-copy"_s), tr("Copy Web seed URL")
menu->addAction(UIThemeManager::instance()->getIcon(u"edit-copy"_s), tr("Copy web seed URL")
, this, &PropertiesWidget::copySelectedWebSeedsToClipboard);
menu->addAction(UIThemeManager::instance()->getIcon(u"edit-rename"_s), tr("Edit Web seed URL")
menu->addAction(UIThemeManager::instance()->getIcon(u"edit-rename"_s), tr("Edit web seed URL...")
, this, &PropertiesWidget::editWebSeed);
}

Expand Down Expand Up @@ -607,14 +607,14 @@ void PropertiesWidget::askWebSeed()
{
bool ok = false;
// Ask user for a new url seed
const QString urlSeed = AutoExpandableDialog::getText(this, tr("New URL seed", "New HTTP source"),
tr("New URL seed:"), QLineEdit::Normal,
const QString urlSeed = AutoExpandableDialog::getText(this, tr("Add web seed", "Add HTTP source"),
tr("Add web seed:"), QLineEdit::Normal,
u"http://www."_s, &ok);
if (!ok) return;
qDebug("Adding %s web seed", qUtf8Printable(urlSeed));
if (!m_ui->listWebSeeds->findItems(urlSeed, Qt::MatchFixedString).empty())
{
QMessageBox::warning(this, u"qBittorrent"_s, tr("This URL seed is already in the list."), QMessageBox::Ok);
QMessageBox::warning(this, u"qBittorrent"_s, tr("This web seed is already in the list."), QMessageBox::Ok);
return;
}
if (m_torrent)
Expand Down Expand Up @@ -667,7 +667,7 @@ void PropertiesWidget::editWebSeed()
if (!m_ui->listWebSeeds->findItems(newSeed, Qt::MatchFixedString).empty())
{
QMessageBox::warning(this, u"qBittorrent"_s,
tr("This URL seed is already in the list."),
tr("This web seed is already in the list."),
QMessageBox::Ok);
return;
}
Expand Down

0 comments on commit dfafb1f

Please sign in to comment.