diff --git a/clientgui/MainFrame.cpp b/clientgui/MainFrame.cpp index 9b4265b44f..322e5ef221 100644 --- a/clientgui/MainFrame.cpp +++ b/clientgui/MainFrame.cpp @@ -580,10 +580,20 @@ void CMainFrame::OnExit( wxCommandEvent& WXUNUSED(event) ) void CMainFrame::OnToolsOptions( wxCommandEvent& WXUNUSED(event) ) { - CDlgOptions* pDlg = new CDlgOptions(this); + CMainDocument* pDoc = wxGetApp().GetDocument(); + CDlgOptions* pDlg = new CDlgOptions(this); + wxInt32 iAnswer = 0; + + wxASSERT(NULL != pDoc); + wxASSERT(wxDynamicCast(pDoc, CMainDocument)); wxASSERT(NULL != pDlg); - pDlg->ShowModal(); + + iAnswer = pDlg->ShowModal(); + if ( wxOK == iAnswer ) + { + } + if (pDlg) pDlg->Destroy(); diff --git a/clientgui/TaskBarIcon.cpp b/clientgui/TaskBarIcon.cpp index 00fab504d5..695f47aeac 100644 --- a/clientgui/TaskBarIcon.cpp +++ b/clientgui/TaskBarIcon.cpp @@ -64,7 +64,7 @@ CTaskBarIcon::~CTaskBarIcon() void CTaskBarIcon::OnOpen( wxCommandEvent& WXUNUSED(event) ) { - ShowBalloon( wxT(""), wxT("") ); + ResetTaskBar(); CMainFrame* pFrame = wxGetApp().GetFrame(); wxASSERT(NULL != pFrame); @@ -77,7 +77,7 @@ void CTaskBarIcon::OnOpen( wxCommandEvent& WXUNUSED(event) ) void CTaskBarIcon::OnActivitySelection( wxCommandEvent& event ) { - ShowBalloon( wxT(""), wxT("") ); + ResetTaskBar(); CMainDocument* pDoc = wxGetApp().GetDocument(); @@ -101,7 +101,7 @@ void CTaskBarIcon::OnActivitySelection( wxCommandEvent& event ) void CTaskBarIcon::OnNetworkSelection( wxCommandEvent& event ) { - ShowBalloon( wxT(""), wxT("") ); + ResetTaskBar(); CMainDocument* pDoc = wxGetApp().GetDocument(); @@ -131,7 +131,7 @@ void CTaskBarIcon::OnNetworkSelection( wxCommandEvent& event ) void CTaskBarIcon::OnAbout( wxCommandEvent& WXUNUSED(event) ) { - ShowBalloon( wxT(""), wxT("") ); + ResetTaskBar(); CDlgAbout* pDlg = new CDlgAbout(NULL); wxASSERT(NULL != pDlg); @@ -145,7 +145,7 @@ void CTaskBarIcon::OnAbout( wxCommandEvent& WXUNUSED(event) ) void CTaskBarIcon::OnExit( wxCommandEvent& WXUNUSED(event) ) { - ShowBalloon( wxT(""), wxT("") ); + ResetTaskBar(); CMainFrame* pFrame = wxGetApp().GetFrame(); wxASSERT(NULL != pFrame); @@ -158,7 +158,7 @@ void CTaskBarIcon::OnExit( wxCommandEvent& WXUNUSED(event) ) void CTaskBarIcon::OnClose( wxCloseEvent& event ) { - ShowBalloon( wxT(""), wxT("") ); + ResetTaskBar(); CMainFrame* pFrame = wxGetApp().GetFrame(); wxASSERT(NULL != pFrame); @@ -173,7 +173,7 @@ void CTaskBarIcon::OnMouseMove( wxEvent& event ) { wxTimeSpan ts(wxDateTime::Now() - dtLastMouseCaptureTime); - if ( ts.GetSeconds() > 5 ) + if ( ts.GetSeconds() >= 5 ) { dtLastMouseCaptureTime = wxDateTime::Now(); @@ -217,7 +217,7 @@ void CTaskBarIcon::OnMouseMove( wxEvent& event ) void CTaskBarIcon::OnRButtonDown( wxEvent& event ) { - ShowBalloon( wxT(""), wxT("") ); + ResetTaskBar(); CMainDocument* pDoc = wxGetApp().GetDocument(); wxMenu* menu = new wxMenu; @@ -273,7 +273,7 @@ void CTaskBarIcon::OnRButtonDown( wxEvent& event ) void CTaskBarIcon::OnLButtonDClick( wxEvent& event ) { - ShowBalloon( wxT(""), wxT("") ); + ResetTaskBar(); CMainFrame* pFrame = wxGetApp().GetFrame(); wxASSERT(NULL != pFrame); @@ -328,3 +328,11 @@ bool CTaskBarIcon::ShowBalloon( wxString title, wxString message, unsigned int t return bRetVal; } + + +void CTaskBarIcon::ResetTaskBar() +{ + ShowBalloon( wxT(""), wxT("") ); + dtLastMouseCaptureTime = wxDateTime::Now(); +} + diff --git a/clientgui/TaskBarIcon.h b/clientgui/TaskBarIcon.h index 42271117bc..e31b5ee6c4 100644 --- a/clientgui/TaskBarIcon.h +++ b/clientgui/TaskBarIcon.h @@ -70,6 +70,8 @@ private: wxIcon iconTaskBarIcon; wxDateTime dtLastMouseCaptureTime; + void ResetTaskBar(); + DECLARE_EVENT_TABLE() };