Skip to content

Commit

Permalink
Add bool theme option to display legacy import dialog.
Browse files Browse the repository at this point in the history
Signed-off-by: Camila Ayres <[email protected]>
  • Loading branch information
camilasan committed Dec 9, 2024
1 parent d25846b commit e211617
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions NEXTCLOUD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ option( WITH_CRASHREPORTER "Build crashreporter" OFF )
#set( CRASHREPORTER_SUBMIT_URL "https://crash-reports.owncloud.com/submit" CACHE STRING "URL for crash reporter" )
#set( CRASHREPORTER_ICON ":/owncloud-icon.png" )

option( APPLICATION_DISPLAY_LEGACY_IMPORT_DIALOG "Display legacy import dialog" ON )

## Updater options
option( BUILD_UPDATER "Build updater" ON )

Expand Down
1 change: 1 addition & 0 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#cmakedefine01 ENFORCE_VIRTUAL_FILES_SYNC_FOLDER
#cmakedefine DO_NOT_USE_PROXY "@DO_NOT_USE_PROXY@"
#cmakedefine ENFORCE_SINGLE_ACCOUNT "@ENFORCE_SINGLE_ACCOUNT@"
#cmakedefine01 APPLICATION_DISPLAY_LEGACY_IMPORT_DIALOG

#cmakedefine ZLIB_FOUND @ZLIB_FOUND@

Expand Down
9 changes: 9 additions & 0 deletions src/libsync/theme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,15 @@ bool Theme::darkMode() const
return isDarkFromStyle();
}

bool Theme::displayLegacyImportDialog() const
{
#ifdef APPLICATION_DISPLAY_LEGACY_IMPORT_DIALOG
return true;
#else
return false;
#endif
}

void Theme::setOverrideServerUrl(const QString &overrideServerUrl)
{
auto validOverrideServerUrl = overrideServerUrl;
Expand Down
7 changes: 7 additions & 0 deletions src/libsync/theme.h
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,13 @@ class OWNCLOUDSYNC_EXPORT Theme : public QObject
[[nodiscard]] QVariantMap systemPalette() const;
[[nodiscard]] bool darkMode() const;

/**
* Display legacy import dialog
*
* The user will interact with the dialog to import legacy account when set to true
*/
[[nodiscard]] bool displayLegacyImportDialog() const;

public slots:
void setOverrideServerUrl(const QString &overrideServerUrl);
void setForceOverrideServerUrl(bool forceOverride);
Expand Down

0 comments on commit e211617

Please sign in to comment.