[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - fpicker/source

Szymon Kłos eszkadev at gmail.com
Fri Oct 2 03:45:05 PDT 2015


 fpicker/source/office/PlacesListBox.cxx |   17 +++++++++++++++++
 fpicker/source/office/PlacesListBox.hxx |    2 ++
 2 files changed, 19 insertions(+)

New commits:
commit 7dd8483362cf0ef102363204dd2235246400d96a
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Thu Oct 1 19:31:17 2015 +0200

    tdf#57370 : Open place after pressing 'Enter'
    
    Change-Id: Iabcf17b71b3fe06a25bb7b0e7f3aa65ad0663e69
    Reviewed-on: https://gerrit.libreoffice.org/19083
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/fpicker/source/office/PlacesListBox.cxx b/fpicker/source/office/PlacesListBox.cxx
index 5b6d334..66c8851 100644
--- a/fpicker/source/office/PlacesListBox.cxx
+++ b/fpicker/source/office/PlacesListBox.cxx
@@ -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 );
diff --git a/fpicker/source/office/PlacesListBox.hxx b/fpicker/source/office/PlacesListBox.hxx
index e2e0ab1..3149d79 100644
--- a/fpicker/source/office/PlacesListBox.hxx
+++ b/fpicker/source/office/PlacesListBox.hxx
@@ -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 );


More information about the Libreoffice-commits mailing list