Do you want to go to the info page?
").arg(InfoUrl); + CCheckableMessageBox mb(this); mb.setWindowTitle("Sandboxie-Plus"); QIcon ico(QLatin1String(":/SandMan.png")); mb.setIconPixmap(ico.pixmap(64, 64)); + //mb.setTextFormat(Qt::RichText); mb.setText(UserMsg); mb.setCheckBoxText(tr("Don't show this announcement in the future.")); - mb.setStandardButtons(QDialogButtonBox::Close); + + if (!InfoUrl.isEmpty()) { + mb.setStandardButtons(QDialogButtonBox::Yes | QDialogButtonBox::No); + mb.setDefaultButton(QDialogButtonBox::Yes); + } + else + mb.setStandardButtons(QDialogButtonBox::Ok); + mb.exec(); if (mb.isChecked()) theConf->SetValue("Options/IgnoredUpdates", IgnoredUpdates << MsgHash); + if (mb.clickedStandardButton() == QDialogButtonBox::Yes) + { + QDesktopServices::openUrl(InfoUrl); + } + bNothing = false; } } - QString Version = Data["version"].toString(); - if (!Version.isEmpty() && Version != GetVersion()) + QString VersionStr = Data["version"].toString(); + if (!VersionStr.isEmpty()) //&& VersionStr != GetVersion()) { - if (bManual || !IgnoredUpdates.contains(Version)) // when checked manually always show result + UCHAR myVersion[4] = { VERSION_UPD, VERSION_REV, VERSION_MIN, VERSION_MJR }; // ntohl + ULONG MyVersion = *(ULONG*)&myVersion; + + ULONG Version = 0; + QStringList Nums = VersionStr.split("."); + for (int i = 0, Bits = 24; i < Nums.count() && Bits >= 0; i++, Bits -= 8) + Version |= (Nums[i].toInt() & 0xFF) << Bits; + + if (Version > MyVersion) + if (bManual || !IgnoredUpdates.contains(VersionStr)) // when checked manually always show result { bNothing = false; //QDateTime Updated = QDateTime::fromTime_t(Data["updated"].toULongLong()); @@ -1775,7 +1805,7 @@ void CSandMan::OnUpdateCheck() mb.setIconPixmap(ico.pixmap(64, 64)); //mb.setTextFormat(Qt::RichText); mb.setText(FullMessage); - mb.setCheckBoxText(tr("Ignore this update, notify me about the next one.")); + mb.setCheckBoxText(tr("Don't show this message anymore.")); mb.setCheckBoxVisible(!bManual); if (!UpdateUrl.isEmpty() || !DownloadUrl.isEmpty()) { @@ -1788,7 +1818,7 @@ void CSandMan::OnUpdateCheck() mb.exec(); if (mb.isChecked()) - theConf->SetValue("Options/IgnoredUpdates", IgnoredUpdates << Version); + theConf->SetValue("Options/IgnoredUpdates", IgnoredUpdates << VersionStr); if (mb.clickedStandardButton() == QDialogButtonBox::Yes) { diff --git a/SandboxiePlus/SandMan/SandMan.h b/SandboxiePlus/SandMan/SandMan.h index c8a3b1ba..77a266d2 100644 --- a/SandboxiePlus/SandMan/SandMan.h +++ b/SandboxiePlus/SandMan/SandMan.h @@ -14,7 +14,7 @@ #define VERSION_MJR 0 #define VERSION_MIN 6 -#define VERSION_REV 0 +#define VERSION_REV 5 #define VERSION_UPD 0 diff --git a/SandboxiePlus/SandMan/SandMan.pri b/SandboxiePlus/SandMan/SandMan.pri new file mode 100644 index 00000000..99bac872 --- /dev/null +++ b/SandboxiePlus/SandMan/SandMan.pri @@ -0,0 +1,58 @@ +# ---------------------------------------------------- +# This file is generated by the Qt Visual Studio Tools. +# ------------------------------------------------------ + + +HEADERS += ./stdafx.h \ + ./SandMan.h \ + ./ApiLog.h \ + ./SbiePlusAPI.h \ + ./Models/SbieModel.h \ + ./Models/ResMonModel.h \ + ./Models/ApiMonModel.h \ + ./Views/SbieView.h \ + ./Dialogs/MultiErrorDialog.h \ + ./Helpers/FindTool.h \ + ./Helpers/WinAdmin.h \ + ./Windows/NewBoxWindow.h \ + ./Windows/RecoveryWindow.h \ + ./Windows/PopUpWindow.h \ + ./Windows/SnapshotsWindow.h \ + ./Windows/SettingsWindow.h \ + ./Windows/OptionsWindow.h + +SOURCES += ./main.cpp \ + ./stdafx.cpp \ + ./ApiLog.cpp \ + ./SandMan.cpp \ + ./SbiePlusAPI.cpp \ + ./Models/ApiMonModel.cpp \ + ./Models/ResMonModel.cpp \ + ./Models/SbieModel.cpp \ + ./Views/SbieView.cpp \ + ./Dialogs/MultiErrorDialog.cpp \ + ./Helpers/FindTool.cpp \ + ./Helpers/WinAdmin.cpp \ + ./Helpers/WindowFromPointEx.cpp \ + ./Windows/NewBoxWindow.cpp \ + ./Windows/OptionsWindow.cpp \ + ./Windows/PopUpWindow.cpp \ + ./Windows/RecoveryWindow.cpp \ + ./Windows/SettingsWindow.cpp \ + ./Windows/SnapshotsWindow.cpp + +FORMS += ./Forms/NewBoxWindow.ui \ + ./Forms/OptionsWindow.ui \ + ./Forms/PopUpWindow.ui \ + ./Forms/RecoveryWindow.ui \ + ./Forms/SettingsWindow.ui \ + ./Forms/SnapshotsWindow.ui + +TRANSLATIONS += ./sandman_de.ts \ + ./sandman_pt.ts \ + ./sandman_ru.ts \ + ./sandman_tr.ts \ + ./sandman_zh.ts \ + ./sandman_zh-TW.ts + +RESOURCES += Resources/SandMan.qrc diff --git a/SandboxiePlus/SandMan/SandMan.qc.pro b/SandboxiePlus/SandMan/SandMan.qc.pro new file mode 100644 index 00000000..f75c5307 --- /dev/null +++ b/SandboxiePlus/SandMan/SandMan.qc.pro @@ -0,0 +1,44 @@ + +TEMPLATE = app +TARGET = SandMan +PRECOMPILED_HEADER = stdafx.h + +QT += core gui network widgets winextras concurrent + +CONFIG += lrelease + +CONFIG(debug, debug|release):contains(QMAKE_HOST.arch, x86_64):LIBS += -L../Bin/x64/Debug +CONFIG(release, debug|release):contains(QMAKE_HOST.arch, x86_64):LIBS += -L../Bin/x64/Release +CONFIG(debug, debug|release):!contains(QMAKE_HOST.arch, x86_64):LIBS += -L../Bin/Win32/Debug +CONFIG(release, debug|release):!contains(QMAKE_HOST.arch, x86_64):LIBS += -L../Bin/Win32/Release + +LIBS += -lNtdll -lAdvapi32 -lOle32 -lUser32 -lShell32 -lGdi32 -lQSbieAPI -lMiscHelpers -lqtsingleapp + +CONFIG(release, debug|release):{ +QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO +QMAKE_LFLAGS_RELEASE = $$QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO +} + +CONFIG(debug, debug|release):contains(QMAKE_HOST.arch, x86_64):DESTDIR = ../Bin/x64/Debug +CONFIG(release, debug|release):contains(QMAKE_HOST.arch, x86_64):DESTDIR = ../Bin/x64/Release +CONFIG(debug, debug|release):!contains(QMAKE_HOST.arch, x86_64):DESTDIR = ../Bin/Win32/Debug +CONFIG(release, debug|release):!contains(QMAKE_HOST.arch, x86_64):DESTDIR = ../Bin/Win32/Release + +INCLUDEPATH += . +DEPENDPATH += . +MOC_DIR += . +OBJECTS_DIR += debug +UI_DIR += . +RCC_DIR += . + + + +include(SandMan.pri) +win32:RC_FILE = SandMan.rc + +TRANSLATIONS += sandman_de.ts \ + sandman_pt.ts \ + sandman_ru.ts \ + sandman_tr.ts \ + sandman_zh.ts \ + sandman_zh-TW.ts diff --git a/SandboxiePlus/SandMan/Resources/SandMan.rc b/SandboxiePlus/SandMan/SandMan.rc similarity index 94% rename from SandboxiePlus/SandMan/Resources/SandMan.rc rename to SandboxiePlus/SandMan/SandMan.rc index e7569a5a..65562253 100644 --- a/SandboxiePlus/SandMan/Resources/SandMan.rc +++ b/SandboxiePlus/SandMan/SandMan.rc @@ -1,6 +1,6 @@ // Microsoft Visual C++ generated resource script. // -#include "resource.h" +#include "./resources/resource.h" ///////////////////////////////////////////////////////////////////////////// // German (Austria) resources diff --git a/SandboxiePlus/SandMan/SandMan.vcxproj b/SandboxiePlus/SandMan/SandMan.vcxproj index 9efb4f03..8961d3b7 100644 --- a/SandboxiePlus/SandMan/SandMan.vcxproj +++ b/SandboxiePlus/SandMan/SandMan.vcxproj @@ -243,9 +243,6 @@