diff options
author | George Hazan <george.hazan@gmail.com> | 2014-03-05 19:43:48 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-03-05 19:43:48 +0000 |
commit | 8a712adf1f95f613a1b1fdca761bcda6f9973b78 (patch) | |
tree | aa521c73061a5af4cfd5d09c1b4ee9241b04ad89 /src/modules/metacontacts | |
parent | 630fb7d1cee2f0f0eb4ed2bbb21ff771a5b92fa6 (diff) |
minor fixes for mc dialogs
git-svn-id: http://svn.miranda-ng.org/main/trunk@8420 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/metacontacts')
-rw-r--r-- | src/modules/metacontacts/meta_addto.cpp | 3 | ||||
-rw-r--r-- | src/modules/metacontacts/meta_edit.cpp | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/modules/metacontacts/meta_addto.cpp b/src/modules/metacontacts/meta_addto.cpp index 4c79f3f268..d411c32aff 100644 --- a/src/modules/metacontacts/meta_addto.cpp +++ b/src/modules/metacontacts/meta_addto.cpp @@ -161,6 +161,9 @@ static INT_PTR CALLBACK Meta_SelectDialogProc(HWND hwndDlg, UINT msg, WPARAM wPa return TRUE;
case WM_COMMAND:
+ if (HIWORD(wParam) == LBN_DBLCLK) // emulate click ok Ok
+ wParam = MAKEWPARAM(IDOK, BN_CLICKED);
+
if (HIWORD(wParam) != BN_CLICKED)
break; // Only clicks of buttons are relevant, let other COMMANDs through
diff --git a/src/modules/metacontacts/meta_edit.cpp b/src/modules/metacontacts/meta_edit.cpp index f5e694f7dc..409d2d8d97 100644 --- a/src/modules/metacontacts/meta_edit.cpp +++ b/src/modules/metacontacts/meta_edit.cpp @@ -66,6 +66,8 @@ static void FillContactList(HWND hWndDlg) LvItem.iSubItem = 1; // id
char *szProto = GetContactProto(g_data.hContact[i]);
if (szProto) {
+ PROTOACCOUNT *pa = ProtoGetAccount(szProto);
+
char *szField = (char *)CallProtoService(szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
DBVARIANT dbv;
@@ -97,11 +99,11 @@ static void FillContactList(HWND hWndDlg) SendMessage(hList, LVM_SETITEM, 0, (LPARAM)&LvItem); // Enter text to SubItems
LvItem.iSubItem = 2; // protocol
- _tcsncpy(buff, _A2T(szProto), SIZEOF(buff));
+ _tcsncpy_s(buff, SIZEOF(buff), (pa == NULL) ? _A2T(szProto) : pa->tszAccountName, _TRUNCATE);
ListView_SetItem(hList, &LvItem);
}
else {
- LvItem.pszText = _T("Unknown");
+ LvItem.pszText = TranslateT("Unknown");
ListView_SetItem(hList, &LvItem);
LvItem.iSubItem = 2; // protocol
@@ -237,7 +239,7 @@ static INT_PTR CALLBACK Meta_EditDialogProc(HWND hwndDlg, UINT msg, WPARAM wPara LvCol.mask = LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM;
LvCol.pszText = TranslateT("Contact");
- LvCol.cx = 100;
+ LvCol.cx = 150;
ListView_InsertColumn(hwnd, 0, &LvCol);
LvCol.pszText = TranslateT("ID");
|