From 068f84ba0043cd9ca9a62c67366445633bbda8b8 Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Wed, 29 Apr 2009 22:55:17 +0200 Subject: [PATCH] set default notification timeout to 10 s --- contents/code/main.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/contents/code/main.py b/contents/code/main.py index d0bebb5..b9ba909 100644 --- a/contents/code/main.py +++ b/contents/code/main.py @@ -341,7 +341,7 @@ def updateActivities(self, activities): dateFormatted = date.strftime("%A, %d. %B") projectName = self.projects[int(activity["project_id"])] time = self.formatMinutes(activity["minutes"]) - label.setText('%s: %s on %s' % (dateFormatted, time, projectName)) + label.setText('%s: %s on %s' % (dateFormatted, time, projectName)) if activities: self.projectNameCombo.nativeWidget().setCurrentItem(self.projects[activities[0]['project_id']]) @@ -357,22 +357,22 @@ def formatMinutes(self, minutes): def morningCheck(self): self.morningTimer.stop() - self.sendNotification("Morning!
Did you fill Rubytime for yesterday?") + self.sendNotification("Morning!
Did you fill Rubytime for yesterday?", 0) pass def afternoonCheck(self): self.afternoonTimer.stop() - self.sendNotification("Good afternoon!
Don't forget to add today's activities to Rubytime.") + self.sendNotification("Good afternoon!
Don't forget to add today's activities to Rubytime.", 0) pass def showFlash(self, msg): print "flash: " + msg - self.sendNotification(msg, 10000) + self.sendNotification(msg) - def sendNotification(self, body, timeout=0): + def sendNotification(self, body, timeout=10000): # KNotification.event("rubytime-check", # body, # QPixmap(), @@ -403,8 +403,8 @@ def createConfigurationInterface(self, parent): p = parent.addPage(self.configNotificationsForm, ki18n("General").toString()) p.setIcon( KIcon("preferences-desktop-notification") ) # init notifications page -# self.configNotifications.username.setText("jola") - + # ... + # buttons parent.setButtons(KDialog.ButtonCode(KDialog.Ok | KDialog.Cancel)) self.connect(parent, SIGNAL("okClicked()"), self.configAccepted)