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']
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