[ontv] Avoid using config instance from listings



commit a1b1c0041af86787866681fd1d156802476e9d9b
Author: Olof Kindgren <olki src gnome org>
Date:   Thu Jan 27 11:44:46 2011 +0100

    Avoid using config instance from listings
    
    Use the config class directly instead of calling the one
    instantiated from listings. This is a starting point for cleaning
    up the interface towards the listings class to make it pluggable

 ontv/window.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/ontv/window.py b/ontv/window.py
index 08a6d95..5f46dba 100644
--- a/ontv/window.py
+++ b/ontv/window.py
@@ -234,9 +234,10 @@ class UpcomingProgramTable(ProgramTable):
     def __init__(self, listings):
         self.title = _("Upcoming programs")
         ProgramTable.__init__(self, listings, self.title)
+        self.config = Configuration()
 
     def add_channel(self, channel, column, row):
-        if self.listings.config.upcoming_programs_below:
+        if self.config.upcoming_programs_below:
             ProgramTable.add_channel(self, channel, column, row)
 
     def set_programs(self):
@@ -292,8 +293,8 @@ class ProgramWindow:
 
         self.hbox.pack_start(self.cpt)
 
-        self.position_upcoming_programs(xmltvfile.config.upcoming_programs_below)
         self.config = Configuration()
+        self.position_upcoming_programs(self.config.upcoming_programs_below)
 
     def is_visible(self):
         return self.win.props.visible



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]