Slugify filename used as default value in file_selection

issue11917
review436211003
(grafted from 280447e4cdda6196fdef8183139347a03f1319cb)

--HG--
branch : 6.0
This commit is contained in:
Cédric Krier committed 2022-12-08 13:36:22 +01:00
1 parent b3b49f3379
commit 7fe29202a2
1 file changed
+1
+1
View File
@@ -423,6 +423,7 @@ def file_selection(title, filename='',
win.add_buttons(*buttons)
win.set_icon(TRYTON_ICON)
if filename:
filename = slugify(filename)
if action in (Gtk.FileChooserAction.SAVE,
Gtk.FileChooserAction.CREATE_FOLDER):
win.set_current_name(filename)