Ticket #1530: filezilla_DEL_on_queue_window_rev2176.patch

File filezilla_DEL_on_queue_window_rev2176.patch, 1.2 KB (added by paolozambotti, 12 years ago)

Handling of DEL key in Queue window patch to rev 2176

  • src/interface/QueueView.h

     
    222222    void OnStopAndClear(wxCommandEvent& event);
    223223    void OnRemoveSelected(wxCommandEvent& event);
    224224    void OnSetDefaultFileExistsAction(wxCommandEvent& event);
     225    void OnChar(wxKeyEvent& event);
    225226
    226227    void OnAskPassword(wxCommandEvent& event);
    227228    void OnTimer(wxTimerEvent& evnet);
  • src/interface/QueueView.cpp

     
    160160EVT_MENU(XRCID("ID_ACTIONAFTER_PLAYSOUND"), CQueueView::OnActionAfter)
    161161EVT_MENU(XRCID("ID_ACTIONAFTER_REBOOT"), CQueueView::OnActionAfter)
    162162EVT_MENU(XRCID("ID_ACTIONAFTER_SHUTDOWN"), CQueueView::OnActionAfter)
     163EVT_CHAR(CQueueView::OnChar)
    163164
    164165EVT_COMMAND(wxID_ANY, fzEVT_ASKFORPASSWORD, CQueueView::OnAskPassword)
    165166
     
    28652866
    28662867    return false;
    28672868}
     2869
     2870void CQueueView::OnChar(wxKeyEvent& event)
     2871{
     2872    wxCommandEvent cmdEvt;
     2873    if (event.GetKeyCode() == WXK_DELETE)
     2874        CQueueView::OnRemoveSelected(cmdEvt);
     2875    else
     2876        event.Skip();
     2877}