From 1e18e387585638249e7306a46aad1f488688f1e8 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Wed, 26 Sep 2012 19:39:06 +0000 Subject: fixed files structure git-svn-id: http://svn.miranda-ng.org/main/trunk@1673 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Skype/Skype.aps | Bin 34240 -> 0 bytes protocols/Skype/Skype.rc | Bin 4360 -> 0 bytes protocols/Skype/Skype.vcxproj | 22 ++++------- protocols/Skype/Skype.vcxproj.filters | 5 +-- protocols/Skype/res/Resource.rc | 17 +++++++- protocols/Skype/skype_dialogs.cpp | 72 ---------------------------------- protocols/Skype/src/resource.h | Bin 1262 -> 1352 bytes protocols/Skype/src/skype_dialogs.cpp | 72 ++++++++++++++++++++++++++++++++++ 8 files changed, 97 insertions(+), 91 deletions(-) delete mode 100644 protocols/Skype/Skype.aps delete mode 100644 protocols/Skype/Skype.rc delete mode 100644 protocols/Skype/skype_dialogs.cpp create mode 100644 protocols/Skype/src/skype_dialogs.cpp diff --git a/protocols/Skype/Skype.aps b/protocols/Skype/Skype.aps deleted file mode 100644 index f7b328f63e..0000000000 Binary files a/protocols/Skype/Skype.aps and /dev/null differ diff --git a/protocols/Skype/Skype.rc b/protocols/Skype/Skype.rc deleted file mode 100644 index e7d12a3a55..0000000000 Binary files a/protocols/Skype/Skype.rc and /dev/null differ diff --git a/protocols/Skype/Skype.vcxproj b/protocols/Skype/Skype.vcxproj index 60c68ca29e..5fd7ff3d49 100644 --- a/protocols/Skype/Skype.vcxproj +++ b/protocols/Skype/Skype.vcxproj @@ -45,14 +45,12 @@ - NotUsing Level3 Disabled WIN32;_DEBUG;_WINDOWS;_USRDLL;SKYPE_EXPORTS;%(PreprocessorDefinitions) ..\..\include;..\..\plugins\ExternalAPI;..\..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\src\api;..\..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\src\ipc;..\..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\src\types;..\..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\src\platform\threading;..\..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\src\platform\threading\win;..\..\..\SkypeKit\SDK\ipc\cpp;..\..\..\SkypeKit\SDK\ipc\cpp\VideoBuffers;..\..\..\SkypeKit\SDK\ipc\cpp\platform\se;..\..\..\SkypeKit\SDK\ipc\cpp\ssl\cyassl\include;..\..\..\SkypeKit\SDK\ipc\cpp\ssl\cyassl\include\openssl;..\..\..\SkypeKit\SDK\ipc\cpp\ssl\cyassl\ctaocrypt\include;%(AdditionalIncludeDirectories) false true - skype.h 4996;%(DisableSpecificWarnings) MultiThreadedDebugDLL @@ -64,6 +62,8 @@ Ws2_32.lib;Advapi32.lib;skypekit-cyassl_lib.lib;skypekit-cppwrapper_2_lib.lib;%(AdditionalDependencies) + false + /PDBALTPATH:%_PDB% %(AdditionalOptions) _DEBUG;%(PreprocessorDefinitions) @@ -73,13 +73,11 @@ Level3 - Use Full true true WIN32;NDEBUG;_WINDOWS;_USRDLL;SKYPE_EXPORTS;%(PreprocessorDefinitions) - ..\..\include;..\..\plugins\ExternalAPI;..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\src\api;..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\src\ipc;..\..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\src\types;..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\src\platform\threading;..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\src\platform\threading\win;..\..\SkypeKit\SDK\ipc\cpp;..\..\SkypeKit\SDK\ipc\cpp\VideoBuffers;..\..\SkypeKit\SDK\ipc\cpp\platform\se;..\..\SkypeKit\SDK\ipc\cpp\ssl\cyassl\include;..\..\SkypeKit\SDK\ipc\cpp\ssl\cyassl\include\openssl;..\..\SkypeKit\SDK\ipc\cpp\ssl\cyassl\ctaocrypt\include;%(AdditionalIncludeDirectories) - skype.h + ..\..\include;..\..\plugins\ExternalAPI;..\..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\src\api;..\..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\src\ipc;..\..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\src\types;..\..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\src\platform\threading;..\..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\src\platform\threading\win;..\..\..\SkypeKit\SDK\ipc\cpp;..\..\..\SkypeKit\SDK\ipc\cpp\VideoBuffers;..\..\..\SkypeKit\SDK\ipc\cpp\platform\se;..\..\..\SkypeKit\SDK\ipc\cpp\ssl\cyassl\include;..\..\..\SkypeKit\SDK\ipc\cpp\ssl\cyassl\include\openssl;..\..\..\SkypeKit\SDK\ipc\cpp\ssl\cyassl\ctaocrypt\include;%(AdditionalIncludeDirectories) 4996;%(DisableSpecificWarnings) @@ -89,7 +87,9 @@ true false /PDBALTPATH:%_PDB% - $(SolutionDir)..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\build\skypekit-cyassl_lib.lib;$(SolutionDir)..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\build\skypekit-cppwrapper_2_lib.lib;%(AdditionalDependencies) + Ws2_32.lib;Advapi32.lib;skypekit-cyassl_lib.lib;skypekit-cppwrapper_2_lib.lib;%(AdditionalDependencies) + $(SolutionDir)\lib;$(SolutionDir)..\..\SkypeKit\SDK\interfaces\skype\cpp_embedded\build + $(IntDir)$(TargetName).lib NDEBUG;%(PreprocessorDefinitions) @@ -103,20 +103,14 @@ - - - Create - Create - + + - - - diff --git a/protocols/Skype/Skype.vcxproj.filters b/protocols/Skype/Skype.vcxproj.filters index 138978ca58..c23255e856 100644 --- a/protocols/Skype/Skype.vcxproj.filters +++ b/protocols/Skype/Skype.vcxproj.filters @@ -7,7 +7,7 @@ Source Files - + Source Files @@ -29,9 +29,6 @@ Resource Filess - - Resource Filess - Resource Filess diff --git a/protocols/Skype/res/Resource.rc b/protocols/Skype/res/Resource.rc index a2f8782770..0c49fc03d2 100644 --- a/protocols/Skype/res/Resource.rc +++ b/protocols/Skype/res/Resource.rc @@ -33,6 +33,15 @@ IDI_ICON ICON "Main.ico" // Dialog // +IDD_SKYPEACCOUNT DIALOGEX 0, 0, 199, 92 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_SYSMENU +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "Skype name:",IDC_STATIC,7,7,53,12 + EDITTEXT IDC_SN,61,7,131,12,ES_AUTOHSCROLL + LTEXT "Password:",IDC_STATIC,7,23,53,12 + EDITTEXT IDC_PW,61,23,131,12,ES_PASSWORD | ES_AUTOHSCROLL +END #ifdef APSTUDIO_INVOKED @@ -69,7 +78,13 @@ END #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO BEGIN - + IDD_SKYPEACCOUNT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 192 + TOPMARGIN, 7 + BOTTOMMARGIN, 85 + END END #endif // APSTUDIO_INVOKED diff --git a/protocols/Skype/skype_dialogs.cpp b/protocols/Skype/skype_dialogs.cpp deleted file mode 100644 index dc8daf2b1b..0000000000 --- a/protocols/Skype/skype_dialogs.cpp +++ /dev/null @@ -1,72 +0,0 @@ -#include "src\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(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(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(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(lparam)->code == PSN_APPLY) - { - proto = reinterpret_cast(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(str)); - DBWriteContactSettingTString(0, proto->ModuleName(), "Password", str); - - return TRUE; - } - break; - - } - - return FALSE; -} \ No newline at end of file diff --git a/protocols/Skype/src/resource.h b/protocols/Skype/src/resource.h index 2c0229ac79..15fc20a911 100644 Binary files a/protocols/Skype/src/resource.h and b/protocols/Skype/src/resource.h differ 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(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(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(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(lparam)->code == PSN_APPLY) + { + proto = reinterpret_cast(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(str)); + DBWriteContactSettingTString(0, proto->ModuleName(), "Password", str); + + return TRUE; + } + break; + + } + + return FALSE; +} \ No newline at end of file -- cgit v1.2.3