[gnome-clocks] Use a better message for the timer notification



commit 6cd1e0a403b934e9b2a528fb57425494acea222e
Author: Paolo Borelli <pborelli gnome org>
Date:   Sat Dec 15 15:20:27 2012 +0100

    Use a better message for the timer notification

 gnomeclocks/alarm.py |    2 +-
 gnomeclocks/timer.py |    4 +++-
 gnomeclocks/utils.py |    4 ++--
 3 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/gnomeclocks/alarm.py b/gnomeclocks/alarm.py
index 888f86d..9ed7e62 100644
--- a/gnomeclocks/alarm.py
+++ b/gnomeclocks/alarm.py
@@ -88,7 +88,7 @@ class AlarmItem:
 
         self.alarm_time_string = TimeString.format_time(self.alarm_time)
         self.alarm_repeat_string = self._get_alarm_repeat_string()
-        self.alert = Alert("alarm-clock-elapsed", name)
+        self.alert = Alert("alarm-clock-elapsed", _("Alarm"), name)
 
     # two alarms are equal if they have the same name, time and days,
     # the active attribute doesn't matter
diff --git a/gnomeclocks/timer.py b/gnomeclocks/timer.py
index e557b88..68bacdf 100644
--- a/gnomeclocks/timer.py
+++ b/gnomeclocks/timer.py
@@ -175,7 +175,9 @@ class Timer(Clock):
 
         self.show_all()
 
-        self.alert = Alert("complete", "Ta Da !")
+        self.alert = Alert("complete",
+                           _("Time is up!"),
+                           _("Timer countdown finished"))
 
     @GObject.Signal
     def alarm_ringing(self):
diff --git a/gnomeclocks/utils.py b/gnomeclocks/utils.py
index 79e84fa..b441c3a 100644
--- a/gnomeclocks/utils.py
+++ b/gnomeclocks/utils.py
@@ -163,7 +163,7 @@ class WallClock(GObject.GObject):
 class Alert:
     settings = Gio.Settings.new('org.gnome.desktop.sound')
 
-    def __init__(self, soundid, msg):
+    def __init__(self, soundid, title, msg):
         try:
             self.canberra = pycanberra.Canberra()
         except Exception as e:
@@ -175,7 +175,7 @@ class Alert:
 
         self.notification = None
         if Notify.is_initted() or Notify.init("GNOME Clocks"):
-            self.notification = Notify.Notification.new("Clocks", msg, 'clocks')
+            self.notification = Notify.Notification.new(title, msg, 'gnome-clocks')
         else:
             print "Error: Could not trigger Alert"
 



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