- MGR: Remove event handlers for wxEVT_SET_FOCUS and wxEVT_KILL_FOCUS,

we are no longer removing the highlight on a project unless
        a new project is selected.  This continues to show that a certain
        project is still selected even when you switch to the ProjectURL
        control.  Anyways, the Mac doesn't like the focus events.
        
        clientgui/
            ProjectListCtrl.cpp, .h
    

svn path=/trunk/boinc/; revision=18491
This commit is contained in:
Rom Walton 2009-06-23 22:17:49 +00:00
parent 15ccf7b778
commit a6da58a18a
3 changed files with 18 additions and 23 deletions

View File

@ -6008,3 +6008,13 @@ Jeff 23 June 2009
ops/
db_update.php
Rom 23 June 2009
- MGR: Remove event handlers for wxEVT_SET_FOCUS and wxEVT_KILL_FOCUS,
we are no longer removing the highlight on a project unless
a new project is selected. This continues to show that a certain
project is still selected even when you switch to the ProjectURL
control. Anyways, the Mac doesn't like the focus events.
clientgui/
ProjectListCtrl.cpp, .h

View File

@ -125,7 +125,7 @@ void CProjectListCtrl::CreateControls()
* event handler for window
*/
void CProjectListCtrl::OnItemChange( wxFocusEvent& event ) {
void CProjectListCtrl::OnItemChange( wxMouseEvent& event ) {
// Fire an event for the parent window notifing it of the new selection.
CProjectListItemCtrl* pSelectedItem = wxDynamicCast(event.GetEventObject(), CProjectListItemCtrl);
@ -178,7 +178,7 @@ void CProjectListCtrl::OnItemDisplay( wxCommandEvent& event ) {
* event handler for window
*/
void CProjectListCtrl::OnItemFocusChange( wxFocusEvent& event ) {
void CProjectListCtrl::OnItemFocusChange( wxMouseEvent& event ) {
if ( wxEVT_SET_FOCUS == event.GetEventType() ) {
// Reset the background color back to the default
@ -321,8 +321,6 @@ BEGIN_EVENT_TABLE( CProjectListItemCtrl, wxPanel )
EVT_LEAVE_WINDOW( CProjectListItemCtrl::OnMouseEnterLeave )
EVT_LEFT_DOWN( CProjectListItemCtrl::OnMouseClick )
EVT_LEFT_UP( CProjectListItemCtrl::OnMouseClick )
EVT_SET_FOCUS( CProjectListItemCtrl::OnFocusChange )
EVT_KILL_FOCUS( CProjectListItemCtrl::OnFocusChange )
EVT_KEY_DOWN( CProjectListItemCtrl::OnKeyPressed )
EVT_KEY_UP( CProjectListItemCtrl::OnKeyPressed )
EVT_BUTTON( ID_WEBSITEBUTTON, CProjectListItemCtrl::OnWebsiteButtonClick )
@ -416,7 +414,10 @@ void CProjectListItemCtrl::OnMouseClick( wxMouseEvent& event ) {
m_bLeftButtonDownDetected = true;
} else {
if ( m_bLeftButtonDownDetected ) {
SetFocus();
CProjectListCtrl* pParent = wxDynamicCast(GetParent(), CProjectListCtrl);
if (pParent) {
pParent->OnItemFocusChange( event );
}
}
}
event.Skip();
@ -424,18 +425,6 @@ void CProjectListItemCtrl::OnMouseClick( wxMouseEvent& event ) {
}
/*!
* wxEVT_SET_FOCUS, wxEVT_KILL_FOCUS event handler for window
*/
void CProjectListItemCtrl::OnFocusChange( wxFocusEvent& event ) {
CProjectListCtrl* pParent = wxDynamicCast(GetParent(), CProjectListCtrl);
if (pParent) {
pParent->OnItemFocusChange( event );
}
}
/*!
* wxEVT_KEY_DOWN, wxEVT_KEY_UP event handler for window
*/

View File

@ -27,7 +27,6 @@ class CProjectListItemCtrl;
class CProjectListItemStaticCtrl;
class CProjectListItemBitmapCtrl;
class ProjectListCtrlEvent;
class ProjectListItemCtrlEvent;
////@begin control identifiers
@ -59,13 +58,13 @@ public:
////@begin CProjectListCtrl event handler declarations
/// event handler for window
void OnItemChange( wxFocusEvent& event );
void OnItemChange( wxMouseEvent& event );
/// event handler for window
void OnItemDisplay( wxCommandEvent& event );
/// event handler for window
void OnItemFocusChange( wxFocusEvent& event );
void OnItemFocusChange( wxMouseEvent& event );
/// wxEVT_SET_FOCUS, wxEVT_KILL_FOCUS event handler for window
void OnFocusChanged( wxFocusEvent& event );
@ -167,9 +166,6 @@ public:
/// wxEVT_LEFT_DOWN, wxEVT_LEFT_UP event handler for window
void OnMouseClick( wxMouseEvent& event );
/// wxEVT_SET_FOCUS, wxEVT_KILL_FOCUS event handler for window
void OnFocusChange( wxFocusEvent& event );
/// wxEVT_KEY_DOWN, wxEVT_KEY_UP event handler for window
void OnKeyPressed( wxKeyEvent& event );