Browse Source

added back door setting to disable expire clips config

sabrogden 7 years ago
parent
commit
e63f54db06
3 changed files with 20 additions and 0 deletions
  1. 10 0
      Options.cpp
  2. 2 0
      Options.h
  3. 8 0
      OptionsGeneral.cpp

+ 10 - 0
Options.cpp

@@ -2685,4 +2685,14 @@ void CGetSetOptions::SetCleanRTFBeforeDrawing(BOOL val)
 {
 	m_cleanRTFBeforeDrawing = true;
 	SetProfileLong("CleanRTFBeforeDrawing", val);
+}
+
+BOOL CGetSetOptions::GetDisableExpireClipsConfig()
+{
+	return GetProfileLong("DisableExpireClipsConfig", FALSE);
+}
+
+void CGetSetOptions::SetDisableExpireClipsConfig(BOOL val)
+{
+	SetProfileLong("DisableExpireClipsConfig", val);
 }

+ 2 - 0
Options.h

@@ -599,6 +599,8 @@ public:
 	static BOOL GetCleanRTFBeforeDrawing();
 	static void SetCleanRTFBeforeDrawing(BOOL val);
 
+	static BOOL GetDisableExpireClipsConfig();
+	static void SetDisableExpireClipsConfig(BOOL val);
 };
 
 // global for easy access and for initialization of fast access variables

+ 8 - 0
OptionsGeneral.cpp

@@ -114,6 +114,14 @@ BOOL COptionsGeneral::OnInitDialog()
 	m_eExpireAfter.SetNumber(CGetSetOptions::GetExpiredEntries());
 	m_eMaxSavedCopies.SetNumber(CGetSetOptions::GetMaxEntries());
 
+	if(CGetSetOptions::GetDisableExpireClipsConfig())
+	{
+		m_btMaximumCheck.EnableWindow(FALSE);
+		m_btExpire.EnableWindow(FALSE);
+		m_eExpireAfter.EnableWindow(FALSE);
+		m_eMaxSavedCopies.EnableWindow(FALSE);
+	}
+
 	m_copyAppInclude.SetWindowText(g_Opt.GetCopyAppInclude());
 	m_copyAppExclude.SetWindowText(g_Opt.GetCopyAppExclude());