mirror of https://github.com/BOINC/boinc.git
MGR: Make Event Log Window persistent, hide it when closing main window
svn path=/trunk/boinc/; revision=22028
This commit is contained in:
parent
f2113e781c
commit
988d08d1cc
|
@ -5405,3 +5405,17 @@ Charlie 22 Jul 2010
|
|||
mac_build/
|
||||
boinc.xcodeproj/
|
||||
project.pbxproj
|
||||
|
||||
Charlie 22 Jul 2010
|
||||
- MGR: If Event Log was open on Manager exit, open it on manager launch.
|
||||
- MGR: Clicking main window's close box when Event Log is open also
|
||||
hides the Event Log; show Event Log again if "Open BOINC Manager" is
|
||||
selected from task bar icon menu. Clicking main window's Minimize
|
||||
box does not affect Event Log window.
|
||||
|
||||
clientgui/
|
||||
BOINCBaseFrame.cpp
|
||||
BOINCGUIApp.cpp, .h
|
||||
BOINCTaskBar.cpp
|
||||
DlgEventLog.cpp, .h
|
||||
|
|
@ -792,6 +792,11 @@ bool CBOINCBaseFrame::Show(bool bShow) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
CDlgEventLog* eventLog = wxGetApp().GetEventLog();
|
||||
if (eventLog) {
|
||||
eventLog->Show(bShow);
|
||||
}
|
||||
return wxFrame::Show(bShow);
|
||||
}
|
||||
|
||||
|
|
|
@ -153,6 +153,7 @@ bool CBOINCGUIApp::OnInit() {
|
|||
// Initialize local variables
|
||||
int iErrorCode = 0;
|
||||
int iSelectedLanguage = 0;
|
||||
bool bOpenEventLog = false;
|
||||
wxString strDesiredSkinName = wxEmptyString;
|
||||
wxString strDialogMessage = wxEmptyString;
|
||||
bool success = false;
|
||||
|
@ -206,6 +207,7 @@ bool CBOINCGUIApp::OnInit() {
|
|||
m_pConfig->Read(wxT("DisableAutoStart"), &m_iBOINCMGRDisableAutoStart, 0L);
|
||||
m_pConfig->Read(wxT("Language"), &iSelectedLanguage, 0L);
|
||||
m_pConfig->Read(wxT("GUISelection"), &m_iGUISelected, BOINC_SIMPLEGUI);
|
||||
m_pConfig->Read(wxT("EventLogOpen"), &bOpenEventLog);
|
||||
|
||||
|
||||
// Should we abort the BOINC Manager startup process?
|
||||
|
@ -456,7 +458,10 @@ bool CBOINCGUIApp::OnInit() {
|
|||
} else {
|
||||
ShowApplication(false);
|
||||
}
|
||||
|
||||
|
||||
if(bOpenEventLog) {
|
||||
DisplayEventLog(m_bGUIVisible);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -793,7 +798,7 @@ int CBOINCGUIApp::StartBOINCDefaultScreensaverTest() {
|
|||
|
||||
// Display the Event Log, it is a modeless dialog not owned by any
|
||||
// other UI element.
|
||||
bool CBOINCGUIApp::DisplayEventLog() {
|
||||
bool CBOINCGUIApp::DisplayEventLog(bool bShowWindow) {
|
||||
bool rc = false;
|
||||
|
||||
if (m_pEventLog) {
|
||||
|
@ -801,7 +806,7 @@ bool CBOINCGUIApp::DisplayEventLog() {
|
|||
} else {
|
||||
m_pEventLog = new CDlgEventLog();
|
||||
if (m_pEventLog) {
|
||||
rc = m_pEventLog->Show();
|
||||
rc = m_pEventLog->Show(bShowWindow);
|
||||
if (m_pFrame) {
|
||||
m_pFrame->UpdateRefreshTimerInterval();
|
||||
}
|
||||
|
|
|
@ -153,7 +153,7 @@ public:
|
|||
|
||||
wxArrayString& GetSupportedLanguages() { return m_astrLanguages; }
|
||||
|
||||
bool DisplayEventLog();
|
||||
bool DisplayEventLog(bool bShowWindow = true);
|
||||
void OnEventLogClose();
|
||||
|
||||
void FireReloadSkin();
|
||||
|
|
|
@ -122,7 +122,7 @@ void CTaskBarIcon::OnClose(wxCloseEvent& event) {
|
|||
|
||||
CDlgEventLog* pEventLog = wxGetApp().GetEventLog();
|
||||
if (pEventLog) {
|
||||
pEventLog->Close();
|
||||
pEventLog->Destroy();
|
||||
}
|
||||
|
||||
CBOINCBaseFrame* pFrame = wxGetApp().GetFrame();
|
||||
|
|
|
@ -136,6 +136,7 @@ bool CDlgEventLog::Create( wxWindow* parent, wxWindowID id, const wxString& capt
|
|||
m_strFilteredProjectName.clear();
|
||||
m_iFilteredIndexes.Clear();
|
||||
m_bProcessingRefreshEvent = false;
|
||||
m_bEventLogIsOpen = true;
|
||||
////@end CDlgEventLog member initialisation
|
||||
|
||||
CSkinAdvanced* pSkinAdvanced = wxGetApp().GetSkinManager()->GetAdvanced();
|
||||
|
@ -368,6 +369,7 @@ void CDlgEventLog::OnOK( wxCommandEvent& WXUNUSED(event) ) {
|
|||
*/
|
||||
|
||||
void CDlgEventLog::OnClose(wxCloseEvent& WXUNUSED(event)) {
|
||||
m_bEventLogIsOpen = false; // User specifically closed window
|
||||
Destroy();
|
||||
}
|
||||
|
||||
|
@ -468,6 +470,8 @@ void CDlgEventLog::OnRefresh() {
|
|||
bool isConnected;
|
||||
static bool was_connected = false;
|
||||
|
||||
if (!IsShown()) return;
|
||||
|
||||
if (!m_bProcessingRefreshEvent) {
|
||||
m_bProcessingRefreshEvent = true;
|
||||
|
||||
|
@ -526,7 +530,7 @@ void CDlgEventLog::OnRefresh() {
|
|||
bool CDlgEventLog::SaveState() {
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CDlgEventLog::SaveState - Function Begin"));
|
||||
|
||||
wxString strBaseConfigLocation = wxString(wxT("/EventLog/"));
|
||||
wxString strBaseConfigLocation = wxEmptyString;
|
||||
wxConfigBase* pConfig = wxConfigBase::Get(FALSE);
|
||||
wxListItem liColumnInfo;
|
||||
wxInt32 iIndex = 0;
|
||||
|
@ -540,9 +544,14 @@ bool CDlgEventLog::SaveState() {
|
|||
// pointer, return false.
|
||||
if (!pConfig) return false;
|
||||
|
||||
strBaseConfigLocation = wxString(wxT("/"));
|
||||
pConfig->SetPath(strBaseConfigLocation);
|
||||
pConfig->Write(wxT("EventLogOpen"), m_bEventLogIsOpen);
|
||||
|
||||
//
|
||||
// Save Frame State
|
||||
//
|
||||
strBaseConfigLocation = wxString(wxT("/EventLog/"));
|
||||
pConfig->SetPath(strBaseConfigLocation);
|
||||
|
||||
// Convert to a zero based index
|
||||
|
|
|
@ -157,6 +157,8 @@ private:
|
|||
wxListItemAttr* m_pMessageErrorGrayAttr;
|
||||
|
||||
bool m_bProcessingRefreshEvent;
|
||||
|
||||
bool m_bEventLogIsOpen;
|
||||
|
||||
bool SaveState();
|
||||
bool RestoreState();
|
||||
|
|
Loading…
Reference in New Issue