This commit is contained in:
DavidXanatos 2023-02-07 21:50:06 +01:00
parent f103741fe3
commit 17ac1af2f3
7 changed files with 22 additions and 9 deletions

View File

@ -10,7 +10,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## [1.7.3 / 5.62.3] - 2023-02-??
### Added
- Run menu now supports fodlers, to be used by entering fodername1\foldername2\entryname in the name column of the UI
- Run menu now supports folders, to be used by entering fodername1\foldername2\entryname in the name column of the UI
- added an try indicator for pending updates
### Changed
- 'OpenProtectedStorage=y' has been replaced with a template

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

View File

@ -144,6 +144,7 @@
<file>Actions/Editor3.png</file>
<file>Actions/Editor2.png</file>
<file>Actions/Folders.png</file>
<file>IconSun.png</file>
</qresource>
<qresource prefix="/Boxes">
<file alias="Empty3">Boxes/sandbox-b-empty.png</file>

View File

@ -1425,13 +1425,16 @@ void CSandMan::timerEvent(QTimerEvent* pEvent)
m_pDisabledForce->setText(m_pDisableForce->isChecked() ? Str1 : QString(Str1.length(), ' '));
}
if (m_bIconEmpty != (ActiveProcesses == 0) || m_bIconBusy != bIconBusy || m_iIconDisabled != (bForceProcessDisabled ? 1 : 0))
bool bUpdatePending = !theConf->GetString("Updater/PendingUpdate").isEmpty();
if (m_bIconEmpty != (ActiveProcesses == 0) || m_bIconBusy != bIconBusy || m_iIconDisabled != (bForceProcessDisabled ? 1 : 0) || bUpdatePending)
{
m_bIconEmpty = (ActiveProcesses == 0);
m_bIconBusy = bIconBusy;
m_iIconDisabled = (bForceProcessDisabled ? 1 : 0);
m_pTrayIcon->setIcon(GetTrayIcon());
m_bIconSun = bUpdatePending ? !m_bIconSun : false;
m_pTrayIcon->setIcon(GetTrayIcon(true, m_bIconSun));
m_pTrayIcon->setToolTip(GetTrayText());
}
}
@ -1932,6 +1935,7 @@ void CSandMan::UpdateState()
m_bIconEmpty = true;
m_iIconDisabled = -1;
m_bIconBusy = false;
m_bIconSun = false;
m_pRunBoxed->setEnabled(isConnected);
m_pNewBox->setEnabled(isConnected);
@ -3017,7 +3021,7 @@ QString CSandMan::FormatError(const SB_STATUS& Error)
return Message;
}
void CSandMan::CheckResults(QList<SB_STATUS> Results)
void CSandMan::CheckResults(QList<SB_STATUS> Results, bool bAsync)
{
QStringList Errors;
for (QList<SB_STATUS>::iterator I = Results.begin(); I != Results.end(); ++I) {
@ -3025,7 +3029,11 @@ void CSandMan::CheckResults(QList<SB_STATUS> Results)
Errors.append(FormatError(*I));
}
if (Errors.count() == 1)
if (bAsync) {
foreach(const QString &Error, Errors)
theGUI->OnLogMessage(Error, true);
}
else if (Errors.count() == 1)
QMessageBox::warning(theGUI, tr("Sandboxie-Plus - Error"), Errors.first());
else if (Errors.count() > 1) {
CMultiErrorDialog Dialog(tr("Operation failed for %1 item(s).").arg(Errors.size()), Errors, theGUI);

View File

@ -48,7 +48,7 @@ public:
SB_STATUS AddAsyncOp(const CSbieProgressPtr& pProgress, bool bWait = false, const QString& InitialMsg = QString());
static QString FormatError(const SB_STATUS& Error);
static void CheckResults(QList<SB_STATUS> Results);
static void CheckResults(QList<SB_STATUS> Results, bool bAsync = false);
static QIcon GetIcon(const QString& Name, int iAction = 1);
@ -94,7 +94,7 @@ protected:
static void RecoverFilesAsync(const CSbieProgressPtr& pProgress, const QString& BoxName, const QList<QPair<QString, QString>>& FileList, const QStringList& Checkers, int Action = 0);
static void CheckFilesAsync(const CSbieProgressPtr& pProgress, const QString& BoxName, const QStringList &Files, const QStringList& Checkers);
QIcon GetTrayIcon(bool isConnected = true);
QIcon GetTrayIcon(bool isConnected = true, bool bSun = false);
QString GetTrayText(bool isConnected = true);
void CheckSupport();
@ -379,6 +379,7 @@ private:
bool m_bIconEmpty;
int m_iIconDisabled;
bool m_bIconBusy;
bool m_bIconSun;
int m_iDeletingContent;
bool m_bExit;

View File

@ -124,7 +124,7 @@ void CSandMan::CreateTrayMenu()
m_pTrayMenu->addAction(m_pExit);
}
QIcon CSandMan::GetTrayIcon(bool isConnected)
QIcon CSandMan::GetTrayIcon(bool isConnected, bool bSun)
{
bool bClassic = (theConf->GetInt("Options/SysTrayIcon", 1) == 2);
@ -154,6 +154,8 @@ QIcon CSandMan::GetTrayIcon(bool isConnected)
else
overlay = GetIcon(IconFile, 0).pixmap(size);
}
else if(bSun)
overlay = GetIcon("IconSun", 0).pixmap(size);
painter.drawPixmap(0, 0, base);
if(!overlay.isNull()) painter.drawPixmap(0, 0, overlay);

View File

@ -971,7 +971,7 @@ void CSandBoxPlus::OnAsyncFinished()
SB_STATUS Status = pProgress->GetStatus();
if (Status.IsError()) {
m_JobQueue.clear();
theGUI->CheckResults(QList<SB_STATUS>() << Status);
theGUI->CheckResults(QList<SB_STATUS>() << Status, true);
return;
}
else