refactor: use Settings::Gui::ShownFirstConnectionMessage to control message popup on initial connection a to client / server
This commit is contained in:
parent
b4e4277e08
commit
8e8ab25fd0
3 changed files with 6 additions and 2 deletions
|
|
@ -104,6 +104,7 @@ This section contains options used by the GUI it will begin with `[gui]`
|
||||||
| symbolicTrayIcon | `true` or `false` | When true use the monocolor (symbolic) icon false uses a colorful icon for the tray [default: true] |
|
| symbolicTrayIcon | `true` or `false` | When true use the monocolor (symbolic) icon false uses a colorful icon for the tray [default: true] |
|
||||||
| windowGeometry | QRect | Geometry of the window used to restore the window geometry after exiting the app |
|
| windowGeometry | QRect | Geometry of the window used to restore the window geometry after exiting the app |
|
||||||
| showGenericClientFailureDialog | `true` or `false` | When `true` client connection errors will not show popup error messages [default: true] |
|
| showGenericClientFailureDialog | `true` or `false` | When `true` client connection errors will not show popup error messages [default: true] |
|
||||||
|
| shownFirstConnectedMessage | `true` or `false` | When `true` GUI has shown the user the message for connecting the first time [default: false] |
|
||||||
|
|
||||||
### Log
|
### Log
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,7 @@ public:
|
||||||
inline static const auto SymbolicTrayIcon = QStringLiteral("gui/symbolicTrayIcon");
|
inline static const auto SymbolicTrayIcon = QStringLiteral("gui/symbolicTrayIcon");
|
||||||
inline static const auto WindowGeometry = QStringLiteral("gui/windowGeometry");
|
inline static const auto WindowGeometry = QStringLiteral("gui/windowGeometry");
|
||||||
inline static const auto ShowGenericClientFailureDialog = QStringLiteral("gui/showGenericClientFailureDialog");
|
inline static const auto ShowGenericClientFailureDialog = QStringLiteral("gui/showGenericClientFailureDialog");
|
||||||
|
inline static const auto ShownFirstConnectedMessage = QStringLiteral("gui/shownFirstConnectedMessage");
|
||||||
};
|
};
|
||||||
struct Log
|
struct Log
|
||||||
{
|
{
|
||||||
|
|
@ -211,6 +212,7 @@ private:
|
||||||
, Settings::Gui::SymbolicTrayIcon
|
, Settings::Gui::SymbolicTrayIcon
|
||||||
, Settings::Gui::WindowGeometry
|
, Settings::Gui::WindowGeometry
|
||||||
, Settings::Gui::ShowGenericClientFailureDialog
|
, Settings::Gui::ShowGenericClientFailureDialog
|
||||||
|
, Settings::Gui::ShownFirstConnectedMessage
|
||||||
, Settings::Security::Certificate
|
, Settings::Security::Certificate
|
||||||
, Settings::Security::CheckPeers
|
, Settings::Security::CheckPeers
|
||||||
, Settings::Security::KeySize
|
, Settings::Security::KeySize
|
||||||
|
|
@ -222,6 +224,7 @@ private:
|
||||||
// When checking the default values this list contains the ones that default to false.
|
// When checking the default values this list contains the ones that default to false.
|
||||||
inline static const QStringList m_defaultFalseValues = {
|
inline static const QStringList m_defaultFalseValues = {
|
||||||
Settings::Gui::Autohide
|
Settings::Gui::Autohide
|
||||||
|
, Settings::Gui::ShownFirstConnectedMessage
|
||||||
, Settings::Core::StartedBefore
|
, Settings::Core::StartedBefore
|
||||||
, Settings::Core::PreventSleep
|
, Settings::Core::PreventSleep
|
||||||
, Settings::Core::UseWlClipboard
|
, Settings::Core::UseWlClipboard
|
||||||
|
|
|
||||||
|
|
@ -881,9 +881,9 @@ void MainWindow::closeEvent(QCloseEvent *event)
|
||||||
|
|
||||||
void MainWindow::showFirstConnectedMessage()
|
void MainWindow::showFirstConnectedMessage()
|
||||||
{
|
{
|
||||||
if (Settings::value(Settings::Core::StartedBefore).toBool())
|
if (Settings::value(Settings::Gui::ShownFirstConnectedMessage).toBool())
|
||||||
return;
|
return;
|
||||||
Settings::setValue(Settings::Core::StartedBefore, true);
|
Settings::setValue(Settings::Gui::ShownFirstConnectedMessage, true);
|
||||||
|
|
||||||
const auto isServer = m_coreProcess.mode() == CoreMode::Server;
|
const auto isServer = m_coreProcess.mode() == CoreMode::Server;
|
||||||
const auto closeToTray = Settings::value(Settings::Gui::CloseToTray).toBool();
|
const auto closeToTray = Settings::value(Settings::Gui::CloseToTray).toBool();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue