[ontv] Notification bubble fix



commit 9f2707b53c35911aa1e78b99e54a1bf956b6b6ed
Author: Olof Kindgren <olki src gnome org>
Date:   Thu May 20 22:55:10 2010 +0200

    Notification bubble fix
    
    This is a temporary workaround until I can find a better way to
    fix this. It also needs to be tested on other systems than Ubuntu

 ontv/notify.py |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/ontv/notify.py b/ontv/notify.py
index 14b891c..ffcdef2 100644
--- a/ontv/notify.py
+++ b/ontv/notify.py
@@ -36,23 +36,22 @@ except ImportError, ie:
         ed.run()
         sys.exit(1)
 
-TIMEOUT = 60000
+TIMEOUT = 60
 
 class Notification:
     def __init__(self, program, get_readable_time):
         self.program = program
         self.get_readable_time = get_readable_time
-
         pynotify.init(NAME)
 
-        self.__update_id = gobject.timeout_add(TIMEOUT, self.__update)
+        #self.__update_id = gobject.timeout_add(TIMEOUT, self.__update)
 
         self.__show()
 
     def __update(self):
         self.notification.update(self.__get_summary(), self.__get_body())
         timeout = self.__get_timeout()
-        if timeout <= 1000:
+        if timeout <= 1:
             return False
         self.notification.set_timeout(timeout)
         self.notification.show()
@@ -70,7 +69,7 @@ class Notification:
                self.get_readable_time(self.program.get_time_until_start())
 
     def __get_timeout(self):
-        return self.program.get_time_until_start().seconds * 1000
+        return self.program.get_time_until_start().seconds
 
     def __show(self):
         self.notification = pynotify.Notification(self.__get_summary(),



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