mirror of https://github.com/BOINC/boinc.git
MGR: On Mac only, Close Window menu item (or its shortcut Command-w) closes the Event Log if it is the front window
svn path=/trunk/boinc/; revision=22292
This commit is contained in:
parent
12360ca0a5
commit
2381583668
|
@ -6216,3 +6216,10 @@ Charlie 23 Aug 2010
|
|||
BOINCClientManager.cpp
|
||||
BOINCGUIApp.cpp
|
||||
MainDocument.cpp
|
||||
|
||||
Charlie 26 Aug 2010
|
||||
- MGR: On Mac only, Close Window menu item (or its shortcut Command-w)
|
||||
closes the Event Log if it is the front window.
|
||||
|
||||
clientgui/
|
||||
BOINCBaseFrame.cpp
|
||||
|
|
|
@ -320,6 +320,23 @@ void CBOINCBaseFrame::OnClose(wxCloseEvent& event) {
|
|||
void CBOINCBaseFrame::OnCloseWindow(wxCommandEvent& WXUNUSED(event)) {
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CBOINCBaseFrame::OnCloseWindow - Function Begin"));
|
||||
|
||||
#ifdef __WXMAC__
|
||||
CFStringRef frontWindowTitle, eventLogTitle;
|
||||
CDlgEventLog* eventLog = wxGetApp().GetEventLog();
|
||||
if (eventLog) {
|
||||
WindowRef win = FrontNonFloatingWindow();
|
||||
if (win) {
|
||||
CopyWindowTitleAsCFString(win, &frontWindowTitle);
|
||||
eventLogTitle = CFStringCreateWithCString(NULL, eventLog->GetTitle().char_str(), kCFStringEncodingUTF8);
|
||||
if (CFStringCompare(eventLogTitle, frontWindowTitle, 0) == kCFCompareEqualTo) {
|
||||
wxCloseEvent eventClose;
|
||||
eventLog->OnClose(eventClose);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Close();
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CBOINCBaseFrame::OnCloseWindow - Function End"));
|
||||
|
|
Loading…
Reference in New Issue