[Pkg-bazaar-commits] ./bzr-gtk/unstable r621: Merge trunk, add cia/email fields.

Jelmer Vernooij jelmer at samba.org
Fri Apr 10 07:44:23 UTC 2009


------------------------------------------------------------
revno: 621
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Thu 2008-10-30 14:48:44 +0100
message:
  Merge trunk, add cia/email fields.
added:
  preferences/TODO
modified:
  preferences/notifications.py
-------------- next part --------------
=== added file 'preferences/TODO'
--- a/preferences/TODO	1970-01-01 00:00:00 +0000
+++ b/preferences/TODO	2008-10-30 13:48:44 +0000
@@ -0,0 +1,2 @@
+- per_file_commits
+- push/pull/submit/public locations

=== modified file 'preferences/notifications.py'
--- a/preferences/notifications.py	2008-10-29 08:36:29 +0000
+++ b/preferences/notifications.py	2008-10-30 13:48:44 +0000
@@ -22,18 +22,58 @@
 
 import gtk
 
+import bzrlib.plugins.gtk
 from bzrlib.plugins.gtk.notify import has_avahi, has_dbus
 
+def has_email():
+    return (getattr(bzrlib.plugins, "email", None) is not None)
+
+def has_cia():
+    return (getattr(bzrlib.plugins, "cia", None) is not None)
+
+
 class NotificationsPage(gtk.VBox):
     def __init__(self, config, homogeneous=False, spacing=6):
         self.config = config
         gtk.VBox.__init__(self, homogeneous=homogeneous, spacing=spacing)
         self.set_spacing(spacing) # The vertical one
+        
+        lan_frame = gtk.Frame("LAN Notifications")
+
+        lan_vbox = gtk.VBox()
+        lan_frame.add(lan_vbox)
 
         self.gateway_to_lan = gtk.CheckButton("_Gateway to LAN")
-        self.pack_start(self.gateway_to_lan, expand=False)
+        lan_vbox.pack_start(self.gateway_to_lan)
         self.gateway_to_lan.set_sensitive(has_dbus())
 
         self.announce_on_lan = gtk.CheckButton("_Announce on LAN")
-        self.pack_start(self.announce_on_lan, expand=False)
+        lan_vbox.pack_start(self.announce_on_lan)
         self.announce_on_lan.set_sensitive(has_avahi())
+
+        self.pack_start(lan_frame)
+
+        email_frame = gtk.Frame("E-mail notifications")
+
+        email_hbox = gtk.HBox()
+        self.send_email = gtk.CheckButton("Send _E-Mail to")
+        email_hbox.pack_start(self.send_email)
+        self.send_email_to = gtk.Entry()
+        email_hbox.pack_start(self.send_email_to)
+
+        email_frame.add(email_hbox)
+        email_frame.set_sensitive(has_email())
+
+        self.pack_start(email_frame)
+
+        cia_frame = gtk.Frame("CIA notifications")
+        
+        cia_user_hbox = gtk.HBox()
+        cia_user_hbox.pack_start(gtk.Label("Author name"))
+        self.cia_user = gtk.Entry()
+        cia_user_hbox.pack_start(self.cia_user)
+    
+        cia_frame.add(cia_user_hbox)
+        cia_frame.set_sensitive(has_cia())
+
+        self.pack_start(cia_frame)



More information about the Pkg-bazaar-commits mailing list