diff --git a/internal/frontend/bridge-gui/bridge-gui-tester/GRPCQtProxy.cpp b/internal/frontend/bridge-gui/bridge-gui-tester/GRPCQtProxy.cpp index 936d7304..09d3ca99 100644 --- a/internal/frontend/bridge-gui/bridge-gui-tester/GRPCQtProxy.cpp +++ b/internal/frontend/bridge-gui/bridge-gui-tester/GRPCQtProxy.cpp @@ -39,6 +39,7 @@ void GRPCQtProxy::connectSignals() connect(this, &GRPCQtProxy::delayedEventRequested, &mainWindow, &MainWindow::sendDelayedEvent); connect(this, &GRPCQtProxy::setIsAutostartOnReceived, &settingsTab, &SettingsTab::setIsAutostartOn); connect(this, &GRPCQtProxy::setIsBetaEnabledReceived, &settingsTab, &SettingsTab::setIsBetaEnabled); + connect(this, &GRPCQtProxy::setIsAllMailVisibleReceived, &settingsTab, &SettingsTab::setIsAllMailVisible); connect(this, &GRPCQtProxy::setColorSchemeNameReceived, &settingsTab, &SettingsTab::setColorSchemeName); connect(this, &GRPCQtProxy::reportBugReceived, &settingsTab, &SettingsTab::setBugReport); connect(this, &GRPCQtProxy::setIsStreamingReceived, &settingsTab, &SettingsTab::setIsStreaming); @@ -83,6 +84,15 @@ void GRPCQtProxy::setIsBetaEnabled(bool enabled) } +//**************************************************************************************************************************************************** +/// \param[in] visible The value. +//**************************************************************************************************************************************************** +void GRPCQtProxy::setIsAllMailVisible(bool visible) +{ + emit setIsAllMailVisibleReceived(visible); +} + + //**************************************************************************************************************************************************** /// \param[in] name The color scheme. //**************************************************************************************************************************************************** diff --git a/internal/frontend/bridge-gui/bridge-gui-tester/GRPCQtProxy.h b/internal/frontend/bridge-gui/bridge-gui-tester/GRPCQtProxy.h index 7d3a1c45..a8c7100a 100644 --- a/internal/frontend/bridge-gui/bridge-gui-tester/GRPCQtProxy.h +++ b/internal/frontend/bridge-gui/bridge-gui-tester/GRPCQtProxy.h @@ -41,6 +41,7 @@ public: // member functions. void sendDelayedEvent(bridgepp::SPStreamEvent const &event); ///< Sends a delayed stream event. void setIsAutostartOn(bool on); ///< Forwards a SetIsAutostartOn call via a Qt signal. void setIsBetaEnabled(bool enabled); ///< Forwards a SetIsBetaEnabled call via a Qt signal. + void setIsAllMailVisible(bool visible); ///< Forwards a SetIsAllMailVisible call via a Qt signal. void setColorSchemeName(QString const &name); ///< Forward a SetColorSchemeName call via a Qt Signal void reportBug(QString const &osType, QString const &osVersion, QString const &emailClient, QString const &address, QString const &description, bool includeLogs); ///< Forwards a ReportBug call via a Qt signal. @@ -60,6 +61,7 @@ signals: void delayedEventRequested(bridgepp::SPStreamEvent const &event); ///< Signal for sending a delayed event. delayed is set in the UI. void setIsAutostartOnReceived(bool on); ///< Forwards a SetIsAutostartOn call via a Qt signal. void setIsBetaEnabledReceived(bool enabled); ///< Forwards a SetIsBetaEnabled call via a Qt signal. + void setIsAllMailVisibleReceived(bool enabled); ///< Forwards a SetIsBetaEnabled call via a Qt signal. void setColorSchemeNameReceived(QString const &name); ///< Forward a SetColorScheme call via a Qt Signal void reportBugReceived(QString const &osType, QString const &osVersion, QString const &emailClient, QString const &address, QString const &description, bool includeLogs); ///< Signal for the ReportBug gRPC call diff --git a/internal/frontend/bridge-gui/bridge-gui-tester/GRPCService.cpp b/internal/frontend/bridge-gui/bridge-gui-tester/GRPCService.cpp index 35e1fc00..b43c9489 100644 --- a/internal/frontend/bridge-gui/bridge-gui-tester/GRPCService.cpp +++ b/internal/frontend/bridge-gui/bridge-gui-tester/GRPCService.cpp @@ -184,6 +184,30 @@ Status GRPCService::IsBetaEnabled(ServerContext *, Empty const *, BoolValue *res } +//**************************************************************************************************************************************************** +/// \param[in] request The request. +/// \return The status for the call. +//**************************************************************************************************************************************************** +Status GRPCService::SetIsAllMailVisible(ServerContext *, BoolValue const *request, Empty *) +{ + app().log().debug(__FUNCTION__); + qtProxy_.setIsAllMailVisible(request->value()); + return Status::OK; +} + + +//**************************************************************************************************************************************************** +/// \param[out] response The response. +/// \return The status for the call. +//**************************************************************************************************************************************************** +Status GRPCService::IsAllMailVisible(ServerContext *, Empty const *request, BoolValue *response) +{ + app().log().debug(__FUNCTION__); + response->set_value(app().mainWindow().settingsTab().isAllMailVisible()); + return Status::OK; +} + + //**************************************************************************************************************************************************** /// \param[out] response The response. /// \return The status for the call. diff --git a/internal/frontend/bridge-gui/bridge-gui-tester/GRPCService.h b/internal/frontend/bridge-gui/bridge-gui-tester/GRPCService.h index 2e1caca4..af9c5181 100644 --- a/internal/frontend/bridge-gui/bridge-gui-tester/GRPCService.h +++ b/internal/frontend/bridge-gui/bridge-gui-tester/GRPCService.h @@ -52,6 +52,8 @@ public: // member functions. grpc::Status IsAutostartOn(::grpc::ServerContext *, ::google::protobuf::Empty const*, ::google::protobuf::BoolValue *response) override; grpc::Status SetIsBetaEnabled(::grpc::ServerContext *, ::google::protobuf::BoolValue const *request, ::google::protobuf::Empty *) override; grpc::Status IsBetaEnabled(::grpc::ServerContext *, ::google::protobuf::Empty const*, ::google::protobuf::BoolValue *response) override; + grpc::Status SetIsAllMailVisible(::grpc::ServerContext *context, ::google::protobuf::BoolValue const *request, ::google::protobuf::Empty *response) override; + grpc::Status IsAllMailVisible(::grpc::ServerContext *context, ::google::protobuf::Empty const *request, ::google::protobuf::BoolValue *response) override; grpc::Status GoOs(::grpc::ServerContext *, ::google::protobuf::Empty const*, ::google::protobuf::StringValue *response) override; grpc::Status TriggerReset(::grpc::ServerContext *, ::google::protobuf::Empty const*, ::google::protobuf::Empty *) override; grpc::Status Version(::grpc::ServerContext *, ::google::protobuf::Empty const*, ::google::protobuf::StringValue *response) override; diff --git a/internal/frontend/bridge-gui/bridge-gui-tester/Tabs/SettingsTab.cpp b/internal/frontend/bridge-gui/bridge-gui-tester/Tabs/SettingsTab.cpp index 355aef28..6d381434 100644 --- a/internal/frontend/bridge-gui/bridge-gui-tester/Tabs/SettingsTab.cpp +++ b/internal/frontend/bridge-gui/bridge-gui-tester/Tabs/SettingsTab.cpp @@ -199,6 +199,24 @@ void SettingsTab::setIsBetaEnabled(bool enabled) } +//**************************************************************************************************************************************************** +/// \return true if the 'All Mail Visible' check box is checked. +//**************************************************************************************************************************************************** +bool SettingsTab::isAllMailVisible() const +{ + return ui_.checkAllMailVisible->isChecked(); +} + + +//**************************************************************************************************************************************************** +/// \param[in] visible The new value for the 'All Mail Visible' check box. +//**************************************************************************************************************************************************** +void SettingsTab::setIsAllMailVisible(bool visible) +{ + ui_.checkAllMailVisible->setChecked(visible); +} + + //**************************************************************************************************************************************************** /// \return The delay to apply before sending automatically generated events. //**************************************************************************************************************************************************** @@ -447,6 +465,7 @@ void SettingsTab::resetUI() ui_.checkIsFirstGUIStart->setChecked(false); ui_.checkAutostart->setChecked(true); ui_.checkBetaEnabled->setChecked(true); + ui_.checkAllMailVisible->setChecked(true); ui_.checkDarkTheme->setChecked(false); QString const tmpDir = QStandardPaths::writableLocation(QStandardPaths::TempLocation); diff --git a/internal/frontend/bridge-gui/bridge-gui-tester/Tabs/SettingsTab.h b/internal/frontend/bridge-gui/bridge-gui-tester/Tabs/SettingsTab.h index 66f453f5..c5474192 100644 --- a/internal/frontend/bridge-gui/bridge-gui-tester/Tabs/SettingsTab.h +++ b/internal/frontend/bridge-gui/bridge-gui-tester/Tabs/SettingsTab.h @@ -46,6 +46,7 @@ public: // member functions. bool isFirstGUIStart() const; ///< Get the value for the 'Is First GUI Start' check. bool isAutostartOn() const; ///< Get the value for the 'Autostart' check. bool isBetaEnabled() const; ///< Get the value for the 'Beta Enabled' check. + bool isAllMailVisible() const; ///< Get the value for the 'All Mail Visible' check. QString colorSchemeName() const; ///< Get the value of the 'Use Dark Theme' checkbox. qint32 eventDelayMs() const; ///< Get the delay for sending automatically generated events. QString logsPath() const; ///< Get the content of the 'Logs Path' edit. @@ -70,9 +71,10 @@ public: // slots void updateGUIState(); ///< Update the GUI state. void setIsStreaming(bool isStreaming); ///< Set the isStreamingEvents value. void setClientPlatform(QString const &clientPlatform); ///< Set the client platform. - void setIsAutostartOn(bool on); ///< Set the value for the 'Autostart' check. - void setIsBetaEnabled(bool enabled); ///< Get the value for the 'Beta Enabled' check. - void setColorSchemeName(QString const &name); ///< Set the value for the 'Use Dark Theme' checkbox. + void setIsAutostartOn(bool on); ///< Set the value for the 'Autostart' check box. + void setIsBetaEnabled(bool enabled); ///< Set the value for the 'Beta Enabled' check box. + void setIsAllMailVisible(bool visible); ///< Set the value for the 'All Mail Visible' check box. + void setColorSchemeName(QString const &name); ///< Set the value for the 'Use Dark Theme' check box. void setBugReport(QString const &osType, QString const &osVersion, QString const &emailClient, QString const &address, QString const &description, bool includeLogs); ///< Set the content of the bug report box. void changePorts(qint32 imapPort, qint32 smtpPort); ///< Change the IMAP and SMTP ports. diff --git a/internal/frontend/bridge-gui/bridge-gui-tester/Tabs/SettingsTab.ui b/internal/frontend/bridge-gui/bridge-gui-tester/Tabs/SettingsTab.ui index da433ac4..d67c0671 100644 --- a/internal/frontend/bridge-gui/bridge-gui-tester/Tabs/SettingsTab.ui +++ b/internal/frontend/bridge-gui/bridge-gui-tester/Tabs/SettingsTab.ui @@ -153,7 +153,14 @@ - + + + + Automatic Update + + + + Dark Theme @@ -163,10 +170,13 @@ - - + + - Automatic Update + Show 'All Mail' + + + false @@ -814,25 +824,42 @@ + editVersion + comboOS + editCurrentEmailClient checkShowOnStartup checkShowSplashScreen checkIsFirstGUIStart checkAutostart checkBetaEnabled + checkAllMailVisible checkDarkTheme - editVersion - comboOS - editCurrentEmailClient - editOSType - editOSVersion - editEmailClient - editAddress - editDescription + checkAutomaticUpdate + editHostname + spinPortIMAP + spinPortSMTP + checkUseSSLForSMTP + checkDoHEnabled editLogsPath editLicensePath editReleaseNotesLink editDependencyLicenseLink editLandingPageLink + checkCacheOnDiskEnabled + editDiskCachePath + editOSType + editOSVersion + editEmailClient + editAddress + editDescription + spinEventDelay + buttonInternetOff + buttonInternetOn + buttonShowMainWindow + checkIsPortFree + checkNextCacheChangeWillSucceed + comboCacheError + checkNextBugReportWillSucceed