Skip to content

Commit a68a21b

Browse files
committed
Merge #362 [stable-3.16] nmc/2025/2352-Windows_Related_Changes
2 parents 9aa6f9c + 24c2093 commit a68a21b

3 files changed

Lines changed: 15 additions & 13 deletions

File tree

src/gui/accountsettings.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -722,10 +722,6 @@ void AccountSettings::slotCustomContextMenuRequested(const QPoint &pos)
722722

723723
ac = availabilityMenu->addAction(Utility::vfsFreeSpaceActionText());
724724
connect(ac, &QAction::triggered, this, [this]() { slotSetCurrentFolderAvailability(PinState::OnlineOnly); });
725-
726-
ac = menu->addAction(tr("Disable virtual file support …"));
727-
connect(ac, &QAction::triggered, this, &AccountSettings::slotDisableVfsCurrentFolder);
728-
ac->setDisabled(Theme::instance()->enforceVirtualFilesSyncFolder());
729725
}
730726

731727
menu->setStyleSheet(R"(

src/gui/navigationpanehelper.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,7 @@ void NavigationPaneHelper::updateCloudStorageRegistry()
100100
const QString namespacePath = QString() % R"(Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\)" % clsidStr;
101101

102102
auto title = folder->shortGuiRemotePathOrAppName();
103-
// Write the account name in the sidebar only when using more than one account.
104-
if (AccountManager::instance()->accounts().size() > 1) {
105-
title = title % " - " % folder->accountState()->account()->prettyName();
106-
}
103+
107104
const auto iconPath = QDir::toNativeSeparators(qApp->applicationFilePath());
108105
const auto targetFolderPath = QDir::toNativeSeparators(folder->cleanPath());
109106

src/gui/socketapi/socketapi.cpp

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
#endif
4646

4747
#include <array>
48+
#include <memory>
4849
#include <QBitArray>
4950
#include <QUrl>
5051
#include <QMetaMethod>
@@ -60,7 +61,6 @@
6061
#include <QInputDialog>
6162
#include <QFileDialog>
6263

63-
6464
#include <QAction>
6565
#include <QJsonArray>
6666
#include <QJsonDocument>
@@ -574,10 +574,19 @@ void SocketApi::processEncryptRequest(const QString &localFile)
574574
);
575575
Q_UNUSED(ret)
576576
} else {
577-
const int ret = QMessageBox::information(nullptr,
578-
tr("Folder encrypted successfully").arg(fileData.folderRelativePath),
579-
tr("The following folder was encrypted successfully: \"%1\"").arg(fileData.folderRelativePath));
580-
Q_UNUSED(ret)
577+
// NMC customization
578+
auto messageBox = std::make_unique<QMessageBox>();
579+
messageBox->setAttribute(Qt::WA_DeleteOnClose);
580+
messageBox->setWindowTitle(tr("Folder encrypted successfully"));
581+
messageBox->setText(tr("The following folder was encrypted successfully: \"%1\"").arg(fileData.folderRelativePath));
582+
583+
const QIcon avatarIcon = QIcon::fromTheme("iconPath", QIcon(":/client/theme/lock.svg"));
584+
QPixmap pixmap = avatarIcon.pixmap(QSize(24, 24));
585+
messageBox->setIconPixmap(pixmap);
586+
587+
// Set default button (prevents empty UI)
588+
messageBox->addButton(QMessageBox::Ok);
589+
messageBox->show();
581590
}
582591
});
583592
job->setProperty(encryptJobPropertyFolder, QVariant::fromValue(folder));

0 commit comments

Comments
 (0)