diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-23 15:29:12 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-23 15:29:12 +0000 |
commit | 103fe695d5ae6057cd132497c98de0f4cfb14d63 (patch) | |
tree | d73ce604e631ecb281de12f550b45e0517f6cdc1 /plugins/CSList/src/cslist.cpp | |
parent | 75c68d4db1c1bd42ab7145c8973d2a0bde89eac4 (diff) |
- 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
Diffstat (limited to 'plugins/CSList/src/cslist.cpp')
-rw-r--r-- | plugins/CSList/src/cslist.cpp | 28 |
1 files changed, 4 insertions, 24 deletions
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;
}
|