summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/src
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-09-21 20:23:22 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-09-21 20:23:22 +0000
commit52824c91bac6d6cc0f04e242b07d9031477b6362 (patch)
tree3cafc4ce886f9066b50d4d32bfdda4c5c9f954f4 /protocols/IcqOscarJ/src
parentb4caa062df453412e7cafa5b96afab0b0c3a2940 (diff)
protocols cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@6170 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ/src')
-rw-r--r--protocols/IcqOscarJ/src/changeinfo/editlist.cpp9
-rw-r--r--protocols/IcqOscarJ/src/utilities.cpp20
2 files changed, 6 insertions, 23 deletions
diff --git a/protocols/IcqOscarJ/src/changeinfo/editlist.cpp b/protocols/IcqOscarJ/src/changeinfo/editlist.cpp
index acaa15d861..c4ba1157c0 100644
--- a/protocols/IcqOscarJ/src/changeinfo/editlist.cpp
+++ b/protocols/IcqOscarJ/src/changeinfo/editlist.cpp
@@ -30,7 +30,6 @@
static ChangeInfoData *dataListEdit = NULL;
static HWND hwndListEdit = NULL;
-static BOOL (WINAPI *MyAnimateWindow)(HWND,DWORD,DWORD);
static LRESULT CALLBACK ListEditSubclassProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)
{
@@ -129,13 +128,7 @@ void ChangeInfoData::BeginListEdit(int iItem, RECT *rc, int iSetting, WORD wVKey
if (itemHeight * listCount < 150)
SetWindowPos(hwndListEdit, 0, 0, 0, rc->right - rc->left, itemHeight * listCount + GetSystemMetrics(SM_CYBORDER) * 2, SWP_NOZORDER|SWP_NOMOVE);
mir_subclassWindow(hwndListEdit, ListEditSubclassProc);
- if (MyAnimateWindow = (BOOL (WINAPI*)(HWND,DWORD,DWORD))GetProcAddress(GetModuleHandleA("user32"), "AnimateWindow"))
- {
- BOOL enabled;
-
- SystemParametersInfo(SPI_GETCOMBOBOXANIMATION, 0, &enabled, FALSE);
- if (enabled) MyAnimateWindow(hwndListEdit, 200, AW_SLIDE|AW_ACTIVATE|AW_VER_POSITIVE);
- }
+ AnimateWindow(hwndListEdit, 200, AW_SLIDE|AW_ACTIVATE|AW_VER_POSITIVE);
ShowWindow(hwndListEdit, SW_SHOW);
SetFocus(hwndListEdit);
if (wVKey)
diff --git a/protocols/IcqOscarJ/src/utilities.cpp b/protocols/IcqOscarJ/src/utilities.cpp
index a3fb13398c..9f212cd271 100644
--- a/protocols/IcqOscarJ/src/utilities.cpp
+++ b/protocols/IcqOscarJ/src/utilities.cpp
@@ -1888,22 +1888,12 @@ const char* ExtractFileName(const char *fullname)
char* FileNameToUtf(const TCHAR *filename)
{
- // reasonable only on NT systems
- HINSTANCE hKernel = GetModuleHandle(_T("KERNEL32"));
- DWORD (CALLBACK *RealGetLongPathName)(LPCWSTR, LPWSTR, DWORD);
+ WCHAR *usFileName = NULL;
+ int wchars = GetLongPathName(filename, usFileName, 0);
+ usFileName = (WCHAR*)_alloca((wchars + 1) * sizeof(WCHAR));
+ GetLongPathName(filename, usFileName, wchars);
- *(FARPROC *)&RealGetLongPathName = GetProcAddress(hKernel, "GetLongPathNameW");
-
- if (RealGetLongPathName)
- { // the function is available (it is not on old NT systems)
- WCHAR *usFileName = NULL;
- int wchars = RealGetLongPathName(filename, usFileName, 0);
- usFileName = (WCHAR*)_alloca((wchars + 1) * sizeof(WCHAR));
- RealGetLongPathName(filename, usFileName, wchars);
-
- return make_utf8_string(usFileName);
- }
- return make_utf8_string(filename);
+ return make_utf8_string(usFileName);
}