summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater/src/Utils.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-07-27 21:22:22 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-07-27 21:22:22 +0000
commite9cc7df74e68a216bd45afaa370202ed0f2fb9b7 (patch)
treee583904c76cc0fb27ab55c53c6aff05ae66a9b32 /plugins/PluginUpdater/src/Utils.cpp
parentdde3a69d7716d12e00d827fc9b94705bbe3eb8f2 (diff)
PluginUpdater:
- compilation fixes for IM_Updater git-svn-id: http://svn.miranda-ng.org/main/trunk@14740 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PluginUpdater/src/Utils.cpp')
-rw-r--r--plugins/PluginUpdater/src/Utils.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/plugins/PluginUpdater/src/Utils.cpp b/plugins/PluginUpdater/src/Utils.cpp
index 36e46ceb43..4149ba1620 100644
--- a/plugins/PluginUpdater/src/Utils.cpp
+++ b/plugins/PluginUpdater/src/Utils.cpp
@@ -22,6 +22,22 @@ Boston, MA 02111-1307, USA.
HANDLE hNetlibUser = NULL, hPipe = NULL;
/////////////////////////////////////////////////////////////////////////////////////
+void LoadOptions()
+{
+ PopupOptions.DefColors = db_get_b(NULL, MODNAME, "DefColors", DEFAULT_COLORS);
+ PopupOptions.LeftClickAction= db_get_b(NULL, MODNAME, "LeftClickAction", DEFAULT_POPUP_LCLICK);
+ PopupOptions.RightClickAction = db_get_b(NULL, MODNAME, "RightClickAction", DEFAULT_POPUP_RCLICK);
+ PopupOptions.Timeout = db_get_dw(NULL, MODNAME, "Timeout", DEFAULT_TIMEOUT_VALUE);
+
+ opts.bUpdateOnStartup = db_get_b(NULL, MODNAME, "UpdateOnStartup", DEFAULT_UPDATEONSTARTUP);
+ opts.bOnlyOnceADay = db_get_b(NULL, MODNAME, "OnlyOnceADay", DEFAULT_ONLYONCEADAY);
+ opts.bUpdateOnPeriod = db_get_b(NULL, MODNAME, "UpdateOnPeriod", DEFAULT_UPDATEONPERIOD);
+ opts.Period = db_get_dw(NULL, MODNAME, "Period", DEFAULT_PERIOD);
+ opts.bPeriodMeasure = db_get_b(NULL, MODNAME, "PeriodMeasure", DEFAULT_PERIODMEASURE);
+ opts.bForceRedownload = db_get_b(NULL, MODNAME, DB_SETTING_REDOWNLOAD, 0);
+ opts.bSilentMode = db_get_b(NULL, MODNAME, "SilentMode", 0);
+}
+
#if MIRANDA_VER >= 0x0A00
IconItemT iconList[] =
{
@@ -121,6 +137,7 @@ bool ParseHashes(const TCHAR *ptszUrl, ptrT &baseUrl, SERVLIST &arHashes)
vars[0].value.t = _T("32");
#endif
vars[1].key.t = vars[1].value.t = 0;
+ baseUrl = Utils_ReplaceVarsT(ptszUrl, 0, vars);
#else
vars[0].lptzKey = _T("platform");
#ifdef _WIN64
@@ -129,8 +146,8 @@ bool ParseHashes(const TCHAR *ptszUrl, ptrT &baseUrl, SERVLIST &arHashes)
vars[0].lptzValue = _T("32");
#endif
vars[1].lptzKey = vars[1].lptzValue = 0;
+ baseUrl = (TCHAR*)CallService(MS_UTILS_REPLACEVARS, (WPARAM)ptszUrl, (LPARAM)&vars);
#endif
- baseUrl = Utils_ReplaceVarsT(ptszUrl, 0, vars);
// Download version info
FILEURL pFileUrl;