From 10684b6d82f1843eff3921da40802d335fb3cf5c Mon Sep 17 00:00:00 2001 From: "Felix (xq) Queißner" Date: Wed, 17 Mar 2021 11:54:43 +0100 Subject: Further improves localization (#191). Allows switching and setting the chosen localization properly. --- src/widgets/ssltrusteditor.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/widgets/ssltrusteditor.cpp') diff --git a/src/widgets/ssltrusteditor.cpp b/src/widgets/ssltrusteditor.cpp index e740977..7ae3090 100644 --- a/src/widgets/ssltrusteditor.cpp +++ b/src/widgets/ssltrusteditor.cpp @@ -1,12 +1,20 @@ #include "ssltrusteditor.hpp" #include "ui_ssltrusteditor.h" +#include "kristall.hpp" + SslTrustEditor::SslTrustEditor(QWidget *parent) : QWidget(parent), ui(new Ui::SslTrustEditor) { ui->setupUi(this); + connect( // connect with "this" as context, so the connection will die when the window is destroyed + kristall::globals().localization.get(), &Localization::translationChanged, + this, [this]() { this->ui->retranslateUi(this); }, + Qt::DirectConnection + ); + this->ui->trust_level->clear(); this->ui->trust_level->addItem(tr("Trust on first encounter"), QVariant::fromValue(SslTrust::TrustOnFirstUse)); this->ui->trust_level->addItem(tr("Trust everything"), QVariant::fromValue(SslTrust::TrustEverything)); -- cgit v1.2.3