From ef1b42b53185e4b1ec841ab15bf6272cd2a99473 Mon Sep 17 00:00:00 2001 From: Saturneric Date: Mon, 20 Dec 2021 14:28:53 +0800 Subject: Fixed bugs. 1. Not not paint in main thread. --- src/ui/UserInterfaceUtils.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/ui/UserInterfaceUtils.cpp') diff --git a/src/ui/UserInterfaceUtils.cpp b/src/ui/UserInterfaceUtils.cpp index 0931a179..581eabda 100644 --- a/src/ui/UserInterfaceUtils.cpp +++ b/src/ui/UserInterfaceUtils.cpp @@ -151,6 +151,15 @@ CommonUtils* CommonUtils::GetInstance() { CommonUtils::CommonUtils() : QWidget(nullptr) { connect(this, SIGNAL(signalKeyStatusUpdated()), SignalStation::GetInstance(), SIGNAL(KeyDatabaseRefresh())); + connect(this, &CommonUtils::signalGnupgNotInstall, this, []() { + QMessageBox::critical( + nullptr, _("ENV Loading Failed"), + _("Gnupg(gpg) is not installed correctly, please follow the " + "ReadME " + "instructions in Github to install Gnupg and then open " + "GpgFrontend.")); + QCoreApplication::quit(); + }); } void CommonUtils::slotImportKeys(QWidget* parent, -- cgit v1.2.3 From a056f2186de2470d4328bd1cd682e5e484af4587 Mon Sep 17 00:00:00 2001 From: Saturneric Date: Sun, 2 Jan 2022 11:40:22 +0800 Subject: (core, ui): add & modify core and ui 1. add init functions for core. 2. add non ascii settings. 3. fit ui with this version of core. --- src/ui/UserInterfaceUtils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ui/UserInterfaceUtils.cpp') diff --git a/src/ui/UserInterfaceUtils.cpp b/src/ui/UserInterfaceUtils.cpp index 581eabda..f7f5cb82 100644 --- a/src/ui/UserInterfaceUtils.cpp +++ b/src/ui/UserInterfaceUtils.cpp @@ -164,7 +164,7 @@ CommonUtils::CommonUtils() : QWidget(nullptr) { void CommonUtils::slotImportKeys(QWidget* parent, const std::string& in_buffer) { - GpgImportInformation result = GpgKeyImportExportor::GetInstance().ImportKey( + GpgImportInformation result = GpgKeyImportExporter::GetInstance().ImportKey( std::make_unique(in_buffer)); emit signalKeyStatusUpdated(); new KeyImportDetailDialog(result, false, parent); @@ -309,7 +309,7 @@ void CommonUtils::slotImportKeyFromKeyServer( // Try importing GpgImportInformation result = - GpgKeyImportExportor::GetInstance(ctx_channel) + GpgKeyImportExporter::GetInstance(ctx_channel) .ImportKey(std::move(key_data_ptr)); if (result.imported == 1) { -- cgit v1.2.3 From efabb4fa3d543a1d4443b75a1f23c564ccffd8e2 Mon Sep 17 00:00:00 2001 From: Saturneric Date: Mon, 3 Jan 2022 07:54:56 +0800 Subject: (ui): Enhanced sending email function. 1. make options changeable when init in sending email dialog. --- src/ui/UserInterfaceUtils.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/ui/UserInterfaceUtils.cpp') diff --git a/src/ui/UserInterfaceUtils.cpp b/src/ui/UserInterfaceUtils.cpp index f7f5cb82..967dcc32 100644 --- a/src/ui/UserInterfaceUtils.cpp +++ b/src/ui/UserInterfaceUtils.cpp @@ -41,7 +41,7 @@ std::unique_ptr #ifdef SMTP_SUPPORT void send_an_email(QWidget* parent, InfoBoardWidget* info_board, - const QString& text) { + const QString& text, bool attach_signature) { info_board->addOptionalAction(_("Send Encrypted Mail"), [=]() { bool smtp_enabled = false; try { @@ -52,6 +52,8 @@ void send_an_email(QWidget* parent, InfoBoardWidget* info_board, } if (smtp_enabled) { auto dialog = new SendMailDialog(text, parent); + dialog->setContentEncryption(false); + dialog->setAttachSignature(attach_signature); dialog->show(); } else { QMessageBox::warning(nullptr, _("Function Disabled"), -- cgit v1.2.3