Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/gui/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,9 @@ Application::Application(int &argc, char **argv)
}

#if WITH_LIBCLOUDPROVIDERS
_gui->setupCloudProviders();
if (ConfigFile().showCloudProvidersInFileManager()) {
_gui->setupCloudProviders();
}
#endif

if (_theme->doNotUseProxy()) {
Expand Down
14 changes: 14 additions & 0 deletions src/gui/generalsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ GeneralSettings::GeneralSettings(QWidget *parent)

connect(_ui->showInExplorerNavigationPaneCheckBox, &QAbstractButton::toggled, this, &GeneralSettings::slotShowInExplorerNavigationPane);

connect(_ui->showCloudProvidersCheckBox, &QAbstractButton::toggled, this, &GeneralSettings::slotToggleCloudProviders);

// Rename 'Explorer' appropriately on non-Windows
#ifdef Q_OS_MACOS
QString txt = _ui->showInExplorerNavigationPaneCheckBox->text();
Expand Down Expand Up @@ -281,6 +283,11 @@ GeneralSettings::GeneralSettings(QWidget *parent)
_ui->showInExplorerNavigationPaneCheckBox->setVisible(false);
#endif

// Hide CloudProviders checkbox on non-Linux platforms
#ifndef Q_OS_LINUX
_ui->showCloudProvidersCheckBox->setVisible(false);
#endif

/* Set the left contents margin of the layout to zero to make the checkboxes
* align properly vertically , fixes bug #3758
*/
Expand Down Expand Up @@ -335,6 +342,7 @@ void GeneralSettings::loadMiscSettings()
_ui->quotaWarningNotificationsCheckBox->setEnabled(cfgFile.optionalServerNotifications());
_ui->quotaWarningNotificationsCheckBox->setChecked(cfgFile.showQuotaWarningNotifications());
_ui->showInExplorerNavigationPaneCheckBox->setChecked(cfgFile.showInExplorerNavigationPane());
_ui->showCloudProvidersCheckBox->setChecked(cfgFile.showCloudProvidersInFileManager());
_ui->newExternalStorage->setChecked(cfgFile.confirmExternalStorage());
_ui->monoIconsCheckBox->setChecked(cfgFile.monoIcons());
_ui->moveFilesToTrashCheckBox->setChecked(cfgFile.moveToTrash());
Expand Down Expand Up @@ -648,6 +656,12 @@ void GeneralSettings::slotShowInExplorerNavigationPane(bool checked)
#endif
}

void GeneralSettings::slotToggleCloudProviders(bool checked)
{
ConfigFile cfgFile;
cfgFile.setShowCloudProvidersInFileManager(checked);
Copy link
Member

@camilasan camilasan Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beyond changing the config file, you need to call here ownCloudGui::setupCloudProviders (I could be wrong, maybe another function), so the change will take effect without restarting the client.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks I'll look into it tomorrow

}

void GeneralSettings::slotIgnoreFilesEditor()
{
if (_ignoreEditor.isNull()) {
Expand Down
1 change: 1 addition & 0 deletions src/gui/generalsettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ private slots:
void slotToggleCallNotifications(bool);
void slotToggleQuotaWarningNotifications(bool);
void slotShowInExplorerNavigationPane(bool);
void slotToggleCloudProviders(bool);
void slotIgnoreFilesEditor();
void slotCreateDebugArchive();
void loadMiscSettings();
Expand Down
10 changes: 10 additions & 0 deletions src/gui/generalsettings.ui
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="showCloudProvidersCheckBox">
<property name="text">
<string>Show synchronized folders in file manager sidebar</string>
</property>
<property name="toolTip">
<string>When enabled, synchronized folders will appear in the file manager's sidebar via CloudProviders (Linux only). Requires application restart.</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
Expand Down
13 changes: 13 additions & 0 deletions src/libsync/configfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,19 @@ void ConfigFile::setShowInExplorerNavigationPane(bool show)
settings.sync();
}

bool ConfigFile::showCloudProvidersInFileManager() const
{
QSettings settings(configFile(), QSettings::IniFormat);
return settings.value(showCloudProvidersInFileManagerC, true).toBool();
}

void ConfigFile::setShowCloudProvidersInFileManager(bool show)
{
QSettings settings(configFile(), QSettings::IniFormat);
settings.setValue(showCloudProvidersInFileManagerC, show);
settings.sync();
}

int ConfigFile::timeout() const
{
QSettings settings(configFile(), QSettings::IniFormat);
Expand Down
4 changes: 4 additions & 0 deletions src/libsync/configfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ class OWNCLOUDSYNC_EXPORT ConfigFile
[[nodiscard]] bool showInExplorerNavigationPane() const;
void setShowInExplorerNavigationPane(bool show);

[[nodiscard]] bool showCloudProvidersInFileManager() const;
void setShowCloudProvidersInFileManager(bool show);

[[nodiscard]] int timeout() const;
[[nodiscard]] qint64 chunkSize() const;
[[nodiscard]] qint64 maxChunkSize() const;
Expand Down Expand Up @@ -296,6 +299,7 @@ class OWNCLOUDSYNC_EXPORT ConfigFile
static constexpr char showQuotaWarningNotificationsC[] = "showQuotaWarningNotifications";
static constexpr char showChatNotificationsC[] = "showChatNotifications";
static constexpr char showInExplorerNavigationPaneC[] = "showInExplorerNavigationPane";
static constexpr char showCloudProvidersInFileManagerC[] = "showCloudProvidersInFileManager";
static constexpr char confirmExternalStorageC[] = "confirmExternalStorage";
static constexpr char useNewBigFolderSizeLimitC[] = "useNewBigFolderSizeLimit";
static constexpr char newBigFolderSizeLimitC[] = "newBigFolderSizeLimit";
Expand Down