diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-08-07 16:00:02 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-08-07 16:00:02 +0000 |
commit | a1f4c0621436e68af9c12a63df0b6449b0f96e22 (patch) | |
tree | f1b0350e70b918b9a25452aa1288cb60e2f7c17a /protocols/Skype | |
parent | 940b761b023eba93d9d605e75a3216ba5d023dad (diff) |
resource update
git-svn-id: http://svn.miranda-ng.org/main/trunk@5612 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype')
-rw-r--r-- | protocols/Skype/res/Resource.rc | 34 | ||||
-rw-r--r-- | protocols/Skype/src/resource.h | 8 | ||||
-rw-r--r-- | protocols/Skype/src/skype.cpp | 6 | ||||
-rw-r--r-- | protocols/Skype/src/skype_runtime.cpp | 84 |
4 files changed, 75 insertions, 57 deletions
diff --git a/protocols/Skype/res/Resource.rc b/protocols/Skype/res/Resource.rc index 185b9438b7..230bdc5fde 100644 --- a/protocols/Skype/res/Resource.rc +++ b/protocols/Skype/res/Resource.rc @@ -274,21 +274,33 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- GROUPBOX "Allow IMs from...",IDC_STATIC,4,4,294,39
- CONTROL "Anyone",IDC_PRIVACY_IM_ANYONE,"Button",BS_AUTORADIOBUTTON,11,17,58,10
+ GROUPBOX "Allow IMs from...",IDC_STATIC,4,1,294,31
+ CONTROL "Anyone",IDC_PRIVACY_IM_ANYONE,"Button",BS_AUTORADIOBUTTON,11,10,126,10
CONTROL "People in my Contact list only",IDC_PRIVACY_IM_CONTACTLIST,
- "Button",BS_AUTORADIOBUTTON,11,29,138,10
- GROUPBOX "Allow calls from...",IDC_STATIC,5,44,293,40
- CONTROL "Anyone",IDC_PRIVACY_CALL_ANYONE,"Button",BS_AUTORADIOBUTTON,15,56,69,10
+ "Button",BS_AUTORADIOBUTTON,11,20,158,10
+ GROUPBOX "Allow calls from...",IDC_STATIC,5,32,293,31
+ CONTROL "Anyone",IDC_PRIVACY_CALL_ANYONE,"Button",BS_AUTORADIOBUTTON,12,41,69,10
CONTROL "People in my Contact list only",IDC_PRIVACY_CALL_CONTACTLIST,
- "Button",BS_AUTORADIOBUTTON,15,68,129,10
- GROUPBOX "Automatically receive video and share screens with...",IDC_STATIC,6,87,291,46
- CONTROL "Anyone",IDC_PRIVACY_SHARE_ANYONE,"Button",BS_AUTORADIOBUTTON,12,96,41,10
+ "Button",BS_AUTORADIOBUTTON,12,51,129,10
+ GROUPBOX "Automatically receive video and share screens with...",IDC_STATIC,6,63,291,42
+ CONTROL "Anyone",IDC_PRIVACY_SHARE_ANYONE,"Button",BS_AUTORADIOBUTTON,12,72,41,10
CONTROL "People in my Contact list only",IDC_PRIVACY_SHARE_CONTACTLIST,
- "Button",BS_AUTORADIOBUTTON,12,107,123,10
- CONTROL "No one",IDC_PRIVACY_SHARE_NOONE,"Button",BS_AUTORADIOBUTTON,11,118,39,10
+ "Button",BS_AUTORADIOBUTTON,12,82,123,10
+ CONTROL "No one",IDC_PRIVACY_SHARE_NOONE,"Button",BS_AUTORADIOBUTTON,12,92,39,10
CONTROL "Allow my online status to be shown on the web",IDC_PRIVACY_WEB,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,138,187,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,11,204,187,10
+ GROUPBOX "Show avatars",IDC_STATIC,7,104,289,33
+ CONTROL "Anyone",IDC_PRIVACY_AVATAR_ANYONE,"Button",BS_AUTORADIOBUTTON,13,113,41,10
+ CONTROL "People in my Contact list only",IDC_PRIVACY_AVATARS_CONTACTLIST,
+ "Button",BS_AUTORADIOBUTTON,13,124,109,10
+ GROUPBOX "Contacts count",IDC_STATIC,8,137,289,31
+ CONTROL "Anyone",IDC_PRIVACY_COUNT_ANYONE,"Button",BS_AUTORADIOBUTTON,13,146,41,10
+ CONTROL "People in my Contact list only",IDC_PRIVACY_COUNT_CONTACTLIST,
+ "Button",BS_AUTORADIOBUTTON,13,156,109,10
+ GROUPBOX "Local time",IDC_STATIC,9,168,287,32
+ CONTROL "Anyone",IDC_PRIVACY_TIME_ANYONE,"Button",BS_AUTORADIOBUTTON,15,177,66,10
+ CONTROL "People in my Contact list only",IDC_PRIVACY_TIME_CONTACTLIST,
+ "Button",BS_AUTORADIOBUTTON,15,187,109,10
END
IDD_BLOCK DIALOGEX 0, 0, 295, 170
diff --git a/protocols/Skype/src/resource.h b/protocols/Skype/src/resource.h index 508353d960..e155854f36 100644 --- a/protocols/Skype/src/resource.h +++ b/protocols/Skype/src/resource.h @@ -104,6 +104,12 @@ #define IDC_PRIVACY_WEB 1073
#define IDC_CREDITVALUE 1074
#define IDC_CREDITCURRENCY 1075
+#define IDC_PRIVACY_AVATAR_ANYONE 1076
+#define IDC_PRIVACY_AVATARS_CONTACTLIST 1077
+#define IDC_PRIVACY_COUNT_ANYONE 1078
+#define IDC_PRIVACY_COUNT_CONTACTLIST 1079
+#define IDC_PRIVACY_TIME_ANYONE 1080
+#define IDC_PRIVACY_TIME_CONTACTLIST 1081
// Next default values for new objects
//
@@ -111,7 +117,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 118
#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1076
+#define _APS_NEXT_CONTROL_VALUE 1082
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
diff --git a/protocols/Skype/src/skype.cpp b/protocols/Skype/src/skype.cpp index 423a216eaf..0416d8f473 100644 --- a/protocols/Skype/src/skype.cpp +++ b/protocols/Skype/src/skype.cpp @@ -92,7 +92,7 @@ int UnpackSkypeRuntime(HINSTANCE hInstance, const wchar_t *profileName) wchar_t *skypeKitPath = ::wcsrchr(fileName, '\\');
if (skypeKitPath != NULL)
*skypeKitPath = 0;
- ::swprintf(fileName, SIZEOF(fileName), L"%s\\%s", fileName, L"SkypeKit.exe");
+ ::mir_snwprintf(fileName, SIZEOF(fileName), L"%s\\%s", fileName, L"SkypeKit.exe");
if ( ::GetFileAttributes(fileName) == DWORD(-1))
{
HRSRC hRes = ::FindResource(hInstance, MAKEINTRESOURCE(IDR_RUNTIME), L"BIN");
@@ -126,14 +126,14 @@ int UnpackSkypeRuntime(HINSTANCE hInstance, const wchar_t *profileName) ::GetModuleFileName(NULL, path, ARRAYSIZE(path));
if (profileName)
- ::swprintf(
+ ::mir_snwprintf(
cmdLine,
SIZEOF(cmdLine),
L" /restart:%d /profile=%s",
::GetCurrentProcessId(),
profileName);
else
- ::swprintf(
+ ::mir_snwprintf(
cmdLine,
SIZEOF(cmdLine),
L" /restart:%d",
diff --git a/protocols/Skype/src/skype_runtime.cpp b/protocols/Skype/src/skype_runtime.cpp index bd6fe46a49..793d96f5f3 100644 --- a/protocols/Skype/src/skype_runtime.cpp +++ b/protocols/Skype/src/skype_runtime.cpp @@ -23,8 +23,8 @@ char *CSkypeProto::LoadKeyPair() return NULL;
char* pData = (char*)_alloca(length + 1);
- ::memcpy(pData, pLockedResource, length);
- pData[length] = 0;
+ ::memcpy(pData, pLockedResource, length);
+ pData[length] = 0;
unsigned decodedLen;
mir_ptr<BYTE> tmpD((BYTE*)::mir_base64_decode(pData, &decodedLen));
@@ -55,7 +55,7 @@ int CSkypeProto::StartSkypeRuntime(const wchar_t *profileName) wchar_t *skypeKitPath = ::wcsrchr(fileName, '\\');
if (skypeKitPath != NULL)
*skypeKitPath = 0;
- ::swprintf(fileName, SIZEOF(fileName), L"%s\\%s", fileName, L"SkypeKit.exe");
+ ::mir_snwprintf(fileName, SIZEOF(fileName), L"%s\\%s", fileName, L"SkypeKit.exe");
PROCESSENTRY32 entry;
entry.dwSize = sizeof(PROCESSENTRY32);
@@ -77,7 +77,7 @@ int CSkypeProto::StartSkypeRuntime(const wchar_t *profileName) wchar_t param[128];
VARST dbPath( _T("%miranda_userdata%\\SkypeKit"));
- ::swprintf(param, SIZEOF(param), L"-p -P %d -f \"%s\"", this->skypeKitPort, dbPath);
+ ::mir_snwprintf(param, SIZEOF(param), L"-p -P %d -f \"%s\"", this->skypeKitPort, dbPath);
int startingrt = ::CreateProcess(
fileName, param,
NULL, NULL, FALSE,
@@ -89,59 +89,59 @@ int CSkypeProto::StartSkypeRuntime(const wchar_t *profileName) BOOL CSkypeProto::SafeTerminateProcess(HANDLE hProcess, UINT uExitCode)
{
- DWORD dwTID, dwCode, dwErr = 0;
- HANDLE hProcessDup = INVALID_HANDLE_VALUE;
- HANDLE hRT = NULL;
- HINSTANCE hKernel = ::GetModuleHandle(L"Kernel32");
- BOOL bSuccess = FALSE;
-
- BOOL bDup = ::DuplicateHandle(
- ::GetCurrentProcess(),
- hProcess,
- GetCurrentProcess(),
- &hProcessDup,
- PROCESS_ALL_ACCESS,
+ DWORD dwTID, dwCode, dwErr = 0;
+ HANDLE hProcessDup = INVALID_HANDLE_VALUE;
+ HANDLE hRT = NULL;
+ HINSTANCE hKernel = ::GetModuleHandle(L"Kernel32");
+ BOOL bSuccess = FALSE;
+
+ BOOL bDup = ::DuplicateHandle(
+ ::GetCurrentProcess(),
+ hProcess,
+ GetCurrentProcess(),
+ &hProcessDup,
+ PROCESS_ALL_ACCESS,
FALSE,
0);
- // Detect the special case where the process is
- // already dead...
- if (::GetExitCodeProcess((bDup) ? hProcessDup : hProcess, &dwCode) && (dwCode == STILL_ACTIVE))
- {
- FARPROC pfnExitProc;
-
- pfnExitProc = GetProcAddress(hKernel, "ExitProcess");
+ // Detect the special case where the process is
+ // already dead...
+ if (::GetExitCodeProcess((bDup) ? hProcessDup : hProcess, &dwCode) && (dwCode == STILL_ACTIVE))
+ {
+ FARPROC pfnExitProc;
+
+ pfnExitProc = GetProcAddress(hKernel, "ExitProcess");
- hRT = ::CreateRemoteThread(
+ hRT = ::CreateRemoteThread(
(bDup) ? hProcessDup : hProcess,
NULL,
0,
(LPTHREAD_START_ROUTINE)pfnExitProc,
(PVOID)uExitCode, 0, &dwTID);
- if ( hRT == NULL )
- dwErr = GetLastError();
- }
- else
- dwErr = ERROR_PROCESS_ABORTED;
+ if ( hRT == NULL )
+ dwErr = GetLastError();
+ }
+ else
+ dwErr = ERROR_PROCESS_ABORTED;
- if (hRT)
- {
- // Must wait process to terminate to
- // guarantee that it has exited...
- ::WaitForSingleObject((bDup) ? hProcessDup : hProcess, INFINITE);
+ if (hRT)
+ {
+ // Must wait process to terminate to
+ // guarantee that it has exited...
+ ::WaitForSingleObject((bDup) ? hProcessDup : hProcess, INFINITE);
- ::CloseHandle(hRT);
- bSuccess = TRUE;
- }
+ ::CloseHandle(hRT);
+ bSuccess = TRUE;
+ }
- if ( bDup )
- ::CloseHandle(hProcessDup);
+ if ( bDup )
+ ::CloseHandle(hProcessDup);
- if ( !bSuccess )
- ::SetLastError(dwErr);
+ if ( !bSuccess )
+ ::SetLastError(dwErr);
- return bSuccess;
+ return bSuccess;
}
void CSkypeProto::StopSkypeRuntime()
|