mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-25 06:25:56 +03:00
Sync activities notifications are never shown unless there is an error. Server activities and notifications are off by default.
Signed-off-by: Camila San <hello@camila.codes>
This commit is contained in:
parent
32e29fb849
commit
1a0edc1cd0
6 changed files with 11 additions and 61 deletions
|
@ -408,12 +408,9 @@ void Folder::createGuiLog(const QString &filename, LogStatus status, int count,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigFile cfg;
|
|
||||||
if (!text.isEmpty()) {
|
if (!text.isEmpty()) {
|
||||||
// Ignores the settings in case of an error or conflict
|
// Ignores the settings in case of an error or conflict
|
||||||
if(cfg.optionalClientSyncActivities() ||
|
if(status == LogStatusError || status == LogStatusConflict)
|
||||||
status == LogStatusError ||
|
|
||||||
status == LogStatusConflict)
|
|
||||||
logger->postOptionalGuiLog(tr("Sync Activity"), text);
|
logger->postOptionalGuiLog(tr("Sync Activity"), text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,10 +50,6 @@ GeneralSettings::GeneralSettings(QWidget *parent)
|
||||||
this, &GeneralSettings::slotToggleOptionalServerActivities);
|
this, &GeneralSettings::slotToggleOptionalServerActivities);
|
||||||
_ui->serverActivitiesCheckBox->setToolTip(tr("Activity feed from the server."));
|
_ui->serverActivitiesCheckBox->setToolTip(tr("Activity feed from the server."));
|
||||||
|
|
||||||
connect(_ui->clientSyncActivitiesCheckBox, &QAbstractButton::toggled,
|
|
||||||
this, &GeneralSettings::slotToggleOptionalClientSyncActivities);
|
|
||||||
_ui->clientSyncActivitiesCheckBox->setToolTip(tr("Client sync activity."));
|
|
||||||
|
|
||||||
connect(_ui->showInExplorerNavigationPaneCheckBox, &QAbstractButton::toggled, this, &GeneralSettings::slotShowInExplorerNavigationPane);
|
connect(_ui->showInExplorerNavigationPaneCheckBox, &QAbstractButton::toggled, this, &GeneralSettings::slotShowInExplorerNavigationPane);
|
||||||
|
|
||||||
_ui->autostartCheckBox->setChecked(Utility::hasLaunchOnStartup(Theme::instance()->appName()));
|
_ui->autostartCheckBox->setChecked(Utility::hasLaunchOnStartup(Theme::instance()->appName()));
|
||||||
|
@ -126,7 +122,6 @@ void GeneralSettings::loadMiscSettings()
|
||||||
_ui->monoIconsCheckBox->setChecked(cfgFile.monoIcons());
|
_ui->monoIconsCheckBox->setChecked(cfgFile.monoIcons());
|
||||||
_ui->serverNotificationsCheckBox->setChecked(cfgFile.optionalServerNotifications());
|
_ui->serverNotificationsCheckBox->setChecked(cfgFile.optionalServerNotifications());
|
||||||
_ui->serverActivitiesCheckBox->setChecked(cfgFile.optionalServerActivities());
|
_ui->serverActivitiesCheckBox->setChecked(cfgFile.optionalServerActivities());
|
||||||
_ui->clientSyncActivitiesCheckBox->setChecked(cfgFile.optionalClientSyncActivities());
|
|
||||||
_ui->showInExplorerNavigationPaneCheckBox->setChecked(cfgFile.showInExplorerNavigationPane());
|
_ui->showInExplorerNavigationPaneCheckBox->setChecked(cfgFile.showInExplorerNavigationPane());
|
||||||
_ui->crashreporterCheckBox->setChecked(cfgFile.crashReporter());
|
_ui->crashreporterCheckBox->setChecked(cfgFile.crashReporter());
|
||||||
auto newFolderLimit = cfgFile.newBigFolderSizeLimit();
|
auto newFolderLimit = cfgFile.newBigFolderSizeLimit();
|
||||||
|
@ -189,14 +184,6 @@ void GeneralSettings::slotToggleOptionalServerActivities(bool enable)
|
||||||
cfgFile.setOptionalServerActivities(enable);
|
cfgFile.setOptionalServerActivities(enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GeneralSettings::slotToggleOptionalClientSyncActivities(bool enable)
|
|
||||||
{
|
|
||||||
ConfigFile cfgFile;
|
|
||||||
cfgFile.setOptionalClientSyncActivities(enable);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void GeneralSettings::slotShowInExplorerNavigationPane(bool checked)
|
void GeneralSettings::slotShowInExplorerNavigationPane(bool checked)
|
||||||
{
|
{
|
||||||
ConfigFile cfgFile;
|
ConfigFile cfgFile;
|
||||||
|
|
|
@ -44,7 +44,6 @@ private slots:
|
||||||
void slotToggleLaunchOnStartup(bool);
|
void slotToggleLaunchOnStartup(bool);
|
||||||
void slotToggleOptionalServerNotifications(bool);
|
void slotToggleOptionalServerNotifications(bool);
|
||||||
void slotToggleOptionalServerActivities(bool);
|
void slotToggleOptionalServerActivities(bool);
|
||||||
void slotToggleOptionalClientSyncActivities(bool);
|
|
||||||
void slotShowInExplorerNavigationPane(bool);
|
void slotShowInExplorerNavigationPane(bool);
|
||||||
void slotUpdateInfo();
|
void slotUpdateInfo();
|
||||||
void slotIgnoreFilesEditor();
|
void slotIgnoreFilesEditor();
|
||||||
|
|
|
@ -20,10 +20,13 @@
|
||||||
<string>General Settings</string>
|
<string>General Settings</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<item row="1" column="1">
|
<item row="1" column="0">
|
||||||
<widget class="QCheckBox" name="serverActivitiesCheckBox">
|
<widget class="QCheckBox" name="monoIconsCheckBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>For System Tray</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Show Server &Activities</string>
|
<string>Use &Monochrome Icons</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -41,29 +44,10 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="1">
|
||||||
<widget class="QCheckBox" name="monoIconsCheckBox">
|
<widget class="QCheckBox" name="serverActivitiesCheckBox">
|
||||||
<property name="toolTip">
|
|
||||||
<string>For System Tray</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Use &Monochrome Icons</string>
|
<string>Show Server &Activities</string>
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QCheckBox" name="clientSyncActivitiesCheckBox">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="toolTipDuration">
|
|
||||||
<number>-1</number>
|
|
||||||
</property>
|
|
||||||
<property name="whatsThis">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Show &Client Sync Activities</string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -55,7 +55,6 @@ static const char promptDeleteC[] = "promptDeleteAllFiles";
|
||||||
static const char crashReporterC[] = "crashReporter";
|
static const char crashReporterC[] = "crashReporter";
|
||||||
static const char optionalServerNotificationsC[] = "optionalServerNotifications";
|
static const char optionalServerNotificationsC[] = "optionalServerNotifications";
|
||||||
static const char optionalServerActivitiesC[] = "optionalServerActivities";
|
static const char optionalServerActivitiesC[] = "optionalServerActivities";
|
||||||
static const char optionalClientSyncActivitiesC[] = "optionalClientSyncActivities";
|
|
||||||
static const char showInExplorerNavigationPaneC[] = "showInExplorerNavigationPane";
|
static const char showInExplorerNavigationPaneC[] = "showInExplorerNavigationPane";
|
||||||
static const char skipUpdateCheckC[] = "skipUpdateCheck";
|
static const char skipUpdateCheckC[] = "skipUpdateCheck";
|
||||||
static const char updateCheckIntervalC[] = "updateCheckInterval";
|
static const char updateCheckIntervalC[] = "updateCheckInterval";
|
||||||
|
@ -126,7 +125,7 @@ bool ConfigFile::setConfDir(const QString &value)
|
||||||
bool ConfigFile::optionalServerNotifications() const
|
bool ConfigFile::optionalServerNotifications() const
|
||||||
{
|
{
|
||||||
QSettings settings(configFile(), QSettings::IniFormat);
|
QSettings settings(configFile(), QSettings::IniFormat);
|
||||||
return settings.value(QLatin1String(optionalServerNotificationsC), true).toBool();
|
return settings.value(QLatin1String(optionalServerNotificationsC), false).toBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ConfigFile::optionalServerActivities() const
|
bool ConfigFile::optionalServerActivities() const
|
||||||
|
@ -135,12 +134,6 @@ bool ConfigFile::optionalServerActivities() const
|
||||||
return settings.value(QLatin1String(optionalServerActivitiesC), false).toBool();
|
return settings.value(QLatin1String(optionalServerActivitiesC), false).toBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ConfigFile::optionalClientSyncActivities() const
|
|
||||||
{
|
|
||||||
QSettings settings(configFile(), QSettings::IniFormat);
|
|
||||||
return settings.value(QLatin1String(optionalClientSyncActivitiesC), false).toBool();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ConfigFile::showInExplorerNavigationPane() const
|
bool ConfigFile::showInExplorerNavigationPane() const
|
||||||
{
|
{
|
||||||
const bool defaultValue =
|
const bool defaultValue =
|
||||||
|
@ -205,13 +198,6 @@ void ConfigFile::setOptionalServerActivities(bool show)
|
||||||
settings.sync();
|
settings.sync();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigFile::setOptionalClientSyncActivities(bool show)
|
|
||||||
{
|
|
||||||
QSettings settings(configFile(), QSettings::IniFormat);
|
|
||||||
settings.setValue(QLatin1String(optionalClientSyncActivitiesC), show);
|
|
||||||
settings.sync();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ConfigFile::saveGeometry(QWidget *w)
|
void ConfigFile::saveGeometry(QWidget *w)
|
||||||
{
|
{
|
||||||
#ifndef TOKEN_AUTH_ONLY
|
#ifndef TOKEN_AUTH_ONLY
|
||||||
|
|
|
@ -126,9 +126,6 @@ public:
|
||||||
bool optionalServerActivities() const;
|
bool optionalServerActivities() const;
|
||||||
void setOptionalServerActivities(bool show);
|
void setOptionalServerActivities(bool show);
|
||||||
|
|
||||||
bool optionalClientSyncActivities() const;
|
|
||||||
void setOptionalClientSyncActivities(bool show);
|
|
||||||
|
|
||||||
bool showInExplorerNavigationPane() const;
|
bool showInExplorerNavigationPane() const;
|
||||||
void setShowInExplorerNavigationPane(bool show);
|
void setShowInExplorerNavigationPane(bool show);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue