X-Git-Url: https://scm.cri.ensmp.fr/git/minwii.git/blobdiff_plain/346a9b8e1fcfe30629f0d1ee4675e9e8f89890cf..4c4732c6ed8cb0aaa70fb2d4c6e5a958868c5349:/src/gui/MINWiiDialog.py diff --git a/src/gui/MINWiiDialog.py b/src/gui/MINWiiDialog.py deleted file mode 100644 index 4116318..0000000 --- a/src/gui/MINWiiDialog.py +++ /dev/null @@ -1,65 +0,0 @@ -# -*- coding: utf-8 -*- -''' -Created on 17 dec. 2009 - -@author: samsam -''' - -import pgu.gui as pguGui -import os -import constants - -class MINWiiDialog(pguGui.FileDialog): - ''' - classdocs - ''' - - def __init__(self, font = None, width = 800, height = 600,path=None): - pguGui.FileDialog.__init__(self,title_txt = "Choisir une chanson", customFont = font,customWidth = width, customHeight = height,folderText = "", fileText = "",path =path,showCurDir = False) - - def _list_dir_(self): - self.input_dir.value = self.curdir - self.input_dir.pos = len(self.curdir) - self.input_dir.vpos = 0 - dirs = [] - files = [] - try: - for i in os.listdir(self.curdir): - if os.path.isdir(os.path.join(self.curdir, i)): dirs.append(i) - else: files.append(i) - except: - self.input_file.value = "Opps! no access" - #if '..' not in dirs: dirs.append('..') - dirs.sort() - dirs = ['..'] + dirs - - files.sort() - for i in dirs: - #item = ListItem(image=self.dir_img, text=i, value=i) - if self.customFont == None : - self.list.add(i,image=self.dir_img,value=i) - else : - if i == ".." or i[0] != ".": - label = pguGui.basic.Label(i,font = self.customFont) - self.list.add(label,image=self.dir_img,value=i) - for i in files: - #item = ListItem(image=None, text=i, value=i) - if self.customFont == None : - self.list.add(i,value=i) - else: - if i.endswith(".smwi"): - key = i[:-5] - if key in constants.reversedReadabilityDict : - label = pguGui.basic.Label(constants.reversedReadabilityDict[key],font = self.customFont) - else : - label = pguGui.basic.Label(key,font = self.customFont) - self.list.add(label,value=i) - elif i.endswith(".xml") : - # TODO : afficher le Titre de la chanson au lieu du nom - # de fichier - label = pguGui.basic.Label(i, font=self.customFont) - self.list.add(label,value=i) - #self.list.resize() - self.list.set_vertical_scroll(0) - #self.list.repaintall() - \ No newline at end of file