ontv r446 - trunk/ontv



Author: johans
Date: Fri Feb  8 22:01:31 2008
New Revision: 446
URL: http://svn.gnome.org/viewvc/ontv?rev=446&view=rev

Log:
Fixed warning.

Modified:
   trunk/ontv/PreferencesDialog.py
   trunk/ontv/ProgramWindow.py

Modified: trunk/ontv/PreferencesDialog.py
==============================================================================
--- trunk/ontv/PreferencesDialog.py	(original)
+++ trunk/ontv/PreferencesDialog.py	Fri Feb  8 22:01:31 2008
@@ -513,7 +513,7 @@
         elif entry.value.type == gconf.VALUE_BOOL:
             value = entry.value.get_bool()
             self.upcoming_programs_below_radiobutton.set_active(value)
-            self.pw.position_upcoming_programs_below(value)
+            self.pw.position_upcoming_programs(value)
         else:
             self.upcoming_programs_below_radiobutton.set_active(True)
 

Modified: trunk/ontv/ProgramWindow.py
==============================================================================
--- trunk/ontv/ProgramWindow.py	(original)
+++ trunk/ontv/ProgramWindow.py	Fri Feb  8 22:01:31 2008
@@ -291,7 +291,7 @@
 
         self.hbox.pack_start(self.cpt)
 
-        self.position_upcoming_programs_below(xmltvfile.config.upcoming_programs_below)
+        self.position_upcoming_programs(xmltvfile.config.upcoming_programs_below)
 
         frame = gtk.Frame()
         frame.add(self.vbox)
@@ -324,15 +324,17 @@
         self.move(x, y)
         self.set_gravity(gravity)
 
-    def position_upcoming_programs_below(self, below):
+    def position_upcoming_programs(self, below):
         if below:
             if self.upt in self.hbox.get_children():
                 self.hbox.remove(self.upt)
-            self.vbox.pack_start(self.upt)
+            if self.upt not in self.vbox.get_children():
+                self.vbox.pack_start(self.upt)
         else:
             if self.upt in self.vbox.get_children():
                 self.vbox.remove(self.upt)
-            self.hbox.pack_start(self.upt)
+            if self.upt not in self.hbox.get_children():
+                self.hbox.pack_start(self.upt)
         self.update()
 
     def update(self):



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