diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-04-16 20:12:09 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-04-16 20:12:09 +0000 |
commit | eb9fd10e43ea31ecaea55e5e22252fc59c23f108 (patch) | |
tree | 1e084adecf6ba7c2bfdf724914597d2c7af20667 /plugins | |
parent | 47482deb9eebd316a4caf6635c75636dfe88eebb (diff) |
MirOTR:
-support for account names
git-svn-id: http://svn.miranda-ng.org/main/trunk@12877 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/MirOTR/res/resource.rc | 90 | ||||
-rw-r--r-- | plugins/MirOTR/src/language.h | 10 | ||||
-rw-r--r-- | plugins/MirOTR/src/options.cpp | 38 | ||||
-rw-r--r-- | plugins/MirOTR/src/resource.h | 119 | ||||
-rw-r--r-- | plugins/MirOTR/src/utils.cpp | 2 |
5 files changed, 134 insertions, 125 deletions
diff --git a/plugins/MirOTR/res/resource.rc b/plugins/MirOTR/res/resource.rc index 970a46a8c5..dbd66d1a7c 100644 --- a/plugins/MirOTR/res/resource.rc +++ b/plugins/MirOTR/res/resource.rc @@ -48,7 +48,7 @@ BEGIN ICON IDI_REFRESH,IDC_ICOREFRESH,237,0,20,20,SS_CENTERIMAGE
END
-IDD_OPT_GENERAL DIALOGEX 0, 0, 296, 220
+IDD_OPT_GENERAL DIALOGEX 0, 0, 302, 184
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
@@ -58,58 +58,58 @@ BEGIN CONTROL "Opportunistic",IDC_RAD_OPP,"Button",BS_AUTORADIOBUTTON,12,24,126,10
CONTROL "Manual",IDC_RAD_MANUAL,"Button",BS_AUTORADIOBUTTON,12,36,126,10
CONTROL "Never",IDC_RAD_NEVER,"Button",BS_AUTORADIOBUTTON,12,48,126,10
- CONTROL "End sessions on window close",IDC_CHK_ENDCLOSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,70,265,10
+ CONTROL "End sessions on window close",IDC_CHK_ENDCLOSE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,70,278,10
CONTROL "End sessions when contacts go offline",IDC_CHK_ENDOFFLINE,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,82,265,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,82,278,10
CONTROL "Prefix encrypted IMs:",IDC_CHK_PREFIX,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,94,108,10
- EDITTEXT IDC_ED_PREFIX,120,93,159,12,ES_AUTOHSCROLL | NOT WS_BORDER,WS_EX_CLIENTEDGE
- LTEXT "don't rely on the prefix, always check the OTR status icon",IDC_STATIC,23,106,271,8,SS_LEFT
+ EDITTEXT IDC_ED_PREFIX,131,93,159,12,ES_AUTOHSCROLL | NOT WS_BORDER,WS_EX_CLIENTEDGE
+ LTEXT "don't rely on the prefix, always check the OTR status icon",IDC_STATIC,23,106,267,8
CONTROL "Don't add encrypted messages to the history",IDC_CHK_PREVENTSAVE,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,118,265,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,118,278,10
CONTROL "Also remove OTR system messages",IDC_CHK_PREVENTSYSSAVE,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,130,245,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,23,130,267,10
CONTROL "Show OTR system messages inline",IDC_CHK_MSGINLINE,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,142,265,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,142,278,10
CONTROL "Show OTR system messages as popup",IDC_CHK_MSGPOPUP,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,154,265,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,154,278,10
CONTROL "Show verification dialog when receiving unverified fingerprint",IDC_CHK_AUTOSHOW_VERIFY,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,175,265,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,168,278,10
END
-IDD_OPT_PROTO DIALOGEX 0, 0, 296, 220
+IDD_OPT_PROTO DIALOGEX 0, 0, 296, 226
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
LTEXT "Set OTR policy per protocol",IDC_STC_PROTO1,3,3,291,12,SS_NOPREFIX | NOT WS_GROUP
- CONTROL "",IDC_LV_PROTO_PROTOS,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP,0,18,296,165
- LTEXT "Current policy:",IDC_STC_PROTO2,3,189,138,9,SS_NOPREFIX | NOT WS_GROUP
- COMBOBOX IDC_CMB_PROTO_POLICY,3,201,138,12,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_TABSTOP
- PUSHBUTTON "Generate new private key",IDC_BTN_PROTO_NEWKEY,162,186,123,18
- PUSHBUTTON "Forget private key",IDC_BTN_PROTO_FORGET,162,207,123,12
+ CONTROL "",IDC_LV_PROTO_PROTOS,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP,0,18,296,170
+ LTEXT "Current policy:",IDC_STC_PROTO2,3,193,152,9,SS_NOPREFIX | NOT WS_GROUP
+ COMBOBOX IDC_CMB_PROTO_POLICY,3,206,152,12,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_TABSTOP
+ PUSHBUTTON "Generate new private key",IDC_BTN_PROTO_NEWKEY,162,190,123,18
+ PUSHBUTTON "Forget private key",IDC_BTN_PROTO_FORGET,162,211,123,12
END
-IDD_OPT_CONTACTS DIALOGEX 0, 0, 296, 220
+IDD_OPT_CONTACTS DIALOGEX 0, 0, 296, 223
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
LTEXT "Set OTR policy per contact",IDC_STC_CONT1,3,3,291,12,SS_NOPREFIX | NOT WS_GROUP
- CONTROL "",IDC_LV_CONT_CONTACTS,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP,0,18,296,180
- LTEXT "Current policy:",IDC_STC_CONT2,3,204,129,9,SS_NOPREFIX | NOT WS_GROUP
- COMBOBOX IDC_CMB_CONT_POLICY,138,201,153,12,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_TABSTOP
+ CONTROL "",IDC_LV_CONT_CONTACTS,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP,0,18,296,184
+ RTEXT "Current policy:",IDC_STC_CONT2,3,209,129,9,SS_NOPREFIX | NOT WS_GROUP
+ COMBOBOX IDC_CMB_CONT_POLICY,137,207,153,12,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_TABSTOP
END
-IDD_OPT_FINGER DIALOGEX 0, 0, 296, 220
+IDD_OPT_FINGER DIALOGEX 0, 0, 296, 226
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_VISIBLE
EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
LTEXT "View & Modify status of known fingerprints",IDC_STC_FINGER1,3,3,291,12,SS_NOPREFIX | NOT WS_GROUP
- CONTROL "",IDC_LV_FINGER_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP,0,18,296,171
- PUSHBUTTON "Set verified",IDC_BTN_FINGER_TRUST,3,195,66,18
- PUSHBUTTON "Set unknown",IDC_BTN_FINGER_DONTTRUST,72,195,66,18
- PUSHBUTTON "Forget",IDC_BTN_FINGER_FORGET,225,195,66,18
+ CONTROL "",IDC_LV_FINGER_LIST,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_SORTASCENDING | WS_BORDER | WS_TABSTOP,0,18,296,179
+ PUSHBUTTON "Set verified",IDC_BTN_FINGER_TRUST,4,202,66,18
+ PUSHBUTTON "Set unknown",IDC_BTN_FINGER_DONTTRUST,72,202,66,18
+ PUSHBUTTON "Forget",IDC_BTN_FINGER_FORGET,225,202,66,18
END
IDD_SMP_PROGRESS DIALOGEX 10, 10, 200, 100
@@ -130,13 +130,13 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | WS_VISIBLE | WS_CAPTION | CAPTION "Socialist Millionaires Protocol"
FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
- ICON IDI_OTR,IDC_ICO_SMP,3,3,32,32,SS_CENTERIMAGE
+ ICON IDI_OTR,IDC_ICO_SMP,3,3,21,20,SS_CENTERIMAGE
LTEXT "Socialist Millionaires Protocol\r\nVerification",IDC_STC_SMP_HEAD,39,9,156,21,SS_NOPREFIX | NOT WS_GROUP
COMBOBOX IDC_CBO_SMP_CHOOSE,3,36,194,60,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_TABSTOP
- LTEXT "",IDC_STC_SMP_INFO,3,60,194,35,NOT WS_GROUP
+ LTEXT "",IDC_STC_SMP_INFO,3,60,194,49,NOT WS_GROUP
LTEXT "",IDC_STC_SMP_FIELD1,3,105,194,10,NOT WS_GROUP
EDITTEXT IDC_EDT_SMP_FIELD1,3,117,194,13,NOT WS_BORDER,WS_EX_CLIENTEDGE
- LTEXT "",IDC_STC_SMP_FIELD2,3,141,194,10,NOT WS_GROUP
+ LTEXT "",IDC_STC_SMP_FIELD2,3,134,194,17,NOT WS_GROUP
EDITTEXT IDC_EDT_SMP_FIELD2,3,153,194,13,NOT WS_BORDER,WS_EX_CLIENTEDGE
PUSHBUTTON "&Cancel",IDCANCEL,3,180,60,16
PUSHBUTTON "&OK",IDOK,135,180,60,16
@@ -202,6 +202,40 @@ BEGIN IDD_GENKEYNOTIFY, DIALOG
BEGIN
END
+
+ IDD_OPT_GENERAL, DIALOG
+ BEGIN
+ RIGHTMARGIN, 296
+ VERTGUIDE, 12
+ VERTGUIDE, 23
+ VERTGUIDE, 138
+ VERTGUIDE, 144
+ VERTGUIDE, 290
+ END
+
+ IDD_OPT_PROTO, DIALOG
+ BEGIN
+ VERTGUIDE, 3
+ VERTGUIDE, 155
+ VERTGUIDE, 162
+ VERTGUIDE, 285
+ BOTTOMMARGIN, 220
+ END
+
+ IDD_OPT_CONTACTS, DIALOG
+ BEGIN
+ BOTTOMMARGIN, 220
+ END
+
+ IDD_OPT_FINGER, DIALOG
+ BEGIN
+ BOTTOMMARGIN, 220
+ HORZGUIDE, 203
+ END
+
+ IDD_SMP_INPUT, DIALOG
+ BEGIN
+ END
END
#endif // APSTUDIO_INVOKED
diff --git a/plugins/MirOTR/src/language.h b/plugins/MirOTR/src/language.h index a64c2e0b31..64c4373251 100644 --- a/plugins/MirOTR/src/language.h +++ b/plugins/MirOTR/src/language.h @@ -47,13 +47,13 @@ #define LANG_GENERATE_KEY LPGEN("Generating new private key for protocol '%s'.\nPlease Wait...") -#define LANG_OPT_GENERAL LPGEN("General") -#define LANG_OPT_PROTO LPGEN("Protocols") -#define LANG_OPT_CONTACTS LPGEN("Contacts") -#define LANG_OPT_FINGER LPGEN("Fingerprints") +#define LANG_OPT_GENERAL LPGENT("General") +#define LANG_OPT_PROTO LPGENT("Protocols") +#define LANG_OPT_CONTACTS LPGENT("Contacts") +#define LANG_OPT_FINGER LPGENT("Fingerprints") #define LANG_CONTACT LPGEN("Contact") -#define LANG_PROTO LPGEN("Protocol") +#define LANG_PROTO LPGEN("Account") #define LANG_POLICY LPGEN("Policy") #define LANG_VERIFIED LPGEN("Verified") #define LANG_ACTIVE LPGEN("Active") diff --git a/plugins/MirOTR/src/options.cpp b/plugins/MirOTR/src/options.cpp index c1105f4bd8..aa11497927 100644 --- a/plugins/MirOTR/src/options.cpp +++ b/plugins/MirOTR/src/options.cpp @@ -110,22 +110,22 @@ extern "C" int OpenOptions(WPARAM wParam, LPARAM lParam) odp.ptszTitle = _T("OTR"); odp.flags = ODPF_BOLDGROUPS|ODPF_TCHAR; - odp.ptszTab = _T(LANG_OPT_GENERAL); + odp.ptszTab = LANG_OPT_GENERAL; odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_GENERAL); odp.pfnDlgProc = DlgProcMirOTROpts; Options_AddPage(wParam, &odp); - odp.ptszTab = _T(LANG_OPT_PROTO); + odp.ptszTab = LANG_OPT_PROTO; odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_PROTO); odp.pfnDlgProc = DlgProcMirOTROptsProto; Options_AddPage(wParam, &odp); - odp.ptszTab = _T(LANG_OPT_CONTACTS); + odp.ptszTab = LANG_OPT_CONTACTS; odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_CONTACTS); odp.pfnDlgProc = DlgProcMirOTROptsContacts; Options_AddPage(wParam, &odp); - odp.ptszTab = _T(LANG_OPT_FINGER); + odp.ptszTab = LANG_OPT_FINGER; odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_FINGER); odp.pfnDlgProc = DlgProcMirOTROptsFinger; Options_AddPage(wParam, &odp); @@ -376,12 +376,10 @@ static INT_PTR CALLBACK DlgProcMirOTROptsProto(HWND hwndDlg, UINT msg, WPARAM wP if((strcmp(pppDesc[i]->szModuleName, META_PROTO) != 0) && (CallProtoService(pppDesc[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM) == PF1_IM) { - //if (unicode) { item.mask = LVIF_TEXT; - temp = mir_a2t(pppDesc[i]->szModuleName); + temp = pppDesc[i]->tszAccountName; item.pszText = temp; ilvItem = ListView_InsertItem(lv, &item); - mir_free(temp); ListView_SetItemText(lv, ilvItem, 1, (TCHAR*)policy_to_string(db_get_dw(0,MODULENAME"_ProtoPol", pppDesc[i]->szModuleName, CONTACT_DEFAULT_POLICY)) ); @@ -557,10 +555,8 @@ static INT_PTR CALLBACK DlgProcMirOTROptsContacts(HWND hwndDlg, UINT msg, WPARAM // items. lvI.mask = LVIF_TEXT | LVIF_PARAM;// | LVIF_NORECOMPUTE;// | LVIF_IMAGE; - const char *proto; - TCHAR *proto_t; for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { - proto = GetContactProto(hContact); + const char *proto = GetContactProto(hContact); if(proto && db_get_b(hContact, proto, "ChatRoom", 0) == 0 && CallService(MS_PROTO_ISPROTOONCONTACT, hContact, (LPARAM)MODULENAME) // ignore chatrooms && strcmp(proto, META_PROTO) != 0) // and MetaContacts { @@ -570,9 +566,8 @@ static INT_PTR CALLBACK DlgProcMirOTROptsContacts(HWND hwndDlg, UINT msg, WPARAM lvI.pszText = (TCHAR*)contact_get_nameT(hContact); lvI.iItem = ListView_InsertItem(lv , &lvI); - proto_t = mir_a2t(proto); - ListView_SetItemText(lv, lvI.iItem, 1, proto_t); - mir_free(proto_t); + PROTOACCOUNT *pa = ProtoGetAccount(proto); + ListView_SetItemText(lv, lvI.iItem, 1, pa->tszAccountName); ListView_SetItemText(lv, lvI.iItem, 2, (TCHAR*)policy_to_string((OtrlPolicy)db_get_dw(hContact, MODULENAME, "Policy", CONTACT_DEFAULT_POLICY)) ); ListView_SetItemText(lv, lvI.iItem, 3, (db_get_b(hContact, MODULENAME, "HTMLConv", 0))?TranslateT(LANG_YES):TranslateT(LANG_NO) ); @@ -741,12 +736,12 @@ static INT_PTR CALLBACK DlgProcMirOTROptsFinger(HWND hwndDlg, UINT msg, WPARAM w // items. lvI.mask = LVIF_TEXT | LVIF_PARAM;// | LVIF_NORECOMPUTE;// | LVIF_IMAGE; - TCHAR *proto, *user, hash[45] = {0}; + TCHAR *user, hash[45] = {0}; for (ConnContext *context = otr_user_state->context_root;context;context = context->next) { if (context->app_data) { user = (TCHAR*)contact_get_nameT((MCONTACT)context->app_data); if (user) { - proto = mir_a2t(context->protocol); + PROTOACCOUNT *pa = ProtoGetAccount(context->protocol); for(Fingerprint *fp = context->fingerprint_root.next;fp;fp = fp->next) { otrl_privkey_hash_to_humanT(hash, fp->fingerprint); @@ -755,12 +750,11 @@ static INT_PTR CALLBACK DlgProcMirOTROptsFinger(HWND hwndDlg, UINT msg, WPARAM w lvI.pszText = user; int d = ListView_InsertItem(lv, &lvI); - ListView_SetItemText(lv,d, 1, proto); + ListView_SetItemText(lv,d, 1, pa->tszAccountName); ListView_SetItemText(lv,d, 2, (context->active_fingerprint == fp)? TranslateT(LANG_YES) : TranslateT(LANG_NO)); ListView_SetItemText(lv,d, 3, (fp->trust && fp->trust[0] != '\0')? TranslateT(LANG_YES) : TranslateT(LANG_NO)); ListView_SetItemText(lv,d, 4, hash ); } - mir_free(proto); } } } @@ -814,9 +808,8 @@ static INT_PTR CALLBACK DlgProcMirOTROptsFinger(HWND hwndDlg, UINT msg, WPARAM w MCONTACT hContact = (MCONTACT)fp->context->app_data; TCHAR buff[1024], hash[45]; otrl_privkey_hash_to_humanT(hash, fp->fingerprint); - TCHAR *proto = mir_a2t(GetContactProto(hContact)); - mir_sntprintf(buff, SIZEOF(buff)-1, TranslateT(LANG_FINGERPRINT_STILL_IN_USE), hash, contact_get_nameT(hContact), proto); - mir_free(proto); + PROTOACCOUNT *pa = ProtoGetAccount(GetContactProto(hContact)); + mir_sntprintf(buff, SIZEOF(buff)-1, TranslateT(LANG_FINGERPRINT_STILL_IN_USE), hash, contact_get_nameT(hContact), pa->tszAccountName); buff[SIZEOF(buff)-1] = '\0'; ShowError(buff); } else { @@ -847,9 +840,8 @@ static INT_PTR CALLBACK DlgProcMirOTROptsFinger(HWND hwndDlg, UINT msg, WPARAM w MCONTACT hContact = (MCONTACT)it->first->context->app_data; TCHAR buff[1024], hash[45]; otrl_privkey_hash_to_humanT(hash, it->first->fingerprint); - TCHAR *proto = mir_a2t(GetContactProto(hContact)); - mir_sntprintf(buff, SIZEOF(buff)-1, TranslateT(LANG_FINGERPRINT_NOT_DELETED), hash, contact_get_nameT(hContact), proto); - mir_free(proto); + PROTOACCOUNT *pa = ProtoGetAccount(GetContactProto(hContact)); + mir_sntprintf(buff, SIZEOF(buff)-1, TranslateT(LANG_FINGERPRINT_NOT_DELETED), hash, contact_get_nameT(hContact), pa->tszAccountName); buff[SIZEOF(buff)-1] = '\0'; ShowError(buff); } else { diff --git a/plugins/MirOTR/src/resource.h b/plugins/MirOTR/src/resource.h index 3b117f8699..6757de6f81 100644 --- a/plugins/MirOTR/src/resource.h +++ b/plugins/MirOTR/src/resource.h @@ -1,87 +1,70 @@ //{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
-// Used by resource.rc
+// Used by C:\Users\xx\Documents\Visual Studio 2010\Projects\miranda-ng\plugins\MirOTR\res\resource.rc
//
#define IDD_GENKEYNOTIFY 101
#define IDD_OPT_GENERAL 102
-#define IDD_OPT_PROTO 103
-#define IDD_OPT_CONTACTS 104
-#define IDD_OPT_FINGER 105
-#define IDD_SMP_INPUT 106
-#define IDD_SMP_PROGRESS 107
-
-// General Options
-#define IDC_GRP_POLICY 1051
+#define IDD_OPT_PROTO 103
+#define IDD_OPT_CONTACTS 104
+#define IDD_OPT_FINGER 105
+#define IDD_SMP_INPUT 106
+#define IDD_SMP_PROGRESS 107
+#define IDC_GRP_POLICY 1051
#define IDC_RAD_ALWAYS 1052
#define IDC_RAD_OPP 1053
#define IDC_RAD_MANUAL 1054
#define IDC_RAD_NEVER 1055
-
#define IDC_CHK_PREFIX 1056
#define IDC_ED_PREFIX 1057
#define IDC_CHK_MSGINLINE 1058
#define IDC_CHK_MSGPOPUP 1059
-#define IDC_CHK_PREVENTSAVE 1060
-#define IDC_CHK_AUTOSHOW_VERIFY 1061
+#define IDC_CHK_PREVENTSAVE 1060
+#define IDC_CHK_AUTOSHOW_VERIFY 1061
#define IDC_CHK_ENDOFFLINE 1063
#define IDC_CHK_ENDCLOSE 1064
-#define IDC_CHK_PREVENTSYSSAVE 1065
-
-// Proto policy & keys
-#define IDC_LV_PROTO_PROTOS 1101
-#define IDC_BTN_PROTO_NEWKEY 1102
-#define IDC_CMB_PROTO_POLICY 1103
-#define IDC_BTN_PROTO_FORGET 1104
-#define IDC_STC_PROTO1 1151
-#define IDC_STC_PROTO2 1152
-
-// User policy
-#define IDC_LV_CONT_CONTACTS 1201
-#define IDC_CMB_CONT_POLICY 1202
-#define IDC_STC_CONT1 1251
-#define IDC_STC_CONT2 1252
-
-// User fingerprints
-#define IDC_LV_FINGER_LIST 1301
-#define IDC_BTN_FINGER_FORGET 1302
-#define IDC_BTN_FINGER_TRUST 1303
-#define IDC_BTN_FINGER_DONTTRUST 1304
-#define IDC_STC_FINGER1 1351
-
-// Generate dialog
-#define IDC_GENERATE 1401
-#define IDC_ICOOTR 1402
-#define IDC_ICOREFRESH 1403
-
-// SMP Progress
-#define IDC_PGB_SMP 1501
-#define IDC_STC_SMP_HEADPRO 1502
-#define IDC_ICO_SMP 1503
-#define IDC_STC_SMP_PROGRESS 1504
-
-// SMP Dialog
-#define IDC_STC_SMP_HEAD 1602
-#define IDC_CBO_SMP_CHOOSE 1603
-#define IDC_STC_SMP_INFO 1604
-#define IDC_STC_SMP_FIELD1 1605
-#define IDC_EDT_SMP_FIELD1 1606
-#define IDC_STC_SMP_FIELD2 1607
-#define IDC_EDT_SMP_FIELD2 1608
-
-#define IDI_OTR 2000
-#define IDI_REFRESH 2001
+#define IDC_CHK_PREVENTSYSSAVE 1065
+#define IDC_LV_PROTO_PROTOS 1101
+#define IDC_BTN_PROTO_NEWKEY 1102
+#define IDC_CMB_PROTO_POLICY 1103
+#define IDC_BTN_PROTO_FORGET 1104
+#define IDC_STC_PROTO1 1151
+#define IDC_STC_PROTO2 1152
+#define IDC_LV_CONT_CONTACTS 1201
+#define IDC_CMB_CONT_POLICY 1202
+#define IDC_STC_CONT1 1251
+#define IDC_STC_CONT2 1252
+#define IDC_LV_FINGER_LIST 1301
+#define IDC_BTN_FINGER_FORGET 1302
+#define IDC_BTN_FINGER_TRUST 1303
+#define IDC_BTN_FINGER_DONTTRUST 1304
+#define IDC_STC_FINGER1 1351
+#define IDC_GENERATE 1401
+#define IDC_ICOOTR 1402
+#define IDC_ICOREFRESH 1403
+#define IDC_PGB_SMP 1501
+#define IDC_STC_SMP_HEADPRO 1502
+#define IDC_ICO_SMP 1503
+#define IDC_STC_SMP_PROGRESS 1504
+#define IDC_STC_SMP_HEAD 1602
+#define IDC_CBO_SMP_CHOOSE 1603
+#define IDC_STC_SMP_INFO 1604
+#define IDC_STC_SMP_FIELD1 1605
+#define IDC_EDT_SMP_FIELD1 1606
+#define IDC_STC_SMP_FIELD2 1607
+#define IDC_EDT_SMP_FIELD2 1608
+#define IDI_OTR 2000
+#define IDI_REFRESH 2001
#define IDI_INSECURE 2002
-#define IDI_UNVERIFIED 2003
-#define IDI_PRIVATE 2004
-#define IDI_FINISHED 2005
-
-#define IDM_OTR_MENU 10001
-#define IDR_CONTEXT 10000
-#define IDM_OTR_STATUS 10001
-#define IDM_OTR_START 10002
-#define IDM_OTR_REFRESH 10003
-#define IDM_OTR_STOP 10004
-#define IDM_OTR_VERIFY 10005
+#define IDI_UNVERIFIED 2003
+#define IDI_PRIVATE 2004
+#define IDI_FINISHED 2005
+#define IDR_CONTEXT 10000
+#define IDM_OTR_MENU 10001
+#define IDM_OTR_STATUS 10001
+#define IDM_OTR_START 10002
+#define IDM_OTR_REFRESH 10003
+#define IDM_OTR_STOP 10004
+#define IDM_OTR_VERIFY 10005
// Next default values for new objects
//
diff --git a/plugins/MirOTR/src/utils.cpp b/plugins/MirOTR/src/utils.cpp index ac72f2094b..2261b089a8 100644 --- a/plugins/MirOTR/src/utils.cpp +++ b/plugins/MirOTR/src/utils.cpp @@ -284,7 +284,7 @@ void ShowError(TCHAR *msg) { message = new TCHAR[size]; // newline and null terminator mir_sntprintf(message, size, _T("%s\r\n%s"), buffer, msg); PUShowMessageT(message, SM_WARNING); - delete message; + delete[] message; } break; case ED_MB: |