mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Settings option to shush success KeeShare notifications (#3236)
This commit is contained in:
parent
16a11c3a7f
commit
54eafc8ebe
@ -100,6 +100,10 @@ ApplicationSettingsWidget::ApplicationSettingsWidget(QWidget* parent)
|
||||
m_generalUi->checkUpdatesSpacer->changeSize(0, 0, QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
#endif
|
||||
|
||||
#ifndef WITH_XC_KEESHARE
|
||||
m_generalUi->quietKeeShareSuccess->setVisible(false);
|
||||
#endif
|
||||
|
||||
#ifndef WITH_XC_NETWORKING
|
||||
m_secUi->privacy->setVisible(false);
|
||||
#endif
|
||||
@ -182,6 +186,7 @@ void ApplicationSettingsWidget::loadSettings()
|
||||
m_generalUi->systrayDarkIconCheckBox->setChecked(config()->get("GUI/DarkTrayIcon").toBool());
|
||||
m_generalUi->systrayMinimizeToTrayCheckBox->setChecked(config()->get("GUI/MinimizeToTray").toBool());
|
||||
m_generalUi->minimizeOnCloseCheckBox->setChecked(config()->get("GUI/MinimizeOnClose").toBool());
|
||||
m_generalUi->quietKeeShareSuccess->setChecked(config()->get("GUI/QuietKeeShareSuccess").toBool());
|
||||
m_generalUi->systrayMinimizeOnStartup->setChecked(config()->get("GUI/MinimizeOnStartup").toBool());
|
||||
m_generalUi->checkForUpdatesOnStartupCheckBox->setChecked(config()->get("GUI/CheckForUpdates").toBool());
|
||||
m_generalUi->checkForUpdatesIncludeBetasCheckBox->setChecked(
|
||||
@ -267,6 +272,7 @@ void ApplicationSettingsWidget::saveSettings()
|
||||
config()->set("GUI/DarkTrayIcon", m_generalUi->systrayDarkIconCheckBox->isChecked());
|
||||
config()->set("GUI/MinimizeToTray", m_generalUi->systrayMinimizeToTrayCheckBox->isChecked());
|
||||
config()->set("GUI/MinimizeOnClose", m_generalUi->minimizeOnCloseCheckBox->isChecked());
|
||||
config()->set("GUI/QuietKeeShareSuccess", m_generalUi->quietKeeShareSuccess->isChecked());
|
||||
config()->set("GUI/MinimizeOnStartup", m_generalUi->systrayMinimizeOnStartup->isChecked());
|
||||
config()->set("GUI/CheckForUpdates", m_generalUi->checkForUpdatesOnStartupCheckBox->isChecked());
|
||||
config()->set("GUI/CheckForUpdatesIncludeBetas", m_generalUi->checkForUpdatesIncludeBetasCheckBox->isChecked());
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>684</width>
|
||||
<height>881</height>
|
||||
<height>1030</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
@ -382,6 +382,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="quietKeeShareSuccess">
|
||||
<property name="text">
|
||||
<string>Do not show success notifications for KeeShare, only warnings and errors</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="systrayShowCheckBox">
|
||||
<property name="text">
|
||||
|
@ -261,18 +261,22 @@ void ShareObserver::reinitialize()
|
||||
|
||||
void ShareObserver::notifyAbout(const QStringList& success, const QStringList& warning, const QStringList& error)
|
||||
{
|
||||
if (error.isEmpty() && warning.isEmpty() && success.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
QStringList messages;
|
||||
MessageWidget::MessageType type = MessageWidget::Positive;
|
||||
if (!(success.isEmpty() || config()->get("GUI/QuietKeeShareSuccess").toBool())) {
|
||||
messages += success;
|
||||
}
|
||||
if (!warning.isEmpty()) {
|
||||
type = MessageWidget::Warning;
|
||||
messages += warning;
|
||||
}
|
||||
if (!error.isEmpty()) {
|
||||
type = MessageWidget::Error;
|
||||
messages += error;
|
||||
}
|
||||
if (!messages.isEmpty()) {
|
||||
emit sharingMessage(messages.join("\n"), type);
|
||||
}
|
||||
emit sharingMessage((success + warning + error).join("\n"), type);
|
||||
}
|
||||
|
||||
void ShareObserver::handleDatabaseChanged()
|
||||
|
Loading…
Reference in New Issue
Block a user