X-Git-Url: https://svn.cri.ensmp.fr/git/minwii.git/blobdiff_plain/ba291156447e1d50b5962c4041fd06248391a245..4396434d14a166c6b2d9569517779fc718915dea:/src/minwii/widgets/home.py diff --git a/src/minwii/widgets/home.py b/src/minwii/widgets/home.py index 44c101f..429342b 100755 --- a/src/minwii/widgets/home.py +++ b/src/minwii/widgets/home.py @@ -66,7 +66,7 @@ class Home(object, Table) : self.td(self.browseButton,colspan=2, style = STYLE_RIGHT_COL) self.tr() - caption = os.path.basename(self.songFile) + caption = '' if not self.songFile else FileOpenDialog.getSongTitle(self.songFile) self.songTitle = self.createLabel(caption) st = STYLE_RIGHT_COL.copy() del st['padding_top'] @@ -143,7 +143,8 @@ class Home(object, Table) : def handle_file_browser_closed(self, dlg) : if dlg.value and os.path.isfile(dlg.value): self.remove(self.songTitle) - self.songTitle = self.createLabel(os.path.basename(dlg.value)) + title = FileOpenDialog.getSongTitle(dlg.value) + self.songTitle = self.createLabel(title) self.td(self.songTitle, col=1, row=1, style=STYLE_RIGHT_COL) self.songFile = dlg.value self.playButton.disabled = False