1 # -*- coding: utf-8 -*-
3 Boîte de dialogue pour sélection des chansons.
9 from pgu
.gui
import FileDialog
12 class FileOpenDialog(FileDialog
):
16 def __init__(self
, path
):
17 FileDialog
.__init
__(self
,
18 title_txt
="Ouvrir une chanson",
24 self
.input_dir
.value
= self
.curdir
25 self
.input_dir
.pos
= len(self
.curdir
)
26 self
.input_dir
.vpos
= 0
30 for i
in os
.listdir(self
.curdir
):
31 if os
.path
.isdir(os
.path
.join(self
.curdir
, i
)): dirs
.append(i
)
34 self
.input_file
.value
= "Opps! no access"
35 #if '..' not in dirs: dirs.append('..')
41 if i
.startswith('.') and i
!= '..' :
43 self
.list.add(i
, image
=self
.dir_img
, value
=i
)
46 if i
.startswith('.') or (not i
.endswith('.xml')) :
48 self
.list.add(i
,value
=i
)
50 self
.list.set_vertical_scroll(0)