~torsten/bzr-gtk/throttle-config-updates

« back to all changes in this revision

Viewing changes to preferences/notifications.py

  • Committer: Vincent Ladeuil
  • Date: 2008-10-29 08:36:29 UTC
  • mto: This revision was merged to the branch mainline in revision 620.
  • Revision ID: v.ladeuil+lp@free.fr-20081029083629-50ozsjwm5y2py5kg
Fix bug #290618 by using the right facilities.

* preferences/notifications.py:
(NotificationsPage): Slight cosmetic adjustments.

* notify.py: 
<cough> don't import plugins.dbus just before defining a function
to check for its presence :)

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
from bzrlib.plugins.gtk.notify import has_avahi, has_dbus
26
26
 
27
27
class NotificationsPage(gtk.VBox):
28
 
    def __init__(self, config):
 
28
    def __init__(self, config, homogeneous=False, spacing=6):
29
29
        self.config = config
30
 
        gtk.VBox.__init__(self)
 
30
        gtk.VBox.__init__(self, homogeneous=homogeneous, spacing=spacing)
 
31
        self.set_spacing(spacing) # The vertical one
31
32
 
32
33
        self.gateway_to_lan = gtk.CheckButton("_Gateway to LAN")
33
 
        self.pack_start(self.gateway_to_lan)
 
34
        self.pack_start(self.gateway_to_lan, expand=False)
34
35
        self.gateway_to_lan.set_sensitive(has_dbus())
35
36
 
36
37
        self.announce_on_lan = gtk.CheckButton("_Announce on LAN")
37
 
        self.pack_start(self.announce_on_lan)
 
38
        self.pack_start(self.announce_on_lan, expand=False)
38
39
        self.announce_on_lan.set_sensitive(has_avahi())