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 | |
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')
-rw-r--r-- | src/modules/metacontacts/meta_addto.cpp | 3 | ||||
-rw-r--r-- | src/modules/metacontacts/meta_edit.cpp | 8 | ||||
-rw-r--r-- | src/resource.rc | 81 |
3 files changed, 57 insertions, 35 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");
diff --git a/src/resource.rc b/src/resource.rc index a1a4b132a0..f795174a2f 100644 --- a/src/resource.rc +++ b/src/resource.rc @@ -728,24 +728,24 @@ EXSTYLE WS_EX_CONTROLPARENT FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
EDITTEXT IDC_TXT_MULTILINE,6,6,230,12,ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN | NOT WS_VISIBLE | WS_VSCROLL
- EDITTEXT IDC_TXT_PASSWORD,6,6,230,12,ES_AUTOHSCROLL | NOT WS_VISIBLE | ES_PASSWORD
+ EDITTEXT IDC_TXT_PASSWORD,6,6,230,12,ES_PASSWORD | ES_AUTOHSCROLL | NOT WS_VISIBLE
COMBOBOX IDC_TXT_COMBO,6,6,230,92,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | NOT WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
CONTROL "",IDC_TXT_RICHEDIT,"RichEdit20W",NOT WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_TABSTOP | 0x1004,6,6,230,12
DEFPUSHBUTTON "OK",IDOK,131,23,50,14
PUSHBUTTON "Cancel",IDCANCEL,186,23,50,14
END
-IDD_METASELECT DIALOGEX 0, 0, 256, 259
+IDD_METASELECT DIALOGEX 0, 0, 219, 258
STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_3DLOOK | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTROLPARENT
CAPTION "Add to Existing MetaContact"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
- CTEXT "Please select a MetaContact:",IDC_STATIC,27,11,201,14
- DEFPUSHBUTTON "&OK",IDOK,73,238,48,14
- PUSHBUTTON "&Cancel",IDCANCEL,133,238,48,14
- LISTBOX IDC_METALIST,44,28,168,168,LBS_NOINTEGRALHEIGHT | WS_VSCROLL
- CONTROL "Sort Alphabetically",IDC_CHK_SRT,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,78,210,124,13
+ CTEXT "Please select a MetaContact:",IDC_STATIC,5,4,207,8
+ DEFPUSHBUTTON "&OK",IDOK,115,241,48,14
+ PUSHBUTTON "&Cancel",IDCANCEL,167,241,48,14
+ LISTBOX IDC_METALIST,4,16,211,222,LBS_NOINTEGRALHEIGHT | LBS_NOTIFY | WS_VSCROLL
+ CONTROL "Sort Alphabetically",IDC_CHK_SRT,"Button",BS_AUTOCHECKBOX | BS_VCENTER | WS_TABSTOP,6,244,104,8
END
IDD_METAEDIT DIALOGEX 0, 0, 383, 260
@@ -754,21 +754,21 @@ EXSTYLE WS_EX_STATICEDGE CAPTION "Editing"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
- DEFPUSHBUTTON "&OK",IDOK,106,241,50,14
- PUSHBUTTON "&Cancel",IDCANCEL,166,241,50,14
- LTEXT "Name:",IDC_STATIC,108,26,42,8
- GROUPBOX "Information",IDC_STATIC,5,4,373,45
- GROUPBOX "Contacts",IDC_FRAME,5,54,373,180
- PUSHBUTTON "&Apply",IDC_VALIDATE,226,241,50,14
- DEFPUSHBUTTON "&Remove",IDC_BTN_REM,53,181,50,14
- PUSHBUTTON "&Set as Default",IDC_BTN_SETDEFAULT,107,181,50,14
- PUSHBUTTON "Move &Up",IDC_BTN_UP,224,181,50,14
- PUSHBUTTON "Move &Down",IDC_BTN_DOWN,279,181,50,14
- EDITTEXT IDC_ED_NAME,158,23,135,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP
- CONTROL "List1",IDC_LST_CONTACTS,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,53,79,276,89,WS_EX_CLIENTEDGE
- GROUPBOX "",IDC_STATIC,35,66,313,138
- CONTROL "Force use of default for sending (even if offline)",IDC_CHK_FORCEDEFAULT,"Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,110,215,209,10
- PUSHBUTTON "Send &Offline",IDC_BTN_SETOFFLINE,161,181,50,14
+ DEFPUSHBUTTON "&OK",IDOK,220,241,50,14
+ PUSHBUTTON "&Cancel",IDCANCEL,274,241,50,14
+ LTEXT "Name:",IDC_STATIC,79,17,51,8
+ GROUPBOX "Information",IDC_STATIC,4,4,375,29
+ GROUPBOX "Contacts",IDC_FRAME,4,33,375,202
+ PUSHBUTTON "&Apply",IDC_VALIDATE,328,241,50,14
+ DEFPUSHBUTTON "&Remove",IDC_BTN_REM,107,216,50,14
+ PUSHBUTTON "&Set as Default",IDC_BTN_SETDEFAULT,161,216,50,14
+ PUSHBUTTON "Move &Up",IDC_BTN_UP,269,216,50,14
+ PUSHBUTTON "Move &Down",IDC_BTN_DOWN,323,216,50,14
+ EDITTEXT IDC_ED_NAME,138,15,183,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP
+ CONTROL "List1",IDC_LST_CONTACTS,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,10,43,363,169,WS_EX_CLIENTEDGE
+ CONTROL "Force use of default for sending (even if offline)",IDC_CHK_FORCEDEFAULT,
+ "Button",BS_AUTOCHECKBOX | BS_LEFT | WS_TABSTOP,4,243,213,10
+ PUSHBUTTON "Send &Offline",IDC_BTN_SETOFFLINE,215,216,50,14
END
IDD_METAOPTIONS DIALOGEX 0, 0, 298, 178
@@ -776,10 +776,13 @@ STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_CHILD EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
- CONTROL "Set default contact on receipt of message",IDC_CHK_SETDEFAULTRECV,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,9,290,10
- CONTROL "Always send to default contact if not offline",IDC_CHK_ALWAYSUSEDEFAULT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,31,290,10
+ CONTROL "Set default contact on receipt of message",IDC_CHK_SETDEFAULTRECV,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,9,290,10
+ CONTROL "Always send to default contact if not offline",IDC_CHK_ALWAYSUSEDEFAULT,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,31,290,10
GROUPBOX "Options",IDC_STATIC,0,0,297,178
- CONTROL "Suppress status notification for subcontacts",IDC_CHK_SUPPRESSSTATUS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,42,290,10
+ CONTROL "Suppress status notification for subcontacts",IDC_CHK_SUPPRESSSTATUS,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,42,290,10
GROUPBOX "Context Menu",IDC_STATIC,4,79,289,58
CONTROL "Use contact's unique ID",IDC_RAD_UID,"Button",BS_AUTORADIOBUTTON | WS_GROUP,13,100,112,10
CONTROL "Use contact's display name",IDC_RAD_DID,"Button",BS_AUTORADIOBUTTON | WS_GROUP,13,114,112,10
@@ -791,13 +794,15 @@ BEGIN GROUPBOX "Contact List",IDC_STATIC,4,139,289,33,WS_GROUP
CONTROL "Display subcontact nickname",IDC_RAD_NICK,"Button",BS_AUTORADIOBUTTON | WS_GROUP,9,149,144,10
CONTROL "Display subcontact display name",IDC_RAD_NAME,"Button",BS_AUTORADIOBUTTON | WS_GROUP,9,160,144,10
- CONTROL "Use subcontact message windows",IDC_CHK_SUBWINDOW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,64,155,10
+ CONTROL "Use subcontact message windows",IDC_CHK_SUBWINDOW,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,4,64,155,10
CONTROL "Copy subcontact data",IDC_CHK_COPYDATA,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,162,64,133,10
CONTROL "Lock name to first contact",IDC_CHK_LOCKHANDLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,173,155,115,10
- CONTROL "but only for the current conversation",IDC_CHK_TEMPDEFAULT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,20,260,10
+ CONTROL "but only for the current conversation",IDC_CHK_TEMPDEFAULT,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,20,260,10
END
-IDD_METACOPYPROGRESS DIALOG 0, 0, 186, 90
+IDD_METACOPYPROGRESS DIALOG 0, 0, 186, 90
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION
CAPTION "History Copy"
FONT 8, "MS Shell Dlg"
@@ -806,7 +811,7 @@ BEGIN CTEXT "Please wait while the contact's history is copied.",IDC_STATIC,3,27,182,8
END
-IDD_METADELPROGRESS DIALOG 0, 0, 186, 90
+IDD_METADELPROGRESS DIALOG 0, 0, 186, 90
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION
CAPTION "History Remove"
FONT 8, "MS Shell Dlg"
@@ -838,14 +843,18 @@ STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_CHILD EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- CONTROL "Copy subcontact history to MetaContact when creating or adding",IDC_CHK_COPYHISTORY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,23,258,10
+ CONTROL "Copy subcontact history to MetaContact when creating or adding",IDC_CHK_COPYHISTORY,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,23,258,10
RTEXT "Number of days to copy (0=all):",IDC_STATIC,13,37,125,8
EDITTEXT IDC_ED_DAYS,158,35,31,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
- CONTROL "Keep MetaContact history synchronized with subcontacts",IDC_CHK_METAHISTORY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,60,258,10
- CONTROL "Keep subcontact history synchronized with MetaContact",IDC_CHK_SUBHISTORY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,78,258,10
+ CONTROL "Keep MetaContact history synchronized with subcontacts",IDC_CHK_METAHISTORY,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,60,258,10
+ CONTROL "Keep subcontact history synchronized with MetaContact",IDC_CHK_SUBHISTORY,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,13,78,258,10
GROUPBOX "History (** beware - change at your own risk **)",IDC_STATIC,7,7,273,95,WS_GROUP
END
+
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
@@ -1100,6 +1109,14 @@ BEGIN TOPMARGIN, 1
BOTTOMMARGIN, 228
END
+
+ IDD_METASELECT, DIALOG
+ BEGIN
+ END
+
+ IDD_METAEDIT, DIALOG
+ BEGIN
+ END
END
#endif // APSTUDIO_INVOKED
|