From 727d859ec78361502a50cdb9d2b3fe2c11d31413 Mon Sep 17 00:00:00 2001 From: Leonardo Robol Date: Mon, 9 Nov 2009 12:20:21 +0100 Subject: [PATCH] Corretto errore nell'utilizzo del loader appena inserito --- RaiTV/Interface.py | 4 +++- RaiTV/VideoWidget.py | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/RaiTV/Interface.py b/RaiTV/Interface.py index 696f35d..bba1578 100644 --- a/RaiTV/Interface.py +++ b/RaiTV/Interface.py @@ -52,7 +52,9 @@ class UI(): ## la videowidget self.pannellocentrale = self.builder.get_object("pannellocentrale") - self.videowidget = VideoWidget() + ## Gli passiamo anche il loader altrimenti non sa come caricare + ## le immagini! :) + self.videowidget = VideoWidget(self.loader) self.pannellocentrale.pack2(self.videowidget) ## Visualizziamo il nome del canale diff --git a/RaiTV/VideoWidget.py b/RaiTV/VideoWidget.py index f39e51f..6299206 100644 --- a/RaiTV/VideoWidget.py +++ b/RaiTV/VideoWidget.py @@ -100,7 +100,9 @@ class GstPlayer(threading.Thread): class VideoWidget(gtk.DrawingArea): - def __init__(self): + def __init__(self, loader): + + self.loader = loader ## Creo la drawing area e la coloro ## di nero @@ -138,7 +140,7 @@ class VideoWidget(gtk.DrawingArea): cr.rectangle(0,0,width,height) cr.fill() - pixbuf = gtk.gdk.pixbuf_new_from_file("ui/rai_logo.png") + pixbuf = gtk.gdk.pixbuf_new_from_file(self.loader.UIPath("rai_logo.png")) x = pixbuf.get_width() y = pixbuf.get_height() cr.set_source_pixbuf(pixbuf,max((width-x)/2,0),max((height-y)/2,0)) -- 2.1.4