summaryrefslogtreecommitdiff
path: root/plugins/New_GPG
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2016-12-06 21:04:13 +0300
committerGeorge Hazan <ghazan@miranda.im>2016-12-06 21:04:26 +0300
commit2edf7b43622a8f29a0bfaf578c30127f933fe2c9 (patch)
tree3aa0d64599e4b2e3865559854e2729b5a7c9927d /plugins/New_GPG
parentd47fc1abf17049432e70f436cfd935942a28b51c (diff)
bIsMiranda09 - useless variable removed
Diffstat (limited to 'plugins/New_GPG')
-rw-r--r--plugins/New_GPG/src/init.cpp9
-rwxr-xr-xplugins/New_GPG/src/main.cpp3
-rwxr-xr-xplugins/New_GPG/src/messages.cpp4
-rwxr-xr-xplugins/New_GPG/src/options.cpp11
4 files changed, 12 insertions, 15 deletions
diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp
index a2bc038bfa..d70da19d65 100644
--- a/plugins/New_GPG/src/init.cpp
+++ b/plugins/New_GPG/src/init.cpp
@@ -17,7 +17,7 @@
#include "stdafx.h"
//global variables
-bool bAppendTags = false, bDebugLog = false, bJabberAPI = false, bPresenceSigning = false, bIsMiranda09 = false, bFileTransfers = false, bSameAction = false, bAutoExchange = false, bStripTags = false, tabsrmm_used = false;
+bool bAppendTags = false, bDebugLog = false, bJabberAPI = false, bPresenceSigning = false, bFileTransfers = false, bSameAction = false, bAutoExchange = false, bStripTags = false, tabsrmm_used = false;
wchar_t *inopentag = NULL, *inclosetag = NULL, *outopentag = NULL, *outclosetag = NULL, *password = NULL;
list <JabberAccount*> Accounts;
@@ -83,8 +83,7 @@ void init_vars()
bSameAction = db_get_b(NULL, szGPGModuleName, "bSameAction", 0) != 0;
password = UniGetContactSettingUtf(NULL, szGPGModuleName, "szKeyPassword", L"");
debuglog.init();
- bIsMiranda09 = false;
- bJabberAPI = db_get_b(NULL, szGPGModuleName, "bJabberAPI", bIsMiranda09) != 0;
+ bJabberAPI = db_get_b(NULL, szGPGModuleName, "bJabberAPI", true) != 0;
bPresenceSigning = db_get_b(NULL, szGPGModuleName, "bPresenceSigning", 0) != 0;
bFileTransfers = db_get_b(NULL, szGPGModuleName, "bFileTransfers", 0) != 0;
firstrun_rect.left = db_get_dw(NULL, szGPGModuleName, "FirstrunWindowX", 0);
@@ -138,12 +137,12 @@ static int OnModulesLoaded(WPARAM, LPARAM)
sid.szTooltip = LPGEN("GPG Turn on encryption");
Srmm_AddIcon(&sid);
- if(bJabberAPI && bIsMiranda09)
+ if(bJabberAPI)
GetJabberInterface(0,0);
HookEvent(ME_OPT_INITIALISE, GpgOptInit);
HookEvent(ME_DB_EVENT_FILTER_ADD, HookSendMsg);
- if(bJabberAPI && bIsMiranda09)
+ if(bJabberAPI)
HookEvent(ME_PROTO_ACCLISTCHANGED, GetJabberInterface);
HookEvent(ME_PROTO_ACK, onProtoAck);
diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp
index 60c12c1879..6d954f7451 100755
--- a/plugins/New_GPG/src/main.cpp
+++ b/plugins/New_GPG/src/main.cpp
@@ -871,8 +871,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
//TODO: additional check for write access
if (gpg_exists && lang_exists && !bad_version)
MessageBox(0, TranslateT("Your GPG version is supported. The language file was found.\nGPG plugin should work fine.\nPress OK to continue."), TranslateT("Info"), MB_OK);
- extern bool bIsMiranda09;
- EnableWindow(GetDlgItem(hwndDlg, IDC_AUTO_EXCHANGE), bIsMiranda09);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_AUTO_EXCHANGE), TRUE);
return TRUE;
}
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp
index dc4f95277b..2469cd3692 100755
--- a/plugins/New_GPG/src/messages.cpp
+++ b/plugins/New_GPG/src/messages.cpp
@@ -664,7 +664,7 @@ void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags)
DWORD code;
wstring file = toUTF16(get_random(10)), path;
std::vector<std::wstring> cmd;
- extern bool bJabberAPI, bIsMiranda09;
+ extern bool bJabberAPI;
{
wchar_t *tmp2;
{
@@ -675,7 +675,7 @@ void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags)
ProtoChainSend(hContact, PSS_MESSAGE, flags, (LPARAM)msg);
return;
}
- if (!bJabberAPI || !bIsMiranda09) //force jabber to handle encrypted message by itself
+ if (!bJabberAPI) //force jabber to handle encrypted message by itself
{
cmd.push_back(L"--comment");
cmd.push_back(L"\"\"");
diff --git a/plugins/New_GPG/src/options.cpp b/plugins/New_GPG/src/options.cpp
index c3c2becfc3..e6fd670fbe 100755
--- a/plugins/New_GPG/src/options.cpp
+++ b/plugins/New_GPG/src/options.cpp
@@ -80,7 +80,7 @@ static INT_PTR CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
hwndList_p = hwndList;
hwndCurKey_p = GetDlgItem(hwndDlg, IDC_CURRENT_KEY);
LVITEM item = { 0 };
- extern bool bIsMiranda09, bJabberAPI;
+ extern bool bJabberAPI;
NMLISTVIEW *hdr = (NMLISTVIEW *)lParam;
switch (uMsg) {
case WM_INITDIALOG:
@@ -172,8 +172,8 @@ static INT_PTR CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
SetDlgItemText(hwndDlg, IDC_LOG_FILE_EDIT, (mir_wstrlen(tmp) > 1) ? tmp : L"c:\\GPGdebug.log");
mir_free(tmp);
CheckStateLoadDB(hwndDlg, IDC_DEBUG_LOG, "bDebugLog", 0);
- EnableWindow(GetDlgItem(hwndDlg, IDC_JABBER_API), bIsMiranda09);
- EnableWindow(GetDlgItem(hwndDlg, IDC_AUTO_EXCHANGE), (bIsMiranda09 && bJabberAPI));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_JABBER_API), TRUE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_AUTO_EXCHANGE), bJabberAPI);
{
string keyinfo = Translate("Default private key ID");
keyinfo += ": ";
@@ -182,8 +182,7 @@ static INT_PTR CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
mir_free(keyid);
SetDlgItemTextA(hwndDlg, IDC_CURRENT_KEY, keyinfo.c_str());
}
- if (bIsMiranda09)
- CheckStateLoadDB(hwndDlg, IDC_JABBER_API, "bJabberAPI", 1);
+ CheckStateLoadDB(hwndDlg, IDC_JABBER_API, "bJabberAPI", 1);
CheckStateLoadDB(hwndDlg, IDC_FILE_TRANSFERS, "bFileTransfers", 0);
CheckStateLoadDB(hwndDlg, IDC_AUTO_EXCHANGE, "bAutoExchange", 0);
}
@@ -367,7 +366,7 @@ static INT_PTR CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
break;
case WM_NOTIFY:
- EnableWindow(GetDlgItem(hwndDlg, IDC_AUTO_EXCHANGE), (bIsMiranda09 && IsDlgButtonChecked(hwndDlg, IDC_JABBER_API)));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_AUTO_EXCHANGE), IsDlgButtonChecked(hwndDlg, IDC_JABBER_API));
if (hdr && IsWindowVisible(hdr->hdr.hwndFrom) && hdr->iItem != (-1)) {
if (hdr->hdr.code == NM_CLICK)
item_num = hdr->iItem;