Kaydet (Commit) 7dd84833 authored tarafından Szymon Kłos's avatar Szymon Kłos Kaydeden (comit) Caolán McNamara

tdf#57370 : Open place after pressing 'Enter'

Change-Id: Iabcf17b71b3fe06a25bb7b0e7f3aa65ad0663e69
Reviewed-on: https://gerrit.libreoffice.org/19083Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 1d49c4a5
......@@ -167,6 +167,23 @@ void PlacesListBox::SetSizePixel( const Size& rNewSize )
mpDelBtn->SetPosPixel( Point( 6 + 24, nBtnY ) );
}
bool PlacesListBox::Notify( NotifyEvent& rNEvt )
{
if( rNEvt.GetType() == MouseNotifyEvent::KEYINPUT )
{
const KeyEvent* pKeyEvent = rNEvt.GetKeyEvent();
const vcl::KeyCode& rCode = pKeyEvent->GetKeyCode();
if( rCode.GetCode() == KEY_RETURN )
{
mbSelectionChanged = true;
updateView();
return true;
}
}
return Control::Notify( rNEvt );
}
Image PlacesListBox::getEntryIcon( PlacePtr pPlace )
{
Image theImage = mpDlg->GetButtonImage( IMG_FILEDLG_PLACE_LOCAL );
......
......@@ -70,6 +70,8 @@ class PlacesListBox : public Control
VclPtr<PushButton> GetDeleteButton() const { return mpDelBtn; }
VclPtr<PlacesListBox_Impl> GetPlacesListBox() const { return mpImpl; }
virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
private:
Image getEntryIcon( PlacePtr pPlace );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment