diff options
author | George Hazan <ghazan@miranda.im> | 2018-11-12 21:44:56 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-11-12 21:44:56 +0300 |
commit | 53fe3e46177d17b4941610de19f5cc6210700cb4 (patch) | |
tree | b67a6bc208dad141f9db14035cd7e42ff2a51872 /plugins/New_GPG/src/init.cpp | |
parent | 488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 (diff) |
db_* functions replaced with g_plugin calls
Diffstat (limited to 'plugins/New_GPG/src/init.cpp')
-rwxr-xr-x | plugins/New_GPG/src/init.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp index 194e7f6f94..8b074c96e7 100755 --- a/plugins/New_GPG/src/init.cpp +++ b/plugins/New_GPG/src/init.cpp @@ -70,34 +70,34 @@ void InitIconLib(); void init_vars() { - globals.bAppendTags = db_get_b(NULL, MODULENAME, "bAppendTags", 0) != 0; - globals.bStripTags = db_get_b(NULL, MODULENAME, "bStripTags", 0) != 0; - globals.inopentag = UniGetContactSettingUtf(NULL, MODULENAME, "szInOpenTag", L"<GPGdec>"); - globals.inclosetag = UniGetContactSettingUtf(NULL, MODULENAME, "szInCloseTag", L"</GPGdec>"); - globals.outopentag = UniGetContactSettingUtf(NULL, MODULENAME, "szOutOpenTag", L"<GPGenc>"); - globals.outclosetag = UniGetContactSettingUtf(NULL, MODULENAME, "szOutCloseTag", L"</GPGenc>"); - globals.bDebugLog = db_get_b(NULL, MODULENAME, "bDebugLog", 0) != 0; - globals.bAutoExchange = db_get_b(NULL, MODULENAME, "bAutoExchange", 0) != 0; - globals.bSameAction = db_get_b(NULL, MODULENAME, "bSameAction", 0) != 0; - globals.password = UniGetContactSettingUtf(NULL, MODULENAME, "szKeyPassword", L""); + globals.bAppendTags = g_plugin.getByte("bAppendTags", 0) != 0; + globals.bStripTags = g_plugin.getByte("bStripTags", 0) != 0; + globals.inopentag = UniGetContactSettingUtf(0, MODULENAME, "szInOpenTag", L"<GPGdec>"); + globals.inclosetag = UniGetContactSettingUtf(0, MODULENAME, "szInCloseTag", L"</GPGdec>"); + globals.outopentag = UniGetContactSettingUtf(0, MODULENAME, "szOutOpenTag", L"<GPGenc>"); + globals.outclosetag = UniGetContactSettingUtf(0, MODULENAME, "szOutCloseTag", L"</GPGenc>"); + globals.bDebugLog = g_plugin.getByte("bDebugLog", 0) != 0; + globals.bAutoExchange = g_plugin.getByte("bAutoExchange", 0) != 0; + globals.bSameAction = g_plugin.getByte("bSameAction", 0) != 0; + globals.password = UniGetContactSettingUtf(0, MODULENAME, "szKeyPassword", L""); globals.debuglog.init(); - globals.bJabberAPI = db_get_b(NULL, MODULENAME, "bJabberAPI", true) != 0; - globals.bPresenceSigning = db_get_b(NULL, MODULENAME, "bPresenceSigning", 0) != 0; - globals.bFileTransfers = db_get_b(NULL, MODULENAME, "bFileTransfers", 0) != 0; - globals.firstrun_rect.left = db_get_dw(NULL, MODULENAME, "FirstrunWindowX", 0); - globals.firstrun_rect.top = db_get_dw(NULL, MODULENAME, "FirstrunWindowY", 0); - globals.key_password_rect.left = db_get_dw(NULL, MODULENAME, "PasswordWindowX", 0); - globals.key_password_rect.top = db_get_dw(NULL, MODULENAME, "PasswordWindowY", 0); - globals.key_gen_rect.left = db_get_dw(NULL, MODULENAME, "KeyGenWindowX", 0); - globals.key_gen_rect.top = db_get_dw(NULL, MODULENAME, "KeyGenWindowY", 0); - globals.load_key_rect.left = db_get_dw(NULL, MODULENAME, "LoadKeyWindowX", 0); - globals.load_key_rect.top = db_get_dw(NULL, MODULENAME, "LoadKeyWindowY", 0); - globals.import_key_rect.left = db_get_dw(NULL, MODULENAME, "ImportKeyWindowX", 0); - globals.import_key_rect.top = db_get_dw(NULL, MODULENAME, "ImportKeyWindowY", 0); - globals.new_key_rect.left = db_get_dw(NULL, MODULENAME, "NewKeyWindowX", 0); - globals.new_key_rect.top = db_get_dw(NULL, MODULENAME, "NewKeyWindowY", 0); - globals.load_existing_key_rect.left = db_get_dw(NULL, MODULENAME, "LoadExistingKeyWindowX", 0); - globals.load_existing_key_rect.top = db_get_dw(NULL, MODULENAME, "LoadExistingKeyWindowY", 0); + globals.bJabberAPI = g_plugin.getByte("bJabberAPI", true) != 0; + globals.bPresenceSigning = g_plugin.getByte("bPresenceSigning", 0) != 0; + globals.bFileTransfers = g_plugin.getByte("bFileTransfers", 0) != 0; + globals.firstrun_rect.left = g_plugin.getDword("FirstrunWindowX", 0); + globals.firstrun_rect.top = g_plugin.getDword("FirstrunWindowY", 0); + globals.key_password_rect.left = g_plugin.getDword("PasswordWindowX", 0); + globals.key_password_rect.top = g_plugin.getDword("PasswordWindowY", 0); + globals.key_gen_rect.left = g_plugin.getDword("KeyGenWindowX", 0); + globals.key_gen_rect.top = g_plugin.getDword("KeyGenWindowY", 0); + globals.load_key_rect.left = g_plugin.getDword("LoadKeyWindowX", 0); + globals.load_key_rect.top = g_plugin.getDword("LoadKeyWindowY", 0); + globals.import_key_rect.left = g_plugin.getDword("ImportKeyWindowX", 0); + globals.import_key_rect.top = g_plugin.getDword("ImportKeyWindowY", 0); + globals.new_key_rect.left = g_plugin.getDword("NewKeyWindowX", 0); + globals.new_key_rect.top = g_plugin.getDword("NewKeyWindowY", 0); + globals.load_existing_key_rect.left = g_plugin.getDword("LoadExistingKeyWindowX", 0); + globals.load_existing_key_rect.top = g_plugin.getDword("LoadExistingKeyWindowY", 0); globals.tabsrmm_used = isTabsrmmUsed(); globals.bold_font = CreateFont(14, 0, 0, 0, 600, 0, 0, 0, DEFAULT_CHARSET, 0, 0, 0, 0, L"Arial"); } @@ -105,7 +105,7 @@ void init_vars() static int OnModulesLoaded(WPARAM, LPARAM) { FirstRun(); - if (!db_get_b(NULL, MODULENAME, "FirstRun", 1)) + if (!g_plugin.getByte("FirstRun", 1)) InitCheck(); StatusIconData sid = {}; |