From 103fe695d5ae6057cd132497c98de0f4cfb14d63 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 23 Nov 2012 15:29:12 +0000 Subject: - windows management code became less crazy - unused file removed from project git-svn-id: http://svn.miranda-ng.org/main/trunk@2447 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/CSList/cslist_10.vcxproj | 1 - plugins/CSList/cslist_10.vcxproj.filters | 3 --- plugins/CSList/src/cslist.cpp | 28 ++++------------------------ plugins/CSList/src/cslist.h | 5 ----- 4 files changed, 4 insertions(+), 33 deletions(-) diff --git a/plugins/CSList/cslist_10.vcxproj b/plugins/CSList/cslist_10.vcxproj index a6a6c5778e..d69ff08ce8 100644 --- a/plugins/CSList/cslist_10.vcxproj +++ b/plugins/CSList/cslist_10.vcxproj @@ -173,7 +173,6 @@ - diff --git a/plugins/CSList/cslist_10.vcxproj.filters b/plugins/CSList/cslist_10.vcxproj.filters index 57c03ce842..d84ed620d3 100644 --- a/plugins/CSList/cslist_10.vcxproj.filters +++ b/plugins/CSList/cslist_10.vcxproj.filters @@ -23,9 +23,6 @@ Header Files - - Header Files - Header Files diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp index 828c204b0a..077255c545 100644 --- a/plugins/CSList/src/cslist.cpp +++ b/plugins/CSList/src/cslist.cpp @@ -212,15 +212,10 @@ INT_PTR showList(WPARAM wparam, LPARAM lparam, LPARAM param) } } - mir_forkthread(&CSWindow::showWindow, new CSWindow(szProto)); + CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_CSLIST), NULL, CSWindowProc, ( LPARAM )new CSWindow(szProto)); return 0; } -void closeList(HWND hwnd) -{ - mir_forkthread(&CSWindow::closeWindow, hwnd); -} - void forAllProtocols( pForAllProtosFunc pFunc, void *arg ) { int protoCount; @@ -339,21 +334,6 @@ CSWindow::~CSWindow() SAFE_FREE(( void** )&m_filterString ); } -void CSWindow::showWindow( void *arg ) -{ - CSWindow* csw = ( CSWindow* )arg; - - while ( csw == NULL ) - SleepEx( 10, FALSE ); - - DialogBoxParam( g_hInst, MAKEINTRESOURCE( IDD_CSLIST ), NULL, ( DLGPROC )CSWindowProc, ( LPARAM )csw ); -} - -void CSWindow::closeWindow( void *arg ) -{ - EndDialog((HWND)arg, FALSE); -} - void CSWindow::initIcons() { PROTOACCOUNT *pdescr = (PROTOACCOUNT*)CallService(MS_PROTO_GETACCOUNT, 0, (LPARAM)m_protoName); @@ -972,9 +952,7 @@ INT_PTR CALLBACK CSWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lp if (csw->m_itemslist!=NULL) csw->m_itemslist->saveItems(csw->m_protoName); csw->saveWindowPosition(csw->m_handle); - delete csw->m_listview; - csw->deinitIcons(); - closeList( hwnd ); + EndDialog(hwnd, FALSE); break; } return FALSE; @@ -1004,6 +982,8 @@ INT_PTR CALLBACK CSWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lp case WM_DESTROY: SetWindowLongPtr(hwnd, GWLP_USERDATA, 0); arWindows.remove(csw); + delete csw->m_listview; + csw->deinitIcons(); delete csw; break; } diff --git a/plugins/CSList/src/cslist.h b/plugins/CSList/src/cslist.h index c593f541bc..c09b4f17d0 100644 --- a/plugins/CSList/src/cslist.h +++ b/plugins/CSList/src/cslist.h @@ -377,8 +377,6 @@ struct CSWindow void initIcons(); void deinitIcons(); void initButtons(); - static void __cdecl showWindow( void *arg ); - static void __cdecl closeWindow( void *arg ); void loadWindowPosition(); BOOL toggleButtons(); void toggleEmptyListMessage(); @@ -388,9 +386,7 @@ struct CSWindow void __inline saveWindowPosition( HWND hwnd ) { if ( getByte( "RememberWindowPosition", DEFAULT_REMEMBER_WINDOW_POSITION ) == TRUE ) - { Utils_SaveWindowPosition(hwnd,NULL,__INTERNAL_NAME,"Position"); - } } }; @@ -418,7 +414,6 @@ struct CSAMWindow // service functions INT_PTR __cdecl showList(WPARAM, LPARAM, LPARAM); -void closeList( HWND ); // protocols enumeration related functions void forAllProtocols(pForAllProtosFunc pFunc, void *arg); -- cgit v1.2.3