summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/PluginUpdater')
-rw-r--r--plugins/PluginUpdater/res/Delete.icobin2550 -> 0 bytes
-rw-r--r--plugins/PluginUpdater/res/Resource.rc1
-rw-r--r--plugins/PluginUpdater/src/Events.cpp6
-rw-r--r--plugins/PluginUpdater/src/Notifications.cpp1
-rw-r--r--plugins/PluginUpdater/src/PluginUpdater.cpp11
-rw-r--r--plugins/PluginUpdater/src/Utils.cpp1
-rw-r--r--plugins/PluginUpdater/src/resource.h1
7 files changed, 8 insertions, 13 deletions
diff --git a/plugins/PluginUpdater/res/Delete.ico b/plugins/PluginUpdater/res/Delete.ico
deleted file mode 100644
index eea851da19..0000000000
--- a/plugins/PluginUpdater/res/Delete.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/PluginUpdater/res/Resource.rc b/plugins/PluginUpdater/res/Resource.rc
index 2e3c945924..10308c4d68 100644
--- a/plugins/PluginUpdater/res/Resource.rc
+++ b/plugins/PluginUpdater/res/Resource.rc
@@ -27,7 +27,6 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_MENU ICON "menu.ico"
-IDI_DELETE ICON "delete.ico"
IDI_OK ICON "btnOk.ico"
IDI_CANCEL ICON "btnClose.ico"
diff --git a/plugins/PluginUpdater/src/Events.cpp b/plugins/PluginUpdater/src/Events.cpp
index 84ea06be08..295b9288cb 100644
--- a/plugins/PluginUpdater/src/Events.cpp
+++ b/plugins/PluginUpdater/src/Events.cpp
@@ -25,6 +25,12 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
{
opts.bSilent = true;
+ int iRestartCount = DBGetContactSettingByte(NULL, MODULEA, "RestartCount", 2);
+ if (iRestartCount > 0)
+ DBWriteContactSettingByte(NULL, MODULEA, "RestartCount", iRestartCount-1);
+ else
+ EmptyFolder(0, TRUE); // silently
+
if (AllowUpdateOnStartup())
DoCheck(opts.bUpdateOnStartup);
diff --git a/plugins/PluginUpdater/src/Notifications.cpp b/plugins/PluginUpdater/src/Notifications.cpp
index 8d0a2937c2..63d95d7892 100644
--- a/plugins/PluginUpdater/src/Notifications.cpp
+++ b/plugins/PluginUpdater/src/Notifications.cpp
@@ -284,6 +284,7 @@ static void ApplyUpdates(void* param)
DeleteFile(p.File.tszDiskPath);
}
+ DBWriteContactSettingByte(NULL, MODULEA, "RestartCount", 2);
DestroyWindow(hDlg);
CallFunctionAsync(RestartMe, 0);
}
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp
index 19cf80e0e7..0ef0f64fc7 100644
--- a/plugins/PluginUpdater/src/PluginUpdater.cpp
+++ b/plugins/PluginUpdater/src/PluginUpdater.cpp
@@ -21,7 +21,7 @@ Boston, MA 02111-1307, USA.
HINSTANCE hInst = NULL;
-HANDLE hPluginUpdaterFolder = NULL, hCheckUpdates = NULL, hEmptyFolder = NULL;
+HANDLE hPluginUpdaterFolder = NULL, hCheckUpdates = NULL;
TCHAR tszRoot[MAX_PATH] = {0};
int hLangpack;
@@ -79,14 +79,6 @@ extern "C" __declspec(dllexport) int Load(void)
mi.pszService = MODNAME"/CheckUpdates";
Menu_AddMainMenuItem(&mi);
- // Add empty updates folder menu item
- hEmptyFolder = CreateServiceFunction(MODNAME"/EmptyFolder", EmptyFolder);
-
- mi.icolibItem = Skin_GetIconHandle("empty_folder");
- mi.pszName = LPGEN("Clear plugin updates folder");
- mi.pszService = MODNAME"/EmptyFolder";
- Menu_AddMainMenuItem(&mi);
-
// Add hotkey
HOTKEYDESC hkd = {0};
hkd.cbSize = sizeof(hkd);
@@ -113,6 +105,5 @@ extern "C" __declspec(dllexport) int Unload(void)
NetlibUnInit();
DestroyServiceFunction(hCheckUpdates);
- DestroyServiceFunction(hEmptyFolder);
return 0;
}
diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp
index 2f1e0b17b5..c3863552dc 100644
--- a/plugins/PluginUpdater/src/Utils.cpp
+++ b/plugins/PluginUpdater/src/Utils.cpp
@@ -38,7 +38,6 @@ struct
static iconList[] =
{
{ "check_update", LPGEN("Check for plugin updates"), IDI_MENU },
- { "empty_folder", LPGEN("Clear plugin updates folder"), IDI_DELETE },
{ "btn_ok", LPGEN("'Yes' Button"), IDI_OK },
{ "btn_cancel", LPGEN("'No' Button"), IDI_CANCEL }
};
diff --git a/plugins/PluginUpdater/src/resource.h b/plugins/PluginUpdater/src/resource.h
index 46d86396f2..40bb68f2ca 100644
--- a/plugins/PluginUpdater/src/resource.h
+++ b/plugins/PluginUpdater/src/resource.h
@@ -7,7 +7,6 @@
#define IDD_OPT_UPDATENOTIFY 104
#define IDD_POPUP 105
#define IDD_POPUPDUMMI 106
-#define IDI_DELETE 107
#define IDI_OK 108
#define IDI_CANCEL 109
#define IDC_UPDATETEXT 1001