X-Git-Url: https://scm.cri.ensmp.fr/git/minwii.git/blobdiff_plain/2f76050b40fd8c5ac811b3f4b94618180ff547ba..6f93851b51046713fa8538130ff6173a55d609bb:/src/minwii/widgets/home.py?ds=sidebyside 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