From: <ma...@us...> - 2004-02-15 17:01:55
|
Update of /cvsroot/sharedaemon/ui-wx/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3814 Modified Files: MainDlg.cpp Log Message: Fixes shutdown freeze reported by Avi. Moved systray removal code from CMainDlg::~CMainDlg() to CMainDlg::OnCloseWindow(). Credits: Avi. Index: MainDlg.cpp =================================================================== RCS file: /cvsroot/sharedaemon/ui-wx/src/MainDlg.cpp,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- MainDlg.cpp 15 Feb 2004 16:46:21 -0000 1.62 +++ MainDlg.cpp 15 Feb 2004 16:54:34 -0000 1.63 @@ -240,13 +240,6 @@ pages.Find(GetCurPage())->GetKeyString()); } -#ifdef wxHAS_TASK_BAR_ICON - #ifdef __WXMSW__ - systray->RemoveIcon(); - #endif - delete systray; -#endif - wxMenuBar *mb = GetMenuBar(); if (mb != NULL) { SetMenuBar(NULL); @@ -475,7 +468,7 @@ images.Clear(); names.Clear(); /* Anywhere else, custom controls in toolbar aren't supported at all */ -#else +#else tb->AddSeparator(); tb->AddTool( ID_BTN_GUISETTINGS, _("Options"), @@ -508,6 +501,14 @@ return; } } + +#ifdef wxHAS_TASK_BAR_ICON /* Removes tray icon. Do this here instead of */ + #ifdef __WXMSW__ /* destructor to prevent freezes. Credits: Avi */ + systray->RemoveIcon(); + #endif + delete systray; +#endif + event.Skip(); } |