From: pin Date: Fri, 1 Jul 2011 14:14:35 +0000 (+0000) Subject: Ajout d'une image par défaut si jamais il n'existe pas d'illustration personnalisée. X-Git-Url: https://svn.cri.ensmp.fr/git/minwii.git/commitdiff_plain/7d09df5d471bb8a7aeadb7535d4852604dbab757 Ajout d'une image par défaut si jamais il n'existe pas d'illustration personnalisée. git-svn-id: https://svn.cri.ensmp.fr/svn/minwii/trunk@364 fe552daf-6dbe-4428-90eb-1537e0879342 --- diff --git a/src/minwii/widgets/data/minwii_theme/config.txt b/src/minwii/widgets/data/minwii_theme/config.txt index ff6e2a5..0004c26 100644 --- a/src/minwii/widgets/data/minwii_theme/config.txt +++ b/src/minwii/widgets/data/minwii_theme/config.txt @@ -268,6 +268,7 @@ list.content padding_top 1 list.content padding_bottom 1 filedialog.folder image filebrowser.folder.png +filedialog.soundfile image note.png filedialog.label font Vera.ttf 28 filedialog.label color #000000 filedialog.title.label font Vera.ttf 32 diff --git a/src/minwii/widgets/data/minwii_theme/note.png b/src/minwii/widgets/data/minwii_theme/note.png new file mode 100644 index 0000000..f2f14f6 Binary files /dev/null and b/src/minwii/widgets/data/minwii_theme/note.png differ diff --git a/src/minwii/widgets/songfilebrowser.py b/src/minwii/widgets/songfilebrowser.py index cfa3022..ba8c836 100755 --- a/src/minwii/widgets/songfilebrowser.py +++ b/src/minwii/widgets/songfilebrowser.py @@ -36,6 +36,8 @@ class FileOpenDialog(FileDialog): else: self.curdir = path self.dir_img = basic.Image( pguglobals.app.theme.get(cls1+'.folder', '', 'image')) + self.soundfile_img = basic.Image( + pguglobals.app.theme.get(cls1+'.soundfile', '', 'image')) td_style = {'padding_left': 4, 'padding_right': 4, 'padding_top': 2, @@ -115,9 +117,9 @@ class FileOpenDialog(FileDialog): style['width'] = PICTURE_ITEM_SIZE * float(iw) / ih img = basic.Image(img, style=style) - self.list.add(l[0], value = l[1], image = img) else : - self.list.add(l[0], value = l[1]) + img = self.soundfile_img + self.list.add(l[0], value = l[1], image = img) self.list.set_vertical_scroll(0)