summaryrefslogtreecommitdiff
path: root/protocols/SkypeClassic/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/SkypeClassic/src')
-rw-r--r--protocols/SkypeClassic/src/skype.cpp14
-rw-r--r--protocols/SkypeClassic/src/skype.h2
-rw-r--r--protocols/SkypeClassic/src/skypeopt.cpp13
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 );