/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to preferences/notifications.py

  • Committer: Jelmer Vernooij
  • Date: 2011-04-06 14:53:44 UTC
  • Revision ID: jelmer@samba.org-20110406145344-m6s0i7q7ssjwhmwq
Support use without gtk.Spinner, which is only available in pygtk >= 2.22.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
import gtk
24
24
 
25
25
import bzrlib.plugins.gtk
26
 
from bzrlib.plugins.gtk.notify import has_avahi, has_dbus
 
26
from bzrlib.plugins.gtk.notify import (
 
27
    has_avahi,
 
28
    has_dbus,
 
29
    )
 
30
 
27
31
 
28
32
def has_email():
29
33
    return (getattr(bzrlib.plugins, "email", None) is not None)
33
37
 
34
38
 
35
39
class NotificationsPage(gtk.VBox):
 
40
 
36
41
    def __init__(self, config, homogeneous=False, spacing=6):
37
42
        self.config = config
38
43
        gtk.VBox.__init__(self, homogeneous=homogeneous, spacing=spacing)
39
44
        self.set_spacing(spacing) # The vertical one
40
 
        
 
45
 
41
46
        lan_frame = gtk.Frame("LAN Notifications")
42
47
 
43
48
        lan_vbox = gtk.VBox()
67
72
        self.pack_start(email_frame)
68
73
 
69
74
        cia_frame = gtk.Frame("CIA notifications")
70
 
        
 
75
 
71
76
        cia_user_hbox = gtk.HBox()
72
77
        cia_user_hbox.pack_start(gtk.Label("Author name"))
73
78
        self.cia_user = gtk.Entry()
74
79
        cia_user_hbox.pack_start(self.cia_user)
75
 
    
 
80
 
76
81
        cia_frame.add(cia_user_hbox)
77
82
        cia_frame.set_sensitive(has_cia())
78
83