From 41867d9f46468e5e60d6a93516763cd50cec8f55 Mon Sep 17 00:00:00 2001 From: Leonardo Robol Date: Sun, 22 Nov 2009 14:03:01 +0100 Subject: [PATCH] =?UTF-8?q?Corretto=20bug=20nel=20pulsante=20Play=20quando?= =?UTF-8?q?=20viene=20cliccato=20e=20non=20c'=C3=A8=20nulla=20di=20selezio?= =?UTF-8?q?nato.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Grazie a Pietro per la segnalazione :) --- RaiTV/Interface.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/RaiTV/Interface.py b/RaiTV/Interface.py index bba1578..76c572f 100644 --- a/RaiTV/Interface.py +++ b/RaiTV/Interface.py @@ -106,9 +106,18 @@ class UI(): self.updatelist.connect("clicked", lambda w: self.updateChannels() ) def play(self): + """Controlla se c'รจ qualcosa di selezionato ed eventualmente + lo comincia a riprodurre""" + if self.videowidget is None: + return + if not self.videowidget.playing: treeselection = self.listacanali.get_selection() model, treeiter = treeselection.get_selected() + if treeiter is None: + ## Questo vuol dire che non abbiamo selezionato + ## nulla, e quindi possiamo non fare nulla + return mmsurl = self.channellist.getChannelFromIter(treeiter) self.videowidget.load_video(mmsurl) else: -- 2.1.4