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/src/cslist.cpp | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) (limited to 'plugins/CSList/src/cslist.cpp') 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; } -- cgit v1.2.3