diff --git a/clientgui/DlgEventLog.cpp b/clientgui/DlgEventLog.cpp index cd6dc6bd75..0545e0d676 100644 --- a/clientgui/DlgEventLog.cpp +++ b/clientgui/DlgEventLog.cpp @@ -75,6 +75,7 @@ BEGIN_EVENT_TABLE( CDlgEventLog, wxDialog ) EVT_SIZE(CDlgEventLog::OnSize) EVT_MOVE(CDlgEventLog::OnMove) EVT_CLOSE(CDlgEventLog::OnClose) + EVT_LIST_COL_END_DRAG(ID_SIMPLE_MESSAGESVIEW, CDlgEventLog::OnColResize) ////@end CDlgEventLog event table entries END_EVENT_TABLE() @@ -256,7 +257,8 @@ bool CDlgEventLog::Create( wxWindow* parent, wxWindowID id, const wxString& capt SetTextColor(); RestoreState(); OnRefresh(); - + // Register that we had the Event Log open immediately + SaveState(); return true; } @@ -885,6 +887,11 @@ void CDlgEventLog::OnButtonHelp( wxCommandEvent& event ) { } +void CDlgEventLog::OnColResize( wxCommandEvent& ) { + // Register the new column widths immediately + SaveState(); +} + void CDlgEventLog::ResetMessageFiltering() { s_bIsFiltered = false; s_strFilteredProjectName.clear(); diff --git a/clientgui/DlgEventLog.h b/clientgui/DlgEventLog.h index 8eecc48a59..44d3c1c96a 100644 --- a/clientgui/DlgEventLog.h +++ b/clientgui/DlgEventLog.h @@ -118,6 +118,9 @@ public: /// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_SIMPLE_HELP void OnButtonHelp( wxCommandEvent& event ); + /// EVT_LIST_COL_END_DRAG event handler for ID_SIMPLE_MESSAGESVIEW + void OnColResize( wxCommandEvent& event ); + /// called from CMainDocument::HandleCompletedRPC() after wxEVT_RPC_FINISHED event void OnRefresh(); ////@end CDlgEventLog event handler declarations diff --git a/clientgui/ViewProjects.cpp b/clientgui/ViewProjects.cpp index 5cc8d92e97..d9ea2445a6 100644 --- a/clientgui/ViewProjects.cpp +++ b/clientgui/ViewProjects.cpp @@ -86,6 +86,7 @@ BEGIN_EVENT_TABLE (CViewProjects, CBOINCBaseView) EVT_LIST_ITEM_DESELECTED(ID_LIST_PROJECTSVIEW, CViewProjects::OnListDeselected) EVT_LIST_COL_CLICK(ID_LIST_PROJECTSVIEW, CViewProjects::OnColClick) EVT_LIST_CACHE_HINT(ID_LIST_PROJECTSVIEW, CViewProjects::OnCacheHint) + EVT_LIST_COL_END_DRAG(ID_LIST_PROJECTSVIEW, CViewProjects::OnColResize) END_EVENT_TABLE () @@ -554,6 +555,15 @@ void CViewProjects::OnProjectWebsiteClicked( wxEvent& event ) { wxLogTrace(wxT("Function Start/End"), wxT("CViewProjects::OnProjectWebsiteClicked - Function End")); } +bool CViewProjects::OnColResize( wxCommandEvent& ) { + // Register the new column widths immediately + CAdvancedFrame* pFrame = wxDynamicCast(GetParent()->GetParent()->GetParent(), CAdvancedFrame); + + wxASSERT(pFrame); + wxASSERT(wxDynamicCast(pFrame, CAdvancedFrame)); + return pFrame->SaveState(); +} + wxInt32 CViewProjects::GetDocCount() { CMainDocument* pDoc = wxGetApp().GetDocument(); diff --git a/clientgui/ViewProjects.h b/clientgui/ViewProjects.h index 376b2bc459..d528c4bea4 100644 --- a/clientgui/ViewProjects.h +++ b/clientgui/ViewProjects.h @@ -73,6 +73,7 @@ public: void OnShowItemProperties( wxCommandEvent& event ); void OnProjectWebsiteClicked( wxEvent& event ); + bool OnColResize( wxCommandEvent& event); std::vector m_ProjectCache; diff --git a/clientgui/ViewTransfers.cpp b/clientgui/ViewTransfers.cpp index c900c966ad..aadef6a5b5 100644 --- a/clientgui/ViewTransfers.cpp +++ b/clientgui/ViewTransfers.cpp @@ -72,6 +72,7 @@ BEGIN_EVENT_TABLE (CViewTransfers, CBOINCBaseView) EVT_LIST_ITEM_DESELECTED(ID_LIST_TRANSFERSVIEW, CViewTransfers::OnListDeselected) EVT_LIST_COL_CLICK(ID_LIST_TRANSFERSVIEW, CViewTransfers::OnColClick) EVT_LIST_CACHE_HINT(ID_LIST_TRANSFERSVIEW, CViewTransfers::OnCacheHint) + EVT_LIST_COL_END_DRAG(ID_LIST_TRANSFERSVIEW, CViewTransfers::OnColResize) END_EVENT_TABLE () @@ -364,6 +365,16 @@ void CViewTransfers::OnTransfersAbort( wxCommandEvent& WXUNUSED(event) ) { } +bool CViewTransfers::OnColResize( wxCommandEvent& ) { + // Register the new column widths immediately + CAdvancedFrame* pFrame = wxDynamicCast(GetParent()->GetParent()->GetParent(), CAdvancedFrame); + + wxASSERT(pFrame); + wxASSERT(wxDynamicCast(pFrame, CAdvancedFrame)); + return pFrame->SaveState(); +} + + wxInt32 CViewTransfers::GetDocCount() { return wxGetApp().GetDocument()->GetTransferCount(); } diff --git a/clientgui/ViewTransfers.h b/clientgui/ViewTransfers.h index cbe9a43965..35b1dcdc5c 100644 --- a/clientgui/ViewTransfers.h +++ b/clientgui/ViewTransfers.h @@ -67,6 +67,7 @@ public: void OnTransfersRetryNow( wxCommandEvent& event ); void OnTransfersAbort( wxCommandEvent& event ); + bool OnColResize( wxCommandEvent& event); std::vector m_TransferCache; diff --git a/clientgui/ViewWork.cpp b/clientgui/ViewWork.cpp index 0c90769d96..70186a8481 100644 --- a/clientgui/ViewWork.cpp +++ b/clientgui/ViewWork.cpp @@ -93,6 +93,7 @@ BEGIN_EVENT_TABLE (CViewWork, CBOINCBaseView) EVT_LIST_ITEM_DESELECTED(ID_LIST_WORKVIEW, CViewWork::OnListDeselected) EVT_LIST_COL_CLICK(ID_LIST_WORKVIEW, CViewWork::OnColClick) EVT_LIST_CACHE_HINT(ID_LIST_WORKVIEW, CViewWork::OnCacheHint) + EVT_LIST_COL_END_DRAG(ID_LIST_WORKVIEW, CViewWork::OnColResize) END_EVENT_TABLE () @@ -610,6 +611,15 @@ void CViewWork::OnProjectWebsiteClicked( wxEvent& event ) { wxLogTrace(wxT("Function Start/End"), wxT("CViewWork::OnProjectWebsiteClicked - Function End")); } +bool CViewWork::OnColResize( wxCommandEvent& ) { + // Register the new column widths immediately + CAdvancedFrame* pFrame = wxDynamicCast(GetParent()->GetParent()->GetParent(), CAdvancedFrame); + + wxASSERT(pFrame); + wxASSERT(wxDynamicCast(pFrame, CAdvancedFrame)); + return pFrame->SaveState(); +} + wxInt32 CViewWork::GetDocCount() { return wxGetApp().GetDocument()->GetWorkCount(); diff --git a/clientgui/ViewWork.h b/clientgui/ViewWork.h index 5b99cdc911..cc92ec4574 100644 --- a/clientgui/ViewWork.h +++ b/clientgui/ViewWork.h @@ -75,6 +75,7 @@ public: void OnActiveTasksOnly( wxCommandEvent& event ); void OnProjectWebsiteClicked( wxEvent& event ); + bool OnColResize( wxCommandEvent& event); std::vector m_WorkCache;