From 85863331bd2920991e8e7093a472e60d749b4a7a Mon Sep 17 00:00:00 2001 From: mataes2007 Date: Sat, 24 Dec 2011 20:50:18 +0000 Subject: patch by FREAK_THEMIGHTY: - fixed navigation in options + new option: "Open message window" + New option: "Open contact list" + new option: "Respect ignore settings (status changes)" * status changes are now stored in UTF8 - Removed popup on sending nudges (on popular request) * popup options are moved into popup classes, needs a recent version of popup+ or YAPP git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@251 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb --- Nudge/shake.cpp | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'Nudge/shake.cpp') diff --git a/Nudge/shake.cpp b/Nudge/shake.cpp index 16fca0a..16f58d9 100644 --- a/Nudge/shake.cpp +++ b/Nudge/shake.cpp @@ -23,16 +23,14 @@ void CShake::Save(void) DWORD WINAPI ShakeChatWindow(LPVOID Param) { - HWND hWnd; - hWnd = (HWND) Param; + HWND hWnd = (HWND) Param; shake.ShakeChat(hWnd); return 1; } DWORD WINAPI ShakeClistWindow(LPVOID Param) { - HWND hWnd; - hWnd = (HWND) Param; + HWND hWnd = (HWND) Param; shake.ShakeClist(hWnd); return 0; } @@ -40,8 +38,7 @@ DWORD WINAPI ShakeClistWindow(LPVOID Param) INT_PTR ShakeClist( WPARAM wParam, LPARAM lParam ) { DWORD tid; - HWND hWnd; - hWnd = (HWND) CallService( MS_CLUI_GETHWND, 0, 0 ); + HWND hWnd = (HWND) CallService( MS_CLUI_GETHWND, 0, 0 ); CreateThread(NULL,0,ShakeClistWindow,(LPVOID) hWnd,0,&tid); return 0; @@ -52,7 +49,6 @@ INT_PTR ShakeChat( WPARAM wParam, LPARAM lParam ) if(((HANDLE) wParam) == NULL) return -1; DWORD tid; - HWND hWnd; //char srmmName[100]; MessageWindowData mwd; MessageWindowInputData mwid; @@ -70,7 +66,7 @@ INT_PTR ShakeChat( WPARAM wParam, LPARAM lParam ) //CallService(MS_MSG_GETWINDOWCLASS,(WPARAM)srmmName,(LPARAM)100 ); HWND parent; - hWnd = mwd.hwndWindow; + HWND hWnd = mwd.hwndWindow; while((parent = GetParent(hWnd)) != 0) hWnd = parent; // ensure we have the top level window (need parent window for scriver & tabsrmm) CreateThread(NULL,0,ShakeChatWindow,(LPVOID) hWnd,0,&tid); @@ -148,11 +144,10 @@ int CShake::ShakeChat(HWND hWnd) { if(!ShakingChat) { - Shaking = true; - int i; + ShakingChat = true; RECT rect; GetWindowRect(hWnd, &rect); - for(i = 0; i < nMoveChat; i++) + for(int i = 0; i < nMoveChat; i++) { SetWindowPos(hWnd, 0, rect.left - nScaleChat, rect.top, 0, 0, SWP_NOSIZE); Sleep(10); @@ -174,10 +169,9 @@ int CShake::ShakeClist(HWND hWnd) if(!Shaking) { Shaking = true; - int i; RECT rect; GetWindowRect(hWnd, &rect); - for(i = 0; i < nMoveClist; i++) + for(int i = 0; i < nMoveClist; i++) { SetWindowPos(hWnd, 0, rect.left - nScaleClist, rect.top, 0, 0, SWP_NOSIZE); Sleep(10); -- cgit v1.2.3