From 3354775a9a239ff9b1bb97b6be0dd2106a134a48 Mon Sep 17 00:00:00 2001 From: Skyler Lehmkuhl Date: Fri, 18 Jan 2013 13:32:16 -0500 Subject: [PATCH] Gave file types names in Linux file dialogs --- svlgui.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/svlgui.py b/svlgui.py index c2fdb86..7a521ab 100644 --- a/svlgui.py +++ b/svlgui.py @@ -2888,6 +2888,14 @@ def file_dialog(mode="open",default=None,types=None,multiple=False,name=None): for i in types: ntypes.append(GUI.Files.FileType()) ntypes[-1].suffix = i + image = ["jpg", "jpeg", "png", "tiff", "tga"] + audio = ["wav", "mp3", "ogg"] + if i in image: + ntypes[-1].name = i.upper()+" Images" + elif i in audio: + ntypes[-1].name = i.upper()+" Audio" + else: + ntypes[-1].name = i.upper()+" Files" if i in mactypes: ntypes[-1].mac_type=mactypes[i] types = ntypes