summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-11-08 09:58:58 +0000
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2018-11-27 12:49:01 +0100
commit4846848941241f92b32bcffef3489736d1baffec (patch)
tree555eebf1e51a26ef40e0b64d9ccdd88c3efeb9fd
parent07542b44e7f86efacbe9427802b2fd4829ffbb49 (diff)
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@googlemail.com>
-rw-r--r--vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx9
1 files changed, 9 insertions, 0 deletions
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
+ }
}
}