From: pin Date: Mon, 14 Jun 2010 08:50:51 +0000 (+0000) Subject: Affichage du titre dans l'écran d'accueil. X-Git-Url: https://scm.cri.ensmp.fr/git/minwii.git/commitdiff_plain/4396434d14a166c6b2d9569517779fc718915dea?ds=sidebyside Affichage du titre dans l'écran d'accueil. git-svn-id: https://svn.cri.ensmp.fr/svn/minwii/trunk@230 fe552daf-6dbe-4428-90eb-1537e0879342 --- 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