forked from Silverfish/proton-bridge
Other: added 'All Mail Visible' toggle in bridge-gui-tester.
This commit is contained in:
@ -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.
|
||||
//****************************************************************************************************************************************************
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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,8 +71,9 @@ 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 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.
|
||||
|
||||
@ -153,7 +153,14 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<item row="2" column="1">
|
||||
<widget class="QCheckBox" name="checkAutomaticUpdate">
|
||||
<property name="text">
|
||||
<string>Automatic Update</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="checkDarkTheme">
|
||||
<property name="text">
|
||||
<string>Dark Theme</string>
|
||||
@ -163,10 +170,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="checkAutomaticUpdate">
|
||||
<item row="1" column="2">
|
||||
<widget class="QCheckBox" name="checkAllMailVisible">
|
||||
<property name="text">
|
||||
<string>Automatic Update</string>
|
||||
<string>Show 'All Mail'</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -814,25 +824,42 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>editVersion</tabstop>
|
||||
<tabstop>comboOS</tabstop>
|
||||
<tabstop>editCurrentEmailClient</tabstop>
|
||||
<tabstop>checkShowOnStartup</tabstop>
|
||||
<tabstop>checkShowSplashScreen</tabstop>
|
||||
<tabstop>checkIsFirstGUIStart</tabstop>
|
||||
<tabstop>checkAutostart</tabstop>
|
||||
<tabstop>checkBetaEnabled</tabstop>
|
||||
<tabstop>checkAllMailVisible</tabstop>
|
||||
<tabstop>checkDarkTheme</tabstop>
|
||||
<tabstop>editVersion</tabstop>
|
||||
<tabstop>comboOS</tabstop>
|
||||
<tabstop>editCurrentEmailClient</tabstop>
|
||||
<tabstop>editOSType</tabstop>
|
||||
<tabstop>editOSVersion</tabstop>
|
||||
<tabstop>editEmailClient</tabstop>
|
||||
<tabstop>editAddress</tabstop>
|
||||
<tabstop>editDescription</tabstop>
|
||||
<tabstop>checkAutomaticUpdate</tabstop>
|
||||
<tabstop>editHostname</tabstop>
|
||||
<tabstop>spinPortIMAP</tabstop>
|
||||
<tabstop>spinPortSMTP</tabstop>
|
||||
<tabstop>checkUseSSLForSMTP</tabstop>
|
||||
<tabstop>checkDoHEnabled</tabstop>
|
||||
<tabstop>editLogsPath</tabstop>
|
||||
<tabstop>editLicensePath</tabstop>
|
||||
<tabstop>editReleaseNotesLink</tabstop>
|
||||
<tabstop>editDependencyLicenseLink</tabstop>
|
||||
<tabstop>editLandingPageLink</tabstop>
|
||||
<tabstop>checkCacheOnDiskEnabled</tabstop>
|
||||
<tabstop>editDiskCachePath</tabstop>
|
||||
<tabstop>editOSType</tabstop>
|
||||
<tabstop>editOSVersion</tabstop>
|
||||
<tabstop>editEmailClient</tabstop>
|
||||
<tabstop>editAddress</tabstop>
|
||||
<tabstop>editDescription</tabstop>
|
||||
<tabstop>spinEventDelay</tabstop>
|
||||
<tabstop>buttonInternetOff</tabstop>
|
||||
<tabstop>buttonInternetOn</tabstop>
|
||||
<tabstop>buttonShowMainWindow</tabstop>
|
||||
<tabstop>checkIsPortFree</tabstop>
|
||||
<tabstop>checkNextCacheChangeWillSucceed</tabstop>
|
||||
<tabstop>comboCacheError</tabstop>
|
||||
<tabstop>checkNextBugReportWillSucceed</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
Reference in New Issue
Block a user