diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-09-26 19:39:06 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-09-26 19:39:06 +0000 |
commit | 1e18e387585638249e7306a46aad1f488688f1e8 (patch) | |
tree | 046599ed7e951fe54bbc88458df749b4fbfd1dc0 /protocols/Skype/src | |
parent | c797252e7c2829291a43301bf8d1c9485c95f888 (diff) |
fixed files structure
git-svn-id: http://svn.miranda-ng.org/main/trunk@1673 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src')
-rw-r--r-- | protocols/Skype/src/resource.h | bin | 1262 -> 1352 bytes | |||
-rw-r--r-- | protocols/Skype/src/skype_dialogs.cpp | 72 |
2 files changed, 72 insertions, 0 deletions
diff --git a/protocols/Skype/src/resource.h b/protocols/Skype/src/resource.h Binary files differindex 2c0229ac79..15fc20a911 100644 --- a/protocols/Skype/src/resource.h +++ b/protocols/Skype/src/resource.h diff --git a/protocols/Skype/src/skype_dialogs.cpp b/protocols/Skype/src/skype_dialogs.cpp new file mode 100644 index 0000000000..806843cd86 --- /dev/null +++ b/protocols/Skype/src/skype_dialogs.cpp @@ -0,0 +1,72 @@ +#include "skype_proto.h"
+
+INT_PTR CALLBACK CSkypeProto::SkypeAccountProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
+{
+ CSkypeProto *proto;
+
+ switch ( message )
+ {
+ case WM_INITDIALOG:
+ TranslateDialogDefault(hwnd);
+
+ proto = reinterpret_cast<CSkypeProto*>(lparam);
+ SetWindowLongPtr(hwnd, GWLP_USERDATA, lparam);
+
+ DBVARIANT dbv;
+ if ( !DBGetContactSettingString(0, proto->ModuleName(), "SkypeName", &dbv))
+ {
+ SetDlgItemText(hwnd, IDC_SN, dbv.ptszVal);
+ DBFreeVariant(&dbv);
+ }
+
+ if ( !DBGetContactSettingString(0, proto->ModuleName(), "Password", &dbv))
+ {
+ CallService(
+ MS_DB_CRYPT_DECODESTRING,
+ wcslen(dbv.ptszVal) + 1,
+ reinterpret_cast<LPARAM>(dbv.ptszVal));
+ SetDlgItemText(hwnd, IDC_PW, dbv.ptszVal);
+ DBFreeVariant(&dbv);
+ }
+
+ if ( !proto->IsOffline())
+ {
+ SendMessage(GetDlgItem(hwnd, IDC_SN), EM_SETREADONLY, 1, 0);
+ SendMessage(GetDlgItem(hwnd, IDC_PW), EM_SETREADONLY, 1, 0);
+ }
+
+ return TRUE;
+
+ case WM_COMMAND:
+ if (HIWORD(wparam) == EN_CHANGE && reinterpret_cast<HWND>(lparam) == GetFocus())
+ {
+ switch(LOWORD(wparam))
+ {
+ case IDC_SN:
+ case IDC_PW:
+ SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
+ }
+ }
+ break;
+
+ case WM_NOTIFY:
+ if (reinterpret_cast<NMHDR*>(lparam)->code == PSN_APPLY)
+ {
+ proto = reinterpret_cast<CSkypeProto*>(GetWindowLongPtr(hwnd, GWLP_USERDATA));
+ TCHAR str[128];
+
+ GetDlgItemText(hwnd, IDC_SN, str, sizeof(str));
+ DBWriteContactSettingTString(0, proto->ModuleName(), "SkypeName", str);
+
+ GetDlgItemText(hwnd, IDC_PW, str, sizeof(str));
+ CallService(MS_DB_CRYPT_ENCODESTRING, sizeof(str), reinterpret_cast<LPARAM>(str));
+ DBWriteContactSettingTString(0, proto->ModuleName(), "Password", str);
+
+ return TRUE;
+ }
+ break;
+
+ }
+
+ return FALSE;
+}
\ No newline at end of file |