boinc/clientgui/DlgEventLogListCtrl.cpp

104 lines
2.7 KiB
C++
Raw Normal View History

2012-12-21 18:05:01 +00:00
// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 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
// as published by the Free Software Foundation,
// either version 3 of the License, or (at your option) any later version.
//
// BOINC is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see <http://www.gnu.org/licenses/>.
#if defined(__GNUG__) && !defined(__APPLE__)
#pragma implementation "DlgEventLogListCtrl.h"
#endif
#include "stdwx.h"
#include "diagnostics.h"
#include "util.h"
#include "mfile.h"
#include "miofile.h"
#include "parse.h"
#include "error_numbers.h"
#include "BOINCGUIApp.h"
#include "SkinManager.h"
#include "MainDocument.h"
#include "DlgEventLogListCtrl.h"
#include "DlgEventLog.h"
IMPLEMENT_DYNAMIC_CLASS(CDlgEventLogListCtrl, DLG_LISTCTRL_BASE)
BEGIN_EVENT_TABLE(CDlgEventLogListCtrl, DLG_LISTCTRL_BASE)
EVT_LEFT_UP(CDlgEventLogListCtrl::OnMouseUp)
Merge commit '03cc6849c7d32f0028869a581ad03916ceb4d8b5' into charlief/wxwidgets30 # By David Anderson (617) and others # Via Oliver Bock (56) and others * commit '03cc6849c7d32f0028869a581ad03916ceb4d8b5': (1943 commits) remote job submission: add C++ interface to estimate_batch function translation stuff locale: Update compiled localization files Commit from Pootle Demo by user admin.: 1563 of 2856 strings translated (190 fuzzy). Commit from Pootle Demo by user admin.: 2741 of 2859 strings translated (45 fuzzy). Commit from Pootle Demo by user admin.: 1097 of 2859 strings translated (154 fuzzy). locale: Update compiled localization files Commit from Pootle Demo by user admin.: 2831 of 2859 strings translated (1 fuzzy). Commit from Pootle Demo by user admin.: 1097 of 2859 strings translated (154 fuzzy). Commit from Pootle Demo by user admin.: 3158 of 3183 strings translated (2 fuzzy). client: Remove build environment changes that attempted to detect Android, it wasn't needed. client: fix Android OS detection client: only add the pthread libs if not linking for Android android: Bulk import of localization text android: Bulk import of localization text locale: Update compiled localization files Commit from Pootle Demo by user admin.: 2817 of 2859 strings translated (4 fuzzy). Commit from Pootle Demo by user admin.: 2830 of 2859 strings translated (1 fuzzy). locale: Update compiled localization files Commit from Pootle Demo by user admin.: 2741 of 2859 strings translated (95 fuzzy). ... Conflicts: checkin_notes clientgui/AsyncRPC.cpp clientgui/BOINCGUIApp.cpp clientgui/DlgEventLog.cpp clientgui/DlgEventLogListCtrl.cpp clientgui/DlgEventLogListCtrl.h clientgui/MainDocument.cpp clientgui/NoticeListCtrl.cpp clientgui/mac/MacBitmapComboBox.cpp clientgui/mac/SetVersion.cpp clientgui/mac/templates/SystemMenu-Info.plist clientgui/sg_BoincSimpleFrame.cpp mac_build/boinc.xcodeproj/project.pbxproj win_build/example_app_multi_thread.vcproj win_build/gr_boinc_ss.vcproj win_build/sleeper.vcproj win_build/uc2.vcproj win_build/uc2_graphics.vcproj win_build/vboxwrapper.vcproj win_build/wrapper.vcproj
2013-10-22 10:53:45 +00:00
#ifdef __WXMAC__
EVT_SIZE(CDlgEventLogListCtrl::OnSize)
#endif
2012-12-21 18:05:01 +00:00
END_EVENT_TABLE()
CDlgEventLogListCtrl::CDlgEventLogListCtrl() {}
CDlgEventLogListCtrl::CDlgEventLogListCtrl(CDlgEventLog* pView, wxWindowID iListWindowID, wxInt32 iListWindowFlags)
: DLG_LISTCTRL_BASE(pView, iListWindowID, wxDefaultPosition, wxDefaultSize, iListWindowFlags)
{
m_pParentView = pView;
m_bIsSingleSelection = (iListWindowFlags & wxLC_SINGLE_SEL) ? true : false ;
Merge commit '03cc6849c7d32f0028869a581ad03916ceb4d8b5' into charlief/wxwidgets30 # By David Anderson (617) and others # Via Oliver Bock (56) and others * commit '03cc6849c7d32f0028869a581ad03916ceb4d8b5': (1943 commits) remote job submission: add C++ interface to estimate_batch function translation stuff locale: Update compiled localization files Commit from Pootle Demo by user admin.: 1563 of 2856 strings translated (190 fuzzy). Commit from Pootle Demo by user admin.: 2741 of 2859 strings translated (45 fuzzy). Commit from Pootle Demo by user admin.: 1097 of 2859 strings translated (154 fuzzy). locale: Update compiled localization files Commit from Pootle Demo by user admin.: 2831 of 2859 strings translated (1 fuzzy). Commit from Pootle Demo by user admin.: 1097 of 2859 strings translated (154 fuzzy). Commit from Pootle Demo by user admin.: 3158 of 3183 strings translated (2 fuzzy). client: Remove build environment changes that attempted to detect Android, it wasn't needed. client: fix Android OS detection client: only add the pthread libs if not linking for Android android: Bulk import of localization text android: Bulk import of localization text locale: Update compiled localization files Commit from Pootle Demo by user admin.: 2817 of 2859 strings translated (4 fuzzy). Commit from Pootle Demo by user admin.: 2830 of 2859 strings translated (1 fuzzy). locale: Update compiled localization files Commit from Pootle Demo by user admin.: 2741 of 2859 strings translated (95 fuzzy). ... Conflicts: checkin_notes clientgui/AsyncRPC.cpp clientgui/BOINCGUIApp.cpp clientgui/DlgEventLog.cpp clientgui/DlgEventLogListCtrl.cpp clientgui/DlgEventLogListCtrl.h clientgui/MainDocument.cpp clientgui/NoticeListCtrl.cpp clientgui/mac/MacBitmapComboBox.cpp clientgui/mac/SetVersion.cpp clientgui/mac/templates/SystemMenu-Info.plist clientgui/sg_BoincSimpleFrame.cpp mac_build/boinc.xcodeproj/project.pbxproj win_build/example_app_multi_thread.vcproj win_build/gr_boinc_ss.vcproj win_build/sleeper.vcproj win_build/uc2.vcproj win_build/uc2_graphics.vcproj win_build/vboxwrapper.vcproj win_build/wrapper.vcproj
2013-10-22 10:53:45 +00:00
#ifdef __WXMAC__
m_fauxHeaderView = NULL;
m_fauxBodyView = NULL;
2012-12-21 18:05:01 +00:00
#ifdef __WXMAC__
SetupMacAccessibilitySupport();
#endif
Merge commit '03cc6849c7d32f0028869a581ad03916ceb4d8b5' into charlief/wxwidgets30 # By David Anderson (617) and others # Via Oliver Bock (56) and others * commit '03cc6849c7d32f0028869a581ad03916ceb4d8b5': (1943 commits) remote job submission: add C++ interface to estimate_batch function translation stuff locale: Update compiled localization files Commit from Pootle Demo by user admin.: 1563 of 2856 strings translated (190 fuzzy). Commit from Pootle Demo by user admin.: 2741 of 2859 strings translated (45 fuzzy). Commit from Pootle Demo by user admin.: 1097 of 2859 strings translated (154 fuzzy). locale: Update compiled localization files Commit from Pootle Demo by user admin.: 2831 of 2859 strings translated (1 fuzzy). Commit from Pootle Demo by user admin.: 1097 of 2859 strings translated (154 fuzzy). Commit from Pootle Demo by user admin.: 3158 of 3183 strings translated (2 fuzzy). client: Remove build environment changes that attempted to detect Android, it wasn't needed. client: fix Android OS detection client: only add the pthread libs if not linking for Android android: Bulk import of localization text android: Bulk import of localization text locale: Update compiled localization files Commit from Pootle Demo by user admin.: 2817 of 2859 strings translated (4 fuzzy). Commit from Pootle Demo by user admin.: 2830 of 2859 strings translated (1 fuzzy). locale: Update compiled localization files Commit from Pootle Demo by user admin.: 2741 of 2859 strings translated (95 fuzzy). ... Conflicts: checkin_notes clientgui/AsyncRPC.cpp clientgui/BOINCGUIApp.cpp clientgui/DlgEventLog.cpp clientgui/DlgEventLogListCtrl.cpp clientgui/DlgEventLogListCtrl.h clientgui/MainDocument.cpp clientgui/NoticeListCtrl.cpp clientgui/mac/MacBitmapComboBox.cpp clientgui/mac/SetVersion.cpp clientgui/mac/templates/SystemMenu-Info.plist clientgui/sg_BoincSimpleFrame.cpp mac_build/boinc.xcodeproj/project.pbxproj win_build/example_app_multi_thread.vcproj win_build/gr_boinc_ss.vcproj win_build/sleeper.vcproj win_build/uc2.vcproj win_build/uc2_graphics.vcproj win_build/vboxwrapper.vcproj win_build/wrapper.vcproj
2013-10-22 10:53:45 +00:00
#endif
2012-12-21 18:05:01 +00:00
}
#ifdef __WXMAC__
CDlgEventLogListCtrl::~CDlgEventLogListCtrl()
{
RemoveMacAccessibilitySupport();
}
#endif
wxString CDlgEventLogListCtrl::OnGetItemText(long item, long column) const {
wxASSERT(m_pParentView);
wxASSERT(wxDynamicCast(m_pParentView, CDlgEventLog));
return m_pParentView->OnListGetItemText(item, column);
}
int CDlgEventLogListCtrl::OnGetItemImage(long /* item */) const {
return 1;
}
wxListItemAttr* CDlgEventLogListCtrl::OnGetItemAttr(long item) const {
wxASSERT(m_pParentView);
wxASSERT(wxDynamicCast(m_pParentView, CDlgEventLog));
return m_pParentView->OnListGetItemAttr(item);
}
wxColour CDlgEventLogListCtrl::GetBackgroundColour() {
return *wxWHITE;
}
void CDlgEventLogListCtrl::OnMouseUp(wxMouseEvent& event) {
m_pParentView->UpdateButtons();
event.Skip();
}
Merge commit '03cc6849c7d32f0028869a581ad03916ceb4d8b5' into charlief/wxwidgets30 # By David Anderson (617) and others # Via Oliver Bock (56) and others * commit '03cc6849c7d32f0028869a581ad03916ceb4d8b5': (1943 commits) remote job submission: add C++ interface to estimate_batch function translation stuff locale: Update compiled localization files Commit from Pootle Demo by user admin.: 1563 of 2856 strings translated (190 fuzzy). Commit from Pootle Demo by user admin.: 2741 of 2859 strings translated (45 fuzzy). Commit from Pootle Demo by user admin.: 1097 of 2859 strings translated (154 fuzzy). locale: Update compiled localization files Commit from Pootle Demo by user admin.: 2831 of 2859 strings translated (1 fuzzy). Commit from Pootle Demo by user admin.: 1097 of 2859 strings translated (154 fuzzy). Commit from Pootle Demo by user admin.: 3158 of 3183 strings translated (2 fuzzy). client: Remove build environment changes that attempted to detect Android, it wasn't needed. client: fix Android OS detection client: only add the pthread libs if not linking for Android android: Bulk import of localization text android: Bulk import of localization text locale: Update compiled localization files Commit from Pootle Demo by user admin.: 2817 of 2859 strings translated (4 fuzzy). Commit from Pootle Demo by user admin.: 2830 of 2859 strings translated (1 fuzzy). locale: Update compiled localization files Commit from Pootle Demo by user admin.: 2741 of 2859 strings translated (95 fuzzy). ... Conflicts: checkin_notes clientgui/AsyncRPC.cpp clientgui/BOINCGUIApp.cpp clientgui/DlgEventLog.cpp clientgui/DlgEventLogListCtrl.cpp clientgui/DlgEventLogListCtrl.h clientgui/MainDocument.cpp clientgui/NoticeListCtrl.cpp clientgui/mac/MacBitmapComboBox.cpp clientgui/mac/SetVersion.cpp clientgui/mac/templates/SystemMenu-Info.plist clientgui/sg_BoincSimpleFrame.cpp mac_build/boinc.xcodeproj/project.pbxproj win_build/example_app_multi_thread.vcproj win_build/gr_boinc_ss.vcproj win_build/sleeper.vcproj win_build/uc2.vcproj win_build/uc2_graphics.vcproj win_build/vboxwrapper.vcproj win_build/wrapper.vcproj
2013-10-22 10:53:45 +00:00