Permalink
Browse files

linux notification

  • Loading branch information...
1 parent c3de398 commit f3e4f36111a367b223d60d26836c02b12dd2d389 @krolow committed Apr 30, 2012
@@ -20,13 +20,10 @@ def notify(self):
if (self.__can_notify()):
status = self.rest.get_current_status()
if (status == False):
- notification.Notify("Don't forget to start one task at Jira:")
+ notification.Notify("Don't forget to start one task at Jira!")
self.lastNotify = time.time()
def __can_notify(self):
- print self.__check_interval()
- print self.__check_date()
- print self.__check_hour()
return self.__check_interval() and self.__check_date() and self.__check_hour()
def __check_interval(self):
@@ -0,0 +1,18 @@
+import sys
+import pynotify
+
+class Pynotify:
+
+ def __init__(self, message = None):
+ self.message = message
+
+ def send(self, message = None):
+ if (message == None):
+ message = self.message
+ pynotify.init('jiroflex')
+ n = pynotify.Notification(
+ "JiroFlex",
+ self.message,
+ "dialog-warning"
+ )
+ n.show()
@@ -1,6 +1,5 @@
import gntp.notifier
-
class Growl:
def __init__(self, message = None):
@@ -12,8 +12,15 @@ def darwin(self):
self.notify = notify.Growl(self.message)
def linux32(self):
+ self.linux()
+
+ def linux2(self):
+ self.linux()
+
+ def linux(self):
from Linux import notify
-
+ self.notify = notify.Pynotify(self.message)
+
def win32(self):
from Windows import notify

0 comments on commit f3e4f36

Please sign in to comment.