Imported Upstream version 0.0.3
authorPali Rohár <pali.rohar@gmail.com>
Fri, 22 Jun 2012 12:11:04 +0000 (14:11 +0200)
committerPali Rohár <pali.rohar@gmail.com>
Fri, 22 Jun 2012 12:11:04 +0000 (14:11 +0200)
debian/changelog
debian/control
debian/copyright
debian/postinst
debian/postrm
src/usr/lib/hildon-desktop/CallNotify.py

index 071a601..1e77328 100644 (file)
@@ -1,6 +1,6 @@
-callnotify (0.0.2-1) stable; urgency=low
+callnotify (0.0.3-1) stable; urgency=low
 
-  * Fixed - IM messages would trigger the notification as well. 
-  * Notification will stop when screen is off to save battery.
+  * Sending SMS to yourself will not rise notification
+  * Better cleanup after update/remove.
 
- -- Omer Agmon <omeriko9@gmail.com>  Sun, 28 Mar 2010 13:39:41 +0000
+ -- Omer Agmon <omeriko9@gmail.com>  Sun, 28 Mar 2010 20:51:53 +0000
index 46e098c..04aa18a 100644 (file)
@@ -8,7 +8,7 @@ Standards-Version: 3.7.2
 Package: callnotify
 Architecture: all
 Depends: python2.5, python-osso, python-dbus, python2.5-gtk2, python-hildondesktop
-Description: Call and SMS notifier.
+Description: Missed calls and SMS notifier.
  Will display a small status bar icon for missed Calls and SMS.
  The icon will disappear after closing the yellow notification or viewing the SMS.
 XSBC-Bugtracker: http://talk.maemo.org/showthread.php?t=48501
index 810fef9..d8a123c 100644 (file)
@@ -1,5 +1,5 @@
 This package was py2debianized(0.5.3) by Omer Agmon <omeriko9@gmail.com> on
-Sun, 28 Mar 2010 13:39:41 +0000.
+Sun, 28 Mar 2010 20:51:53 +0000.
 
 It was downloaded from 
 
index 27fa7f2..d313abf 100644 (file)
@@ -1,2 +1,3 @@
 #!/bin/sh
+       killall -9 hildon-status-menu
        killall hildon-status-menu
\ No newline at end of file
index 27fa7f2..d313abf 100644 (file)
@@ -1,2 +1,3 @@
 #!/bin/sh
+       killall -9 hildon-status-menu
        killall hildon-status-menu
\ No newline at end of file
index 1722673..d0c9989 100644 (file)
@@ -5,6 +5,7 @@ import sqlite3
 import time
 import dbus
 import osso
+import atexit
 from dbus.mainloop.glib import DBusGMainLoop
 
 
@@ -25,7 +26,7 @@ class CallNotify(hildondesktop.StatusMenuItem):
                self.missedSMS = self.getMissedCallsCount(True)
                self.missedLastCall = self.missed
                self.missedLastSMS = self.missedSMS
-               
+               self.mainLoop = None            
                # Register to handle screen off/on events
                osso_c = osso.Context("osso_test_device_on", "0.0.1", False)
                device = osso.DeviceState(osso_c)
@@ -36,6 +37,12 @@ class CallNotify(hildondesktop.StatusMenuItem):
                # add d-bus listener for removing notification after viewing missed call
                # Doing timeout_add with return False instead of explicitly raising a thread
                gobject.timeout_add(500, self.startDbusListeners)
+               atexit.register(self.cleanup)
+
+    def cleanup():
+               gobject.source_remove(self.tmr_main)                           
+                gobject.source_remove(self.tmr_ptr)            
+               self.mainLoop.quit()
 
     def loadImages(self):
                # Load phone image
@@ -65,6 +72,10 @@ class CallNotify(hildondesktop.StatusMenuItem):
        return False
                
        # Method to define the way to add dbus signal receiver
+
+    def smsrec(self):
+       self.stop_notification(self)
+
     def startDbusListeners(self):
                DBusGMainLoop(set_as_default=True)                             
                 bus = dbus.SessionBus()                                        
@@ -73,7 +84,10 @@ class CallNotify(hildondesktop.StatusMenuItem):
                #bus.add_signal_receiver(self.handleMissedCall, "MembersChanged", None, None, None)
                bus.add_signal_receiver(self.smsReceived, "MessageReceived", None, None, None)
                bus.add_signal_receiver(self.smsRead, "NotificationClosed", "org.freedesktop.Notifications", None, "/org/freedesktop/Notifications")
-                gobject.MainLoop().run()                                       
+               bus.add_signal_receiver(self.smsrec, "Closed", None, None, None)
+
+                self.mainLoop = gobject.MainLoop()
+               self.mainLoop.run()                                       
                return False
     
     def smsReceived(self, a):