Permalink
Browse files

Changed default check time to 14 days

  • Loading branch information...
1 parent 0f35568 commit 2235df58f41512083b72737981d135b6e82f0cfd @bruderstein committed Dec 2, 2011
@@ -121,22 +121,22 @@
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)\..\..\bin\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)\..\..\bin\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='ANSI-Debug|Win32'">$(ProjectDir)\..\..\bin\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='ANSI-Debug|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ANSI-Debug|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ANSI-Debug|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='ANSI-Release|Win32'">$(ProjectDir)\..\..\bin\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='ANSI-Release|Win32'">$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ANSI-Release|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug-xml-test|Win32'">$(ProjectDir)\..\..\bin\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug-xml-test|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug-xml-test|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug-xml-test|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='ANSI-Debug-xml-test|Win32'">$(ProjectDir)\..\..\bin\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='ANSI-Debug-xml-test|Win32'">$(Configuration)\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ANSI-Debug-xml-test|Win32'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ANSI-Debug-xml-test|Win32'">false</LinkIncremental>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ANSI-Debug-xml-test|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ANSI-Debug-xml-test|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ANSI-Debug-xml-test|Win32'" />
@@ -155,6 +155,9 @@
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ANSI-Release-XML-Test|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release-xml-test|Win32'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
@@ -251,6 +251,12 @@ void loadSettings(void)
g_options.showUnstable = ::GetPrivateProfileInt(SETTINGS_GROUP, KEY_SHOWUNSTABLE, 0, iniFilePath);
+ g_options.daysToCheck = ::GetPrivateProfileInt(SETTINGS_GROUP, KEY_DAYSTOCHECK, DAYSCHECK_DEFAULT, iniFilePath);
+ if (g_options.daysToCheck < DAYSCHECK_MIN)
+ {
+ g_options.daysToCheck = DAYSCHECK_MIN;
+ }
+
g_options.installLocation = static_cast<INSTALLLOCATION>(::GetPrivateProfileInt(SETTINGS_GROUP, KEY_INSTALLLOCATION, 2, iniFilePath));
g_options.appDataPluginsSupported = static_cast<BOOL>(::SendMessage(nppData._nppHandle, NPPM_GETAPPDATAPLUGINSALLOWED, 0, 0));
// TODO Test
@@ -310,6 +316,13 @@ void saveSettings(void)
// Install location
_itot_s(g_options.installLocation, temp, 16, 10);
::WritePrivateProfileString(SETTINGS_GROUP, KEY_INSTALLLOCATION, temp, iniFilePath);
+
+ if (g_options.daysToCheck != DAYSCHECK_DEFAULT)
+ {
+ _itot_s(g_options.daysToCheck, temp, 16, 10);
+ ::WritePrivateProfileString(SETTINGS_GROUP, KEY_DAYSTOCHECK, temp, iniFilePath);
+ }
+
boost::shared_ptr<TCHAR> username = WcharMbcsConverter::char2tchar(g_options.proxyInfo.getUsername());
::WritePrivateProfileString(SETTINGS_GROUP, KEY_PROXYUSERNAME, username.get(), iniFilePath);
@@ -408,7 +421,7 @@ UINT startupChecks(LPVOID /*param*/)
time_t ltime;
time(&ltime);
- if (g_options.notifyUpdates && ((ltime - g_options.lastCheck) > 259200))
+ if (g_options.notifyUpdates && ((ltime - g_options.lastCheck) > (86400 * g_options.daysToCheck)))
{
// Store the check time
TCHAR tmp[20];
@@ -49,12 +49,15 @@ CONST TCHAR PLUGINMANAGER_INI[] = _T("\\PluginManager.ini");
#define KEY_PROXYUSERNAME _T("ProxyUsername")
#define KEY_PROXYPASSWORD _T("ProxyPassword")
#define KEY_SAVECRED _T("SaveCredentials")
+#define KEY_DAYSTOCHECK _T("DaysToCheck")
#define KEY_KEY _T("Key")
#ifdef ALLOW_OVERRIDE_XML_URL
#define KEY_OVERRIDEMD5URL _T("md5url")
#define KEY_OVERRIDEURL _T("xmlurl")
#endif
+#define DAYSCHECK_MIN 5
+#define DAYSCHECK_DEFAULT 14
@@ -91,6 +94,7 @@ struct Options
INSTALLLOCATION installLocation;
BOOL appDataPluginsSupported;
ModuleInfo moduleInfo;
+ int daysToCheck;
#ifdef ALLOW_OVERRIDE_XML_URL
tstring downloadMD5Url;
tstring downloadUrl;

0 comments on commit 2235df5

Please sign in to comment.