diff options
author | George Hazan <ghazan@miranda.im> | 2019-03-06 17:14:40 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-03-06 17:14:47 +0300 |
commit | c09a65cb4153f151ec2eb074614b4ccfe7c22bdb (patch) | |
tree | 171522c9a9aaf456bd68484008e7692a6b7d8361 /src/mir_app | |
parent | 000d773f687e5931699fc4de4d4b472b6325f3fb (diff) |
popups: pascal code cleaning
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/popups.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mir_app/src/popups.cpp b/src/mir_app/src/popups.cpp index 67bee51a6e..d6958bcb46 100644 --- a/src/mir_app/src/popups.cpp +++ b/src/mir_app/src/popups.cpp @@ -24,13 +24,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h" +static bool bModuleInit = false, bPopupsEnabled = true; + MIR_APP_DLL(bool) Popup_Enabled() { - return db_get_b(0, "Popup", "ModuleIsEnabled", 1) != 0; + if (!bModuleInit) { + bModuleInit = true; + bPopupsEnabled = db_get_b(0, "Popup", "ModuleIsEnabled", 1) != 0; + } + + return bPopupsEnabled; } MIR_APP_DLL(void) Popup_Enable(bool bEnable) { + bPopupsEnabled = bEnable; db_set_b(0, "Popup", "ModuleIsEnabled", bEnable); } |