[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - 2 commits - svtools/source svtools/uiconfig

Szymon Kłos eszkadev at gmail.com
Fri Jul 10 09:15:58 PDT 2015


 svtools/source/dialogs/RemoteFilesDialog.cxx |    8 +++++++-
 svtools/uiconfig/ui/remotefilesdialog.ui     |    5 +++--
 2 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit 15569ae52d04c3d69b48e83423a8df9b0a113576
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Fri Jul 10 18:11:11 2015 +0200

    Open/Save button should be the default button
    
    Change-Id: If2dc98beaff9cefcaf87be8773077524e2f5cb90

diff --git a/svtools/uiconfig/ui/remotefilesdialog.ui b/svtools/uiconfig/ui/remotefilesdialog.ui
index 0ba817b..cd73846 100644
--- a/svtools/uiconfig/ui/remotefilesdialog.ui
+++ b/svtools/uiconfig/ui/remotefilesdialog.ui
@@ -22,8 +22,7 @@
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">True</property>
+                <property name="receives_default">False</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
@@ -37,6 +36,7 @@
                 <property name="label">gtk-open</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
+                <property name="has_default">True</property>
                 <property name="receives_default">True</property>
                 <property name="use_stock">True</property>
               </object>
@@ -51,6 +51,7 @@
                 <property name="label">gtk-save</property>
                 <property name="can_focus">True</property>
                 <property name="can_default">True</property>
+                <property name="has_default">True</property>
                 <property name="receives_default">True</property>
                 <property name="use_stock">True</property>
               </object>
commit b0968d2a2c558a469cd57ee44f33bd07eb56b534
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Fri Jul 10 17:38:04 2015 +0200

    Container should be disposed before childs
    
    Change-Id: Ia6feb9c57ce574236e4763c61484fb5a14e55ff4

diff --git a/svtools/source/dialogs/RemoteFilesDialog.cxx b/svtools/source/dialogs/RemoteFilesDialog.cxx
index 4d5c619..6b4e39b 100644
--- a/svtools/source/dialogs/RemoteFilesDialog.cxx
+++ b/svtools/source/dialogs/RemoteFilesDialog.cxx
@@ -196,6 +196,9 @@ class FileViewContainer : public vcl::Window
 
     void changeFocus( bool bReverse )
     {
+        if( !m_pFileView || !m_pTreeView )
+            return;
+
         if( !bReverse && m_nCurrentFocus < 4 )
         {
             m_pFocusWidgets[++m_nCurrentFocus]->SetFakeFocus( true );
@@ -210,6 +213,9 @@ class FileViewContainer : public vcl::Window
 
     virtual void GetFocus() SAL_OVERRIDE
     {
+        if( !m_pFileView || !m_pTreeView )
+            return;
+
         m_nCurrentFocus = 1;
         m_pFocusWidgets[m_nCurrentFocus]->SetFakeFocus( true );
         m_pFocusWidgets[m_nCurrentFocus]->GrabFocus();
@@ -353,10 +359,10 @@ void RemoteFilesDialog::dispose()
         batch->commit();
     }
 
+    m_pContainer.disposeAndClear(); // container must be first!
     m_pTreeView.disposeAndClear();
     m_pFileView.disposeAndClear();
     m_pSplitter.disposeAndClear();
-    m_pContainer.disposeAndClear();
     m_pPath.disposeAndClear();
 
     m_pOk_btn.clear();


More information about the Libreoffice-commits mailing list