From: Claudio Cambra Date: Wed, 17 Jul 2024 09:33:01 +0000 (+0800) Subject: Append macOS vfs environment state strings to tray message when computing sync status X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~6^2~97^2~10 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d2b569157ef646166308c47be4370131f9737a5f;p=nextcloud-desktop.git Append macOS vfs environment state strings to tray message when computing sync status Signed-off-by: Claudio Cambra --- diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp index bb5e68aab..7fcd29f49 100644 --- a/src/gui/owncloudgui.cpp +++ b/src/gui/owncloudgui.cpp @@ -379,19 +379,29 @@ void ownCloudGui::slotComputeOverallSyncStatus() _tray->setIcon(statusIcon); // create the tray blob message, check if we have an defined state +#ifdef BUILD_FILE_PROVIDER_MODULE + if (!map.isEmpty() || !syncingFileProviderAccounts.isEmpty()) { +#else if (map.count() > 0) { +#endif #ifdef Q_OS_WIN // Windows has a 128-char tray tooltip length limit. trayMessage = folderMan->trayTooltipStatusString(overallStatus, hasUnresolvedConflicts, false); #else QStringList allStatusStrings; - foreach (Folder *folder, map.values()) { + const auto folders = map.values(); + for (const auto folder : folders) { QString folderMessage = FolderMan::trayTooltipStatusString( folder->syncResult().status(), folder->syncResult().hasUnresolvedConflicts(), folder->syncPaused()); allStatusStrings += tr("Folder %1: %2").arg(folder->shortGuiLocalPath(), folderMessage); } +#ifdef BUILD_FILE_PROVIDER_MODULE + for (const auto &accountId : syncingFileProviderAccounts) { + allStatusStrings += tr("macOS VFS for %1: Syncing").arg(accountId); + } +#endif trayMessage = allStatusStrings.join(QLatin1String("\n")); #endif _tray->setToolTip(trayMessage);