mirror of https://github.com/BOINC/boinc.git
MGR: Fix Coverity CIDs 117639 , 117640
This commit is contained in:
parent
98bfcdb2d3
commit
4003331ece
|
@ -1,6 +1,6 @@
|
|||
// This file is part of BOINC.
|
||||
// http://boinc.berkeley.edu
|
||||
// Copyright (C) 2008 University of California
|
||||
// Copyright (C) 2015 University of California
|
||||
//
|
||||
// BOINC is free software; you can redistribute it and/or modify it
|
||||
// under the terms of the GNU Lesser General Public License
|
||||
|
@ -99,11 +99,6 @@ CDlgEventLog::CDlgEventLog( wxWindow* parent, wxWindowID id, const wxString& cap
|
|||
|
||||
Create(parent, id, caption, pos, size, style);
|
||||
|
||||
#ifdef __WXGTK__
|
||||
m_pList->SaveEventHandler((m_pList->GetMainWin())->GetEventHandler());
|
||||
(m_pList->GetMainWin())->PushEventHandler(new MyEvtLogEvtHandler(m_pList));
|
||||
#endif
|
||||
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CDlgEventLog::CDlgEventLog - Constructor Function End"));
|
||||
}
|
||||
|
||||
|
@ -111,10 +106,6 @@ CDlgEventLog::CDlgEventLog( wxWindow* parent, wxWindowID id, const wxString& cap
|
|||
CDlgEventLog::~CDlgEventLog() {
|
||||
wxLogTrace(wxT("Function Start/End"), wxT("CDlgEventLog::CDlgEventLog - Destructor Function Begin"));
|
||||
|
||||
#ifdef __WXGTK__
|
||||
(m_pList->GetMainWin())->PopEventHandler(true);
|
||||
#endif
|
||||
|
||||
if (m_pMessageInfoAttr) {
|
||||
delete m_pMessageInfoAttr;
|
||||
m_pMessageInfoAttr = NULL;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file is part of BOINC.
|
||||
// http://boinc.berkeley.edu
|
||||
// Copyright (C) 2008 University of California
|
||||
// Copyright (C) 2015 University of California
|
||||
//
|
||||
// BOINC is free software; you can redistribute it and/or modify it
|
||||
// under the terms of the GNU Lesser General Public License
|
||||
|
@ -39,7 +39,9 @@ BEGIN_EVENT_TABLE(MyEvtLogEvtHandler, wxEvtHandler)
|
|||
EVT_PAINT(MyEvtLogEvtHandler::OnPaint)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
MyEvtLogEvtHandler::MyEvtLogEvtHandler() {}
|
||||
MyEvtLogEvtHandler::MyEvtLogEvtHandler() {
|
||||
m_view_startX = 0;
|
||||
}
|
||||
|
||||
MyEvtLogEvtHandler::MyEvtLogEvtHandler(wxGenericListCtrl *theListControl) {
|
||||
m_listCtrl = theListControl;
|
||||
|
@ -89,6 +91,11 @@ CDlgEventLogListCtrl::CDlgEventLogListCtrl(CDlgEventLog* pView, wxWindowID iList
|
|||
|
||||
m_bIsSingleSelection = (iListWindowFlags & wxLC_SINGLE_SEL) ? true : false ;
|
||||
|
||||
#ifdef __WXGTK__
|
||||
savedHandler = GetMainWin()->GetEventHandler();
|
||||
GetMainWin()->PushEventHandler(new MyEvtLogEvtHandler(this));
|
||||
#endif
|
||||
|
||||
#ifdef __WXMAC__
|
||||
m_fauxHeaderView = NULL;
|
||||
m_fauxBodyView = NULL;
|
||||
|
@ -97,13 +104,17 @@ CDlgEventLogListCtrl::CDlgEventLogListCtrl(CDlgEventLog* pView, wxWindowID iList
|
|||
}
|
||||
|
||||
|
||||
#ifdef __WXMAC__
|
||||
CDlgEventLogListCtrl::~CDlgEventLogListCtrl()
|
||||
{
|
||||
RemoveMacAccessibilitySupport();
|
||||
}
|
||||
#ifdef __WXGTK__
|
||||
GetMainWin()->PopEventHandler(true);
|
||||
#endif
|
||||
|
||||
#ifdef __WXMAC__
|
||||
RemoveMacAccessibilitySupport();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
wxString CDlgEventLogListCtrl::OnGetItemText(long item, long column) const {
|
||||
wxASSERT(m_pParentView);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// This file is part of BOINC.
|
||||
// http://boinc.berkeley.edu
|
||||
// Copyright (C) 2008 University of California
|
||||
// Copyright (C) 2015 University of California
|
||||
//
|
||||
// BOINC is free software; you can redistribute it and/or modify it
|
||||
// under the terms of the GNU Lesser General Public License
|
||||
|
@ -42,12 +42,9 @@ public:
|
|||
CDlgEventLogListCtrl();
|
||||
CDlgEventLogListCtrl(CDlgEventLog* pView, wxWindowID iListWindowID, int iListWindowFlags);
|
||||
|
||||
#ifdef __WXMAC__
|
||||
~CDlgEventLogListCtrl();
|
||||
#endif
|
||||
|
||||
#ifdef __WXGTK__
|
||||
void SaveEventHandler(wxEvtHandler *stdHandler) { savedHandler = stdHandler; }
|
||||
wxEvtHandler* savedHandler;
|
||||
wxScrolledWindow* GetMainWin(void) { return (wxScrolledWindow*) m_mainWin; }
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue