[clocks] added open_new_dialog in class Alarm



commit 816332c55afb3cf0c773e7806c9390124b59cfc5
Author: Emily Gonyer <emilyyrose gmail com>
Date:   Wed Jun 13 14:06:58 2012 -0400

    added open_new_dialog in class Alarm
    
    Signed-off-by: Seif Lotfy <seif lotfy com>

 clocks.py  |    9 +++++++--
 widgets.py |    1 -
 2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/clocks.py b/clocks.py
index 6373e89..fa80d39 100644
--- a/clocks.py
+++ b/clocks.py
@@ -21,12 +21,13 @@
 from gi.repository import Gtk, GObject, Gio, Gdk
 from gi.repository.GdkPixbuf import Pixbuf
 
-from widgets import NewWorldClockWidget, DigitalClock
+from widgets import NewWorldClockWidget, DigitalClock, NewAlarm
 from storage import worldclockstorage
 
 from datetime import datetime, timedelta
 from pytz import timezone
 from timer import TimerWelcomeScreen, TimerScreen, Spinner
+from alarm import AlarmItem
 import pytz, time, os
 
 
@@ -151,7 +152,11 @@ class World (Clock):
 class Alarm (Clock):
     def __init__ (self):
         Clock.__init__ (self, "Alarm", True)
-        self.button.set_sensitive (False)
+        self.button.set_sensitive (True)
+
+    def open_new_dialog(self):
+        window = NewAlarm()
+        window.show_all ()
 
 class Stopwatch (Clock):
 
diff --git a/widgets.py b/widgets.py
index ef9aed8..157442b 100644
--- a/widgets.py
+++ b/widgets.py
@@ -156,7 +156,6 @@ class DigitalClock ():
     def get_standalone_widget (self):
         return self.standalone
 
-
 class DigitalClockStandalone (Gtk.VBox):
     def __init__ (self, location):
         Gtk.VBox.__init__ (self, False)



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