diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2014-07-26 22:51:26 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2014-07-26 22:51:26 +0000 |
commit | e54b4cd7f0c6fd272437e410f17238a6c94b1547 (patch) | |
tree | 77eb81e4a1fc1acc27b95561614fff6a0405d313 /plugins/PluginUpdater/src/PluginUpdater.cpp | |
parent | cfeeb89bc233916e4a173f005e71862bfa595b50 (diff) |
PluginUpdater:
-Now the custom URL is remembered when changing the update mode in Options
-Cleaned up popup Options
-Fixed Restart MessageBox after silent update
-code reordering
git-svn-id: http://svn.miranda-ng.org/main/trunk@9958 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PluginUpdater/src/PluginUpdater.cpp')
-rw-r--r-- | plugins/PluginUpdater/src/PluginUpdater.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp index 5e14fddd70..4644d6d13e 100644 --- a/plugins/PluginUpdater/src/PluginUpdater.cpp +++ b/plugins/PluginUpdater/src/PluginUpdater.cpp @@ -138,6 +138,31 @@ extern "C" __declspec(dllexport) int Load(void) //add sounds
SkinAddNewSoundEx("updatecompleted",LPGEN("Plugin Updater"),LPGEN("Update completed"));
SkinAddNewSoundEx("updatefailed",LPGEN("Plugin Updater"),LPGEN("Update failed"));
+
+ // Upgrade old settings
+ if(!db_set_b(0,MODNAME,"UpdateMode",UPDATE_MODE_STABLE))
+ {
+ DBVARIANT dbvUpdateURL;
+ if (!db_get_s(0,MODNAME, "UpdateURL",&dbvUpdateURL))
+ {
+ if (!strcmp(dbvUpdateURL.pszVal, DEFAULT_UPDATE_URL))
+ {
+ db_set_b(0,MODNAME,"UpdateMode",UPDATE_MODE_STABLE);
+ db_unset(0,MODNAME, "UpdateURL");
+ }
+ else if (!strcmp(dbvUpdateURL.pszVal, DEFAULT_UPDATE_URL_TRUNK))
+ {
+ db_set_b(0,MODNAME,"UpdateMode",UPDATE_MODE_TRUNK);
+ db_unset(0,MODNAME, "UpdateURL");
+ }
+ else if (!strcmp(dbvUpdateURL.pszVal, DEFAULT_UPDATE_URL_TRUNK_SYMBOLS"/"))
+ {
+ db_set_b(0,MODNAME,"UpdateMode",UPDATE_MODE_TRUNK_SYMBOLS);
+ db_unset(0,MODNAME, "UpdateURL");
+ }
+ db_free(&dbvUpdateURL);
+ }
+ }
return 0;
}
|