diff options
author | George Hazan <george.hazan@gmail.com> | 2015-05-28 17:16:36 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-05-28 17:16:36 +0000 |
commit | 84b5cac8e0f148250c44fc91d7d9752dca13dbb6 (patch) | |
tree | fbb1f7d612419ea7ff02770ca5e5af31c28ebd61 /protocols/SkypeClassic | |
parent | e22f3f791caefb016c7ba72256c325609f6a5a5b (diff) |
- MS_UTILS_GETBITMAPFILTERSTRINGS - end of story, replaced with BmpFilterGetStrings();
- parasite mir_strncat's removed from bitmap filter creation;
- CMString::AllocSysString/SetSysString removed due to complete uselessness;
- CMString::Detouch - typo fixed.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13881 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeClassic')
-rw-r--r-- | protocols/SkypeClassic/src/skype.cpp | 14 | ||||
-rw-r--r-- | protocols/SkypeClassic/src/skype.h | 2 | ||||
-rw-r--r-- | protocols/SkypeClassic/src/skypeopt.cpp | 13 |
3 files changed, 14 insertions, 15 deletions
diff --git a/protocols/SkypeClassic/src/skype.cpp b/protocols/SkypeClassic/src/skype.cpp index 147b467ecc..e0bf3fe270 100644 --- a/protocols/SkypeClassic/src/skype.cpp +++ b/protocols/SkypeClassic/src/skype.cpp @@ -2907,21 +2907,21 @@ void CleanupNicknames(char *) { /////////////////////////////////////////////////////////////////////////////////////////
// EnterBitmapFileName - enters a bitmap filename
-int __stdcall EnterBitmapFileName(char* szDest)
+int __stdcall EnterBitmapFileName(TCHAR *szDest)
{
- char szFilter[512];
- OPENFILENAMEA ofn = { 0 };
- *szDest = 0;
+ TCHAR szFilter[512];
+ BmpFilterGetStrings(szFilter, SIZEOF(szFilter));
- CallService(MS_UTILS_GETBITMAPFILTERSTRINGS, sizeof szFilter, (LPARAM)szFilter);
+ *szDest = 0;
+ OPENFILENAME ofn = { 0 };
ofn.lStructSize = sizeof(OPENFILENAME);
ofn.lpstrFilter = szFilter;
ofn.lpstrFile = szDest;
ofn.Flags = OFN_FILEMUSTEXIST | OFN_HIDEREADONLY;
ofn.nMaxFile = MAX_PATH;
ofn.nMaxFileTitle = MAX_PATH;
- ofn.lpstrDefExt = "bmp";
- if (!GetOpenFileNameA(&ofn))
+ ofn.lpstrDefExt = _T("bmp");
+ if (!GetOpenFileName(&ofn))
return 1;
return ERROR_SUCCESS;
diff --git a/protocols/SkypeClassic/src/skype.h b/protocols/SkypeClassic/src/skype.h index 7ad0ce8a99..bc4f9b2b67 100644 --- a/protocols/SkypeClassic/src/skype.h +++ b/protocols/SkypeClassic/src/skype.h @@ -145,7 +145,7 @@ time_t SkypeTime(time_t *timer); void MessageSendWatchThread(void*);
int OkToExit(WPARAM wParam, LPARAM lParam);
int MirandaExit(WPARAM wParam, LPARAM lParam);
-int __stdcall EnterBitmapFileName( char* szDest );
+int __stdcall EnterBitmapFileName(TCHAR *szDest);
void CleanupNicknames(char *dummy);
int InitVSApi();
int FreeVSApi();
diff --git a/protocols/SkypeClassic/src/skypeopt.cpp b/protocols/SkypeClassic/src/skypeopt.cpp index 358a95e153..ba9f04275f 100644 --- a/protocols/SkypeClassic/src/skypeopt.cpp +++ b/protocols/SkypeClassic/src/skypeopt.cpp @@ -780,18 +780,17 @@ INT_PTR CALLBACK AvatarDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM) if ( HIWORD( wParam ) == BN_CLICKED ) {
switch( LOWORD( wParam )) {
case IDC_SETAVATAR:
- {
- char szFileName[ MAX_PATH ];
- if ( EnterBitmapFileName( szFileName ) != ERROR_SUCCESS )
+ TCHAR szFileName[ MAX_PATH ];
+ if (EnterBitmapFileName(szFileName) != ERROR_SUCCESS)
return FALSE;
- hAvatar = ( HBITMAP )CallService( MS_UTILS_LOADBITMAP, 0, ( LPARAM )szFileName);
- if ( hAvatar != NULL ){
- SendDlgItemMessage(hwndDlg, IDC_AVATAR, STM_SETIMAGE, IMAGE_BITMAP, (WPARAM)hAvatar );
+ hAvatar = (HBITMAP)CallService(MS_UTILS_LOADBITMAPT, 0, (LPARAM)szFileName);
+ if (hAvatar != NULL){
+ SendDlgItemMessage(hwndDlg, IDC_AVATAR, STM_SETIMAGE, IMAGE_BITMAP, (WPARAM)hAvatar);
CallService(SKYPE_SETAVATAR, 0, ( LPARAM )szFileName);
}
break;
- }
+
case IDC_DELETEAVATAR:
if ( hAvatar != NULL ) {
DeleteObject( hAvatar );
|