From 1e67c3e68dbe4141c9cd3bfd7b29c747fca03753 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Tue, 17 Nov 2020 12:30:59 +0100 Subject: Add core plugins and better messages. --- src/settingsdialogplugins.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/settingsdialogplugins.cpp') diff --git a/src/settingsdialogplugins.cpp b/src/settingsdialogplugins.cpp index a86ba5c9..0c860fa0 100644 --- a/src/settingsdialogplugins.cpp +++ b/src/settingsdialogplugins.cpp @@ -241,7 +241,8 @@ void PluginsSettingsTab::on_checkboxEnabled_clicked(bool checked) if (m_pluginContainer->requirements(game).proxy() == plugin) { QMessageBox::warning( parentWidget(), QObject::tr("Cannot disable plugin"), - QObject::tr("This plugin is used by the current game plugin and cannot disabled."), QMessageBox::Ok); + QObject::tr("The '%1' plugin is used by the current game plugin and cannot disabled.") + .arg(plugin->localizedName()), QMessageBox::Ok); ui->enabledCheckbox->setChecked(true); return; } @@ -254,9 +255,9 @@ void PluginsSettingsTab::on_checkboxEnabled_clicked(bool checked) } pluginNames.sort(); QString message = QObject::tr( - "

Disabling this plugin will prevent the following plugins from working:

" + "

Disabling the '%1' plugin will prevent the following plugins from working:

" "

Do you want to continue? You will need to restart ModOrganizer2 for the change to take effect.

") - .arg("
  • " + pluginNames.join("
  • ") + "
  • "); + .arg(plugin->localizedName()).arg("
  • " + pluginNames.join("
  • ") + "
  • "); if (QMessageBox::critical( parentWidget(), QObject::tr("Really disable plugin?"), message, QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) { @@ -275,8 +276,8 @@ void PluginsSettingsTab::on_checkboxEnabled_clicked(bool checked) } pluginNames.sort(); QString message = QObject::tr( - "

    Disabling this plugin will also disable the following plugins:

    Do you want to continue?

    ") - .arg("
  • " + pluginNames.join("
  • ") + "
  • "); + "

    Disabling the '%1' plugin will also disable the following plugins:

    Do you want to continue?

    ") + .arg(plugin->localizedName()).arg("
  • " + pluginNames.join("
  • ") + "
  • "); if (QMessageBox::warning( parentWidget(), QObject::tr("Really disable plugin?"), message, QMessageBox::Yes | QMessageBox::No) == QMessageBox::No) { @@ -310,7 +311,7 @@ void PluginsSettingsTab::on_pluginsList_currentItemChanged(QTreeWidgetItem *curr ui->descriptionLabel->setText(plugin->description()); ui->enabledCheckbox->setVisible( - !m_pluginContainer->implementInterface(plugin) + !m_pluginContainer->requirements(plugin).isCorePlugin() && plugin->master().isEmpty()); ui->enabledCheckbox->setChecked(m_pluginContainer->isEnabled(plugin)); -- cgit v1.3.1