-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
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
import time
import dbus
import osso
+import atexit
from dbus.mainloop.glib import DBusGMainLoop
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)
# 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
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()
#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):