DomainSettingsDialog::DomainSettingsDialog(const int &startType, const QString &domainName) : QDialog(nullptr)
{
- // Instantiate the domain settings view UI.
+ // Set the window title.
+ setWindowTitle(i18nc("The domain settings dialog window title", "Domain Settings"));
+
+ // Set the window modality.
+ setWindowModality(Qt::WindowModality::WindowModal);;
+
+ // Instantiate the domain settings dialog UI.
Ui::DomainSettingsDialog domainSettingsDialogUi;
// Setup the UI.
if (userAgentName == UserAgentHelper::SYSTEM_DEFAULT_TRANSLATED)
{
// Display the system default user agent name.
- userAgentLabelPointer->setText(UserAgentHelper::getTranslatedUserAgentName(Settings::userAgent()));
+ userAgentLabelPointer->setText(UserAgentHelper::getTranslatedUserAgentNameFromDatabaseName(Settings::userAgent()));
}
else
{
deleteDialogMessageBox.setWindowTitle(i18nc("Delete domain dialog title", "Delete Domain"));
// Set the text.
- deleteDialogMessageBox.setText(i18nc("Delete domain main message", "Delete the current domain?"));
+ deleteDialogMessageBox.setText(i18nc("Delete domain dialog main message", "Delete the current domain?"));
// Set the informative text.
- deleteDialogMessageBox.setInformativeText(i18nc("Delete domain secondary message", "Doing so will also save any pending changes that have been made to other domains."));
+ deleteDialogMessageBox.setInformativeText(i18nc("Delete domain dialog secondary message", "Doing so will also save any pending changes that have been made to other domains."));
// Set the standard buttons.
deleteDialogMessageBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
// Display the dialog and capture the return value.
int returnValue = deleteDialogMessageBox.exec();
+ // Delete the domain if instructed.
if (returnValue == QMessageBox::Yes)
{
// Get the current index.
{
// Update the domains table model.
domainsTableModelPointer->setData(domainsListViewPointer->selectionModel()->currentIndex().siblingAtColumn(domainsTableModelPointer->fieldIndex(DomainsDatabaseHelper::USER_AGENT)),
- UserAgentHelper::getDatabaseUserAgentName(updatedUserAgent));
+ UserAgentHelper::getDatabaseUserAgentNameFromTranslatedName(updatedUserAgent));
// Populate the user agent label.
populateUserAgentLabel(updatedUserAgent);