[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - vcl/unx

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Nov 27 11:49:23 UTC 2018


 vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 4846848941241f92b32bcffef3489736d1baffec
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Nov 8 09:58:58 2018 +0000
Commit:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
CommitDate: Tue Nov 27 12:49:01 2018 +0100

    Resolves: tdf#119790 for gtk3 save and restore typed name on changing filter
    
    Change-Id: I17c3d154144b13ce401b0e4afe84c91a2fe98d8e
    Reviewed-on: https://gerrit.libreoffice.org/63076
    Tested-by: Jenkins
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index 16a845eabe81..75458dae1a13 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -807,7 +807,16 @@ uno::Sequence<OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles()
                             }
                         }
                         if( bChangeFilter && bExtensionTypedIn )
+                        {
+#if GTK_CHECK_VERSION(3,0,0)
+                            gchar* pCurrentName = gtk_file_chooser_get_current_name(GTK_FILE_CHOOSER(m_pDialog));
+                            setCurrentFilter( aNewFilter );
+                            gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(m_pDialog), pCurrentName);
+                            g_free(pCurrentName);
+#else
                             setCurrentFilter( aNewFilter );
+#endif
+                        }
                     }
                 }
 


More information about the Libreoffice-commits mailing list