summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2013-04-05 17:53:29 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2013-04-05 17:53:29 +0000
commit43b2c1ada4ff0cfa2d915f888d61a498d05a683f (patch)
tree58963f29ba725a2ff58d733b24da85c8eab3ceed
parentc39f6421ba871c4ffa501ef83bf2a8eb93c44a01 (diff)
- Added ability to open chat window after adding contact (patch from Robyer)
git-svn-id: http://svn.miranda-ng.org/main/trunk@4321 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--src/modules/addcontact/addcontact.cpp6
-rw-r--r--src/resource.h3
-rw-r--r--src/resource.rc29
3 files changed, 22 insertions, 16 deletions
diff --git a/src/modules/addcontact/addcontact.cpp b/src/modules/addcontact/addcontact.cpp
index f8a755f9ce..30875f70fc 100644
--- a/src/modules/addcontact/addcontact.cpp
+++ b/src/modules/addcontact/addcontact.cpp
@@ -102,9 +102,10 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp
SendDlgItemMessage(hdlg, IDC_GROUP, CB_SETCURSEL, 0, 0);
/* acs->szProto may be NULL don't expect it */
{
- // By default check both checkboxes
+ // By default check all checkboxes
CheckDlgButton(hdlg, IDC_ADDED, BST_CHECKED);
CheckDlgButton(hdlg, IDC_AUTH, BST_CHECKED);
+ CheckDlgButton(hdlg, IDC_OPEN_WINDOW, BST_CHECKED);
DWORD flags = (acs->szProto) ? CallProtoServiceInt(NULL,acs->szProto, PS_GETCAPS, PFLAGNUM_4, 0) : 0;
if (flags&PF4_FORCEADDED) { // force you were added requests for this protocol
@@ -196,6 +197,9 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp
CallContactService(hContact, PSS_AUTHREQUESTT, 0, (LPARAM)szReason);
}
}
+
+ if (IsDlgButtonChecked(hdlg, IDC_OPEN_WINDOW))
+ CallService(MS_CLIST_CONTACTDOUBLECLICKED, (WPARAM)hContact, 0);
}
// fall through
case IDCANCEL:
diff --git a/src/resource.h b/src/resource.h
index f4e9c8192d..c6e2c4c3b8 100644
--- a/src/resource.h
+++ b/src/resource.h
@@ -406,6 +406,7 @@
#define IDC_GROUP 1541
#define IDC_ADDED 1542
#define IDC_AUTH 1543
+#define IDC_OPEN_WINDOW 1544
#define IDC_DELETEHISTORY 1560
#define IDC_AUTHREQ 1577
#define IDC_AUTHGB 1578
@@ -534,7 +535,7 @@
#define ID_UNGROUP 40067
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 323
diff --git a/src/resource.rc b/src/resource.rc
index 4896768f89..fc0e7b0ff9 100644
--- a/src/resource.rc
+++ b/src/resource.rc
@@ -40,23 +40,24 @@ BEGIN
PUSHBUTTON "Cancel",IDCANCEL,148,98,50,14
END
-IDD_ADDCONTACT DIALOGEX 0, 0, 230, 151
+IDD_ADDCONTACT DIALOGEX 0, 0, 230, 156
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 %s"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
- DEFPUSHBUTTON "&Add",IDOK,20,130,72,14
- PUSHBUTTON "&Cancel",IDCANCEL,139,130,71,14
+ DEFPUSHBUTTON "&Add",IDOK,20,135,72,14
+ PUSHBUTTON "&Cancel",IDCANCEL,139,135,71,14
EDITTEXT IDC_MYHANDLE,6,16,90,12,ES_AUTOHSCROLL
COMBOBOX IDC_GROUP,112,16,110,60,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
- CONTROL "Send ""You were added""",IDC_ADDED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,46,204,10
- CONTROL "Send authorization request",IDC_AUTH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,60,204,10
+ CONTROL "Send ""You were added""",IDC_ADDED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,44,204,10
+ CONTROL "Send authorization request",IDC_AUTH,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,56,204,10
+ CONTROL "Open contact's chat window",IDC_OPEN_WINDOW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,68,204,10
LTEXT "Custom name:",IDC_STATIC,6,4,70,10
LTEXT "Group:",IDC_STATIC,112,4,70,10
- GROUPBOX "Options",IDC_STATIC,7,33,216,43
- GROUPBOX "Authorization Request",IDC_AUTHGB,7,79,216,45
- EDITTEXT IDC_AUTHREQ,13,89,204,29,ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN | WS_VSCROLL
+ GROUPBOX "Options",IDC_STATIC,7,33,216,48
+ GROUPBOX "Authorization Request",IDC_AUTHGB,7,84,216,45
+ EDITTEXT IDC_AUTHREQ,13,95,204,29,ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN | WS_VSCROLL
END
IDD_DELETECONTACT DIALOGEX 0, 0, 294, 93
@@ -147,7 +148,7 @@ BEGIN
PUSHBUTTON "Apply",IDC_APPLY,374,283,50,14
CONTROL "Tree1",IDC_PAGETREE,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | TVS_TRACKSELECT | TVS_NOHSCROLL | WS_BORDER | WS_TABSTOP,4,30,102,249
CONTROL "",IDC_TAB,"SysTabControl32",NOT WS_VISIBLE | WS_TABSTOP,111,30,313,249
- CONTROL "Switch to simple options",IDC_MODERN,"Hyperlink",WS_TABSTOP,5,284,102,10,32
+ CONTROL "Switch to simple options",IDC_MODERN,"Hyperlink",WS_TABSTOP,5,284,102,10,WS_EX_TRANSPARENT
CTEXT "Please select a subentry from the list",IDC_STNOPAGE,111,30,313,251,SS_CENTERIMAGE
END
@@ -164,7 +165,7 @@ BEGIN
PUSHBUTTON "Cancel",IDCANCEL,212,283,50,14
PUSHBUTTON "Apply",IDC_APPLY,267,283,50,14
CONTROL "",IDC_TAB,"SysTabControl32",NOT WS_VISIBLE | WS_TABSTOP,4,32,313,249
- CONTROL "Switch to simple options",IDC_MODERN,"Hyperlink",WS_TABSTOP,347,254,62,10,32
+ CONTROL "Switch to simple options",IDC_MODERN,"Hyperlink",WS_TABSTOP,347,254,62,10,WS_EX_TRANSPARENT
CTEXT "Please select a subentry from the list",IDC_STNOPAGE,4,30,313,251,SS_CENTERIMAGE
CONTROL "",IDC_PAGETREE,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP | TVS_SHOWSELALWAYS | TVS_TRACKSELECT | TVS_NOHSCROLL | NOT WS_VISIBLE | WS_BORDER | WS_TABSTOP,347,86,52,137
END
@@ -736,7 +737,7 @@ BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 223
TOPMARGIN, 7
- BOTTOMMARGIN, 144
+ BOTTOMMARGIN, 149
END
IDD_DELETECONTACT, DIALOG
@@ -987,12 +988,12 @@ END
// TEXTINCLUDE
//
-1 TEXTINCLUDE
+1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
-2 TEXTINCLUDE
+2 TEXTINCLUDE
BEGIN
"#include <windows.h>\r\n"
"#include <winres.h>\r\n"
@@ -1000,7 +1001,7 @@ BEGIN
"\0"
END
-3 TEXTINCLUDE
+3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"