summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/PluginUpdater/src')
-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
5 files changed, 8 insertions, 12 deletions
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