diff options
author | saturneric <[email protected]> | 2024-07-29 19:29:56 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-07-29 19:29:56 +0000 |
commit | fa90ec4b5315b9e70a44a9625c143ce253f0e885 (patch) | |
tree | 8ffa82e33522de03974d6d0289aa831b4fd6ebdf /src/ui/main_window/MainWindow.cpp | |
parent | fix: correct urls at appdata.xml (diff) | |
parent | Merge branch 'develop' of github.com:saturneric/GpgFrontend into develop (diff) | |
download | GpgFrontend-fa90ec4b5315b9e70a44a9625c143ce253f0e885.tar.gz GpgFrontend-fa90ec4b5315b9e70a44a9625c143ce253f0e885.zip |
Merge branch 'develop'
Diffstat (limited to 'src/ui/main_window/MainWindow.cpp')
-rw-r--r-- | src/ui/main_window/MainWindow.cpp | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/src/ui/main_window/MainWindow.cpp b/src/ui/main_window/MainWindow.cpp index c50cfc5e..3106f226 100644 --- a/src/ui/main_window/MainWindow.cpp +++ b/src/ui/main_window/MainWindow.cpp @@ -43,12 +43,8 @@ namespace GpgFrontend::UI { MainWindow::MainWindow() : GeneralMainWindow("main_window") { - this->setMinimumSize(1200, 700); + this->setMinimumSize(1200, 870); this->setWindowTitle(qApp->applicationName()); - - connect(CoreSignalStation::GetInstance(), - &CoreSignalStation::SignalNeedUserInputPassphrase, this, - &MainWindow::SlotRaisePinentry); } void MainWindow::Init() noexcept { @@ -61,10 +57,14 @@ void MainWindow::Init() noexcept { setCentralWidget(edit_); /* the list of Keys available*/ - m_key_list_ = - new KeyList(KeyMenuAbility::REFRESH | KeyMenuAbility::UNCHECK_ALL | - KeyMenuAbility::SEARCH_BAR, - this); + m_key_list_ = new KeyList( + KeyMenuAbility::kREFRESH | KeyMenuAbility::kCHECK_ALL | + KeyMenuAbility::kUNCHECK_ALL | KeyMenuAbility::kCOLUMN_FILTER | + KeyMenuAbility::kSEARCH_BAR, + GpgKeyTableColumn::kTYPE | GpgKeyTableColumn::kNAME | + GpgKeyTableColumn::kKEY_ID | GpgKeyTableColumn::kEMAIL_ADDRESS | + GpgKeyTableColumn::kUSAGE | GpgKeyTableColumn::kOWNER_TRUST, + this); info_board_ = new InfoBoardWidget(this); @@ -132,9 +132,9 @@ void MainWindow::Init() noexcept { Module::ListenRTPublishEvent( this, kVersionCheckingModuleID, "version.loading_done", [=](Module::Namespace, Module::Key, int, std::any) { - GF_UI_LOG_DEBUG( - "version-checking version.loading_done changed, calling slot " - "version upgrade"); + qCDebug(ui, + "version-checking version.loading_done changed, calling slot " + "version upgrade"); this->slot_version_upgrade_notify(); }); @@ -151,7 +151,7 @@ void MainWindow::Init() noexcept { if (show_wizard) slot_start_wizard(); } catch (...) { - GF_UI_LOG_ERROR(tr("Critical error occur while loading GpgFrontend.")); + qCWarning(ui) << tr("Critical error occur while loading GpgFrontend."); QMessageBox::critical( nullptr, tr("Loading Failed"), tr("Critical error occur while loading GpgFrontend.")); @@ -161,8 +161,6 @@ void MainWindow::Init() noexcept { } void MainWindow::restore_settings() { - GF_UI_LOG_DEBUG("restore settings for main windows"); - KeyServerSO key_server(SettingsObject("key_server")); if (key_server.server_list.empty()) key_server.ResetDefaultServerList(); if (key_server.default_server < 0) key_server.default_server = 0; @@ -177,8 +175,6 @@ void MainWindow::restore_settings() { prohibit_update_checking_ = settings.value("network/prohibit_update_check").toBool(); - - GF_UI_LOG_DEBUG("settings restored"); } void MainWindow::recover_editor_unsaved_pages_from_cache() { @@ -189,9 +185,6 @@ void MainWindow::recover_editor_unsaved_pages_from_cache() { return; } - GF_UI_LOG_DEBUG("plan ot recover unsaved page from cache, page array: {}", - json_data.toJson()); - bool first = true; auto unsaved_page_array = json_data.array(); @@ -207,10 +200,6 @@ void MainWindow::recover_editor_unsaved_pages_from_cache() { auto title = unsaved_page_json["title"].toString(); auto content = unsaved_page_json["content"].toString(); - GF_UI_LOG_DEBUG( - "recovering unsaved page from cache, page title: {}, content size", - title, content.size()); - if (first) { edit_->SlotCloseTab(); first = false; |