mirror of https://github.com/BOINC/boinc.git
MGR: Save window dimensions and position on SIZE and MOVE events
svn path=/trunk/boinc/; revision=22694
This commit is contained in:
parent
b9c15c68d9
commit
286f96cc9a
|
@ -8077,3 +8077,13 @@ Rom 11 Nov 2010
|
|||
|
||||
clientgui/gtk/
|
||||
taskbarex.h
|
||||
|
||||
Charlie 12 Nov 2010
|
||||
- MGR: Save window dimensions and position on SIZE and MOVE events
|
||||
to make sure changes are recorded even if the window is minimized
|
||||
(iconized) when exiting BOINC.
|
||||
|
||||
clientgui/
|
||||
AdvancedFrame.cpp, .h
|
||||
DlgEventLog.cpp, .h
|
||||
sg_DlgMessages.cpp, .h
|
||||
|
|
|
@ -193,6 +193,8 @@ BEGIN_EVENT_TABLE (CAdvancedFrame, CBOINCBaseFrame)
|
|||
EVT_TIMER(ID_REFRESHSTATETIMER, CAdvancedFrame::OnRefreshState)
|
||||
EVT_TIMER(ID_FRAMERENDERTIMER, CAdvancedFrame::OnFrameRender)
|
||||
EVT_NOTEBOOK_PAGE_CHANGED(ID_FRAMENOTEBOOK, CAdvancedFrame::OnNotebookSelectionChanged)
|
||||
EVT_SIZE(CAdvancedFrame::OnSize)
|
||||
EVT_MOVE(CAdvancedFrame::OnMove)
|
||||
END_EVENT_TABLE ()
|
||||
|
||||
|
||||
|
@ -1023,6 +1025,18 @@ void CAdvancedFrame::SaveWindowDimensions() {
|
|||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CAdvancedFrame::SaveWindowDimensions - Function End"));
|
||||
}
|
||||
|
||||
|
||||
void CAdvancedFrame::OnSize(wxSizeEvent& event) {
|
||||
SaveWindowDimensions();
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
void CAdvancedFrame::OnMove(wxMoveEvent& event) {
|
||||
SaveWindowDimensions();
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
int CAdvancedFrame::_GetCurrentViewPage() {
|
||||
|
|
|
@ -129,6 +129,8 @@ private:
|
|||
bool DeleteStatusbar();
|
||||
|
||||
void SaveWindowDimensions();
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnMove(wxMoveEvent& event);
|
||||
|
||||
void UpdateActivityModeControls( CC_STATUS& status );
|
||||
void UpdateGPUModeControls( CC_STATUS& status );
|
||||
|
|
|
@ -72,6 +72,8 @@ BEGIN_EVENT_TABLE( CDlgEventLog, wxDialog )
|
|||
EVT_BUTTON(ID_COPYSELECTED, CDlgEventLog::OnMessagesCopySelected)
|
||||
EVT_BUTTON(ID_TASK_MESSAGES_FILTERBYPROJECT, CDlgEventLog::OnMessagesFilter)
|
||||
EVT_BUTTON(ID_SIMPLE_HELP, CDlgEventLog::OnButtonHelp)
|
||||
EVT_SIZE(CDlgEventLog::OnSize)
|
||||
EVT_MOVE(CDlgEventLog::OnMove)
|
||||
EVT_CLOSE(CDlgEventLog::OnClose)
|
||||
////@end CDlgEventLog event table entries
|
||||
END_EVENT_TABLE()
|
||||
|
@ -679,7 +681,19 @@ void CDlgEventLog::SetWindowDimensions() {
|
|||
pConfig->Write(wxT("Height"), GetSize().y);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CDlgEventLog::OnSize(wxSizeEvent& event) {
|
||||
SetWindowDimensions();
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
void CDlgEventLog::OnMove(wxMoveEvent& event) {
|
||||
SetWindowDimensions();
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
* wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_COPYAll
|
||||
|
|
|
@ -166,6 +166,8 @@ private:
|
|||
|
||||
void GetWindowDimensions( wxPoint& position, wxSize& size );
|
||||
void SetWindowDimensions();
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnMove(wxMoveEvent& event);
|
||||
|
||||
void OnMouseUp(wxMouseEvent& event);
|
||||
|
||||
|
|
|
@ -314,6 +314,8 @@ BEGIN_EVENT_TABLE( CDlgMessages, wxDialog )
|
|||
EVT_HELP(wxID_ANY, CDlgMessages::OnHelp)
|
||||
EVT_SHOW( CDlgMessages::OnShow )
|
||||
EVT_BUTTON( wxID_OK, CDlgMessages::OnOK )
|
||||
EVT_SIZE(CDlgMessages::OnSize)
|
||||
EVT_MOVE(CDlgMessages::OnMove)
|
||||
////@end CDlgMessages event table entries
|
||||
END_EVENT_TABLE()
|
||||
|
||||
|
@ -606,3 +608,17 @@ void CDlgMessages::RestoreWindowDimensions() {
|
|||
#endif // ! __WXMAC__
|
||||
}
|
||||
|
||||
void CDlgMessages::OnSize(wxSizeEvent& event) {
|
||||
if (IsShown()) {
|
||||
SaveWindowDimensions();
|
||||
}
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
|
||||
void CDlgMessages::OnMove(wxMoveEvent& event) {
|
||||
if (IsShown()) {
|
||||
SaveWindowDimensions();
|
||||
}
|
||||
event.Skip();
|
||||
}
|
||||
|
|
|
@ -150,6 +150,8 @@ private:
|
|||
void SaveWindowDimensions();
|
||||
bool RestoreState();
|
||||
void RestoreWindowDimensions();
|
||||
void OnSize(wxSizeEvent& event);
|
||||
void OnMove(wxMoveEvent& event);
|
||||
|
||||
////@begin CDlgMessages member variables
|
||||
CPanelMessages* m_pBackgroundPanel;
|
||||
|
|
Loading…
Reference in New Issue