? doc/.cvsignore
? doc/man/.cvsignore
? doc/ui/.cvsignore
? doc/workbook/.cvsignore
? src/.cvsignore
? src/AEChooser/.cvsignore
? src/AEEvent/.cvsignore
? src/AEInput/.cvsignore
? src/AEMonitor/.cvsignore
? src/AEOutput/.cvsignore
? src/AEState/.cvsignore
? src/Adapters/.cvsignore
? src/Adapters/ATSPI/.cvsignore
? src/Choosers/.cvsignore
? src/Devices/.cvsignore
? src/Monitors/.cvsignore
? src/Perks/.cvsignore
? src/Task/.cvsignore
? src/Task/Tools/.cvsignore
? src/Templates/.cvsignore
? src/Walker/.cvsignore
? src/pyLinAcc/.cvsignore
Index: .cvsignore
===================================================================
RCS file: /cvs/gnome/lsr/.cvsignore,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 .cvsignore
--- .cvsignore	19 May 2006 14:56:53 -0000	1.1.1.1
+++ .cvsignore	28 Nov 2006 18:32:27 -0000
@@ -1,3 +1,19 @@
-en_GB.po
+INSTALL
+Makefile
+Makefile.in
+aclocal.m4
+autom4te.cache
 build
+config.log
+config.status
+configure
 doc
+en_GB.po
+install-sh
+lsr.desktop
+lsr.spec
+missing
+mkinstalldirs
+omf.make
+py-compile
+xmldocs.make
Index: src/TierManager.py
===================================================================
RCS file: /cvs/gnome/lsr/src/TierManager.py,v
retrieving revision 1.41
diff -u -r1.41 TierManager.py
--- src/TierManager.py	27 Nov 2006 20:28:25 -0000	1.41
+++ src/TierManager.py	28 Nov 2006 18:32:27 -0000
@@ -382,13 +382,18 @@
     @type event: L{AEEvent.Base.AccessEngineEvent}
     '''
     aid = event.getAppID()
-    try:
-      # choose the Tier given its application ID
-      tier = self.tiers[aid]
-    except KeyError:
-      return
-    # let that Tier manage the event
-    tier.manageEvent(event)
+    if aid:
+      aids = [aid]
+    else:
+      aids = self.tiers.keys()
+    for aid in aids:
+      try:
+        # choose the Tier given its application ID
+        tier = self.tiers[aid]
+      except KeyError:
+        continue
+      # let that Tier manage the event
+      tier.manageEvent(event)
     
   def manageTimer(self, event):
     '''
Index: src/AEEvent/SettingChange.py
===================================================================
RCS file: /cvs/gnome/lsr/src/AEEvent/SettingChange.py,v
retrieving revision 1.3
diff -u -r1.3 SettingChange.py
--- src/AEEvent/SettingChange.py	16 Nov 2006 16:13:30 -0000	1.3
+++ src/AEEvent/SettingChange.py	28 Nov 2006 18:32:27 -0000
@@ -40,7 +40,7 @@
   @type kwargs: dictionary
   '''
   Constants.registerEventType('SettingChange', False)
-  def __init__(self, aid, source, state, name, value, **kwargs):
+  def __init__(self, aid, source, state, name, value, sensitive=True, **kwargs):
     '''
     Stores important references.
     
@@ -63,6 +63,7 @@
     self.state = state
     self.name = name
     self.value = value
+    self.sensitive = sensitive
     
   def __str__(self):
     '''
@@ -114,5 +115,5 @@
     d = {}
     d.update(self.kwargs)
     d.update(dict(source=self.source, state=self.state, name=self.name, 
-                  value=self.value))
-    return d
\ No newline at end of file
+                  value=self.value, sensitive=self.sensitive))
+    return d
Index: src/AEState/Base.py
===================================================================
RCS file: /cvs/gnome/lsr/src/AEState/Base.py,v
retrieving revision 1.11
diff -u -r1.11 Base.py
--- src/AEState/Base.py	16 Nov 2006 16:13:31 -0000	1.11
+++ src/AEState/Base.py	28 Nov 2006 18:32:27 -0000
@@ -46,6 +46,7 @@
   def __init__(self):
     '''Initialize the dirty set.'''
     self._dirty = set()
+    self._insensitive = set()
     
   def __eq__(self, other):
     '''
@@ -150,6 +151,15 @@
     for name in self._dirty:
       value = getattr(self, name)
       yield name, value
+
+  def getSensitive(self, name):
+    return not name in self._insensitive
+  
+  def setSensitive(self, name, sensitive):
+    if not sensitive:
+      self._insensitive.add(name)
+    else:
+      self._insensitive.discard(name)
   
   def _newGroup(self, name=None):
     '''
@@ -192,4 +202,4 @@
     @rtype: L{AEState.Setting.Group}
     @raise NotImplementedError: When not implemented in a subclass
     '''
-    raise NotImplementedError
\ No newline at end of file
+    raise NotImplementedError
Index: src/AEState/Setting.py
===================================================================
RCS file: /cvs/gnome/lsr/src/AEState/Setting.py,v
retrieving revision 1.14
diff -u -r1.14 Setting.py
--- src/AEState/Setting.py	27 Nov 2006 18:03:02 -0000	1.14
+++ src/AEState/Setting.py	28 Nov 2006 18:32:27 -0000
@@ -294,6 +294,12 @@
     
   value = property(getValue, setValue)
     
+  def getSensitive(self):
+    return self.context.getSensitive(self.variable)
+
+  def setSensitive(self, sensitive):
+    self.context.setSensitive(self.variable, sensitive)
+
   def save(self):
     '''Saves the current variable value.'''
     self.cached = self.value
Index: src/Choosers/SettingsChooser.py
===================================================================
RCS file: /cvs/gnome/lsr/src/Choosers/SettingsChooser.py,v
retrieving revision 1.28
diff -u -r1.28 SettingsChooser.py
--- src/Choosers/SettingsChooser.py	27 Nov 2006 18:03:16 -0000	1.28
+++ src/Choosers/SettingsChooser.py	28 Nov 2006 18:32:27 -0000
@@ -253,6 +253,9 @@
     self.system = system
     self.perks = perks
     self.devices = devices
+
+    # Map each widget and setting to a state and name
+    self.setting_contexts = {}
     
     # load the glade file
     gtk.glade.set_custom_handler(self._createCustomWidget)
@@ -496,6 +499,7 @@
     @type group: L{AEState.Setting.Group}
     '''
     n = len(group)
+    state = group.context
     # use a n by 2 table to order widgets nicely
     table = gtk.Table(n, 2)
     table.set_row_spacings(5)
@@ -516,29 +520,27 @@
         # screws up the order in the acc. hierarchy
         table.attach(widget, 0, 2, n-row-1, n-row, yoptions=gtk.FILL, 
                      xpadding=5)
-      elif isinstance(widget, gtk.CheckButton):
-        if setting.description:
-          # set description as tooltip and accessible description
-          self.tips.set_tip(widget, setting.description)
-          Atk.setNameDesc(widget, description=setting.description)
+      else:
+        if isinstance(widget, gtk.CheckButton):
           # check buttons have a label already, so fill the row
           table.attach(widget, 0, 2, n-row-1, n-row, yoptions=gtk.FILL)
-          widget.connect('focus', self._onScrollToFocus, viewport)
-      else:
+        else:
+          # relate the label to the widget
+          Atk.setRelation(widget, atk.RELATION_LABELLED_BY, label)
+          Atk.setRelation(label, atk.RELATION_LABEL_FOR, widget)
+          # attach to the table
+          # note: add widget on the right first then label on the left, 
+          # else gail screws up the order in the acc. hierarchy
+          table.attach(widget, 1, 2, n-row-1, n-row, yoptions=gtk.FILL)
+          table.attach(label, 0, 1, n-row-1, n-row, gtk.FILL, gtk.FILL, 5, 0)
         if setting.description:
           # set description as tooltip and accessible description
           self.tips.set_tip(widget, setting.description)
           Atk.setNameDesc(widget, description=setting.description)
-        # relate the label to the widget
-        Atk.setRelation(widget, atk.RELATION_LABELLED_BY, label)
-        Atk.setRelation(label, atk.RELATION_LABEL_FOR, widget)
-        # attach to the table
-        # nit: add widget on the right first then label on the left, else gail
-        # screws up the order in the acc. hierarchy
-        table.attach(widget, 1, 2, n-row-1, n-row, yoptions=gtk.FILL)
-        table.attach(label, 0, 1, n-row-1, n-row, gtk.FILL, gtk.FILL, 5, 0)
         # watch for focus on the widget so we can scroll
         widget.connect('focus', self._onScrollToFocus, viewport)
+        widget.set_sensitive(setting.getSensitive())
+        self.setting_contexts[(state,setting.variable)] = (widget, setting)
     return table
   
   def _getAssociated(self):
@@ -623,4 +625,27 @@
     @todo: PP: need to get a reference to the panel showing the given state,
       and the widget representing the named setting
     '''
-    print 'chooser updating', state, name, value
+    try:
+      widget, setting = self.setting_contexts[(state, name)]
+    except KeyError:
+      return
+    
+    if isinstance(widget, gtk.CheckButton):
+      widget.set_active(value)
+    elif isinstance(widget, gtk.FileChooserButton):
+      widget.set_filename(value)
+    elif isinstance(widget, gtk.Entry):
+      widget.set_text(value)
+    elif isinstance(widget, gtk.HScale):
+      widget.set_value(value)
+    elif isinstance(widget, gtk.SpinButton):
+      widget.set_value(value)
+    elif isinstance(widget, gtk.ComboBox):
+      widget.set_active(setting.values.index(value))
+    
+  def updateSensitive(self, state, name, sensitive):
+    try:
+      widget, setting = self.setting_contexts[(state, name)]
+    except KeyError:
+      return
+    widget.set_sensitive(sensitive)
Index: src/Perks/DefaultDialogPerk.py
===================================================================
RCS file: /cvs/gnome/lsr/src/Perks/DefaultDialogPerk.py,v
retrieving revision 1.35
diff -u -r1.35 DefaultDialogPerk.py
--- src/Perks/DefaultDialogPerk.py	16 Nov 2006 16:13:34 -0000	1.35
+++ src/Perks/DefaultDialogPerk.py	28 Nov 2006 18:32:27 -0000
@@ -413,7 +413,7 @@
     '''
     self.chooser = chooser
   
-  def execute(self, source, state, name, value, **kwargs):
+  def execute(self, source, state, name, value, sensitive, **kwargs):
     '''
     Gets the settings chooser task and its associated chooser. Informs the
     chooser of the change in setting so it can update its UI to match the new
@@ -431,4 +431,7 @@
     '''
     # if the setting change originated elsewhere, inform the chooser
     if self.chooser is not source:
-      self.chooser.updateSetting(state, name, value)
+      if value:
+        self.chooser.updateSetting(state, name, value)
+    self.chooser.updateSensitive(state, name, sensitive)
+    return True
Index: src/Task/Tools/System.py
===================================================================
RCS file: /cvs/gnome/lsr/src/Task/Tools/System.py,v
retrieving revision 1.45
diff -u -r1.45 System.py
--- src/Task/Tools/System.py	16 Nov 2006 16:13:35 -0000	1.45
+++ src/Task/Tools/System.py	28 Nov 2006 18:32:27 -0000
@@ -949,7 +949,7 @@
     self.device_man.unloadDevices()
     self.device_man.loadDevices()
     
-  def signalSetting(self, state, name, value, **kwargs):
+  def signalSetting(self, state, name, value=None, sensitive=True, all_tiers=False, **kwargs):
     '''
     Sends an L{AEEvent.SettinChange} indicating the setting with the given name
     in the given L{AEState} object changed its value. Any keyword arguments
@@ -962,9 +962,15 @@
     @type name: string
     @param value: New value of the setting
     @type value: object
+    @param all_tiers: Send signal to all LSR tiers
+    @type all_tiers: boolean
     @param kwargs: Arbitrary data to be delivered with the event
     @type kwargs: dictionary
     '''
-    event = AEEvent.SettingChange(self.tier.getIdentity(), self.perk, state, 
-                                  name, value, **kwargs)
-    self.event_man.postEvents(event)
\ No newline at end of file
+    if all_tiers:
+      event = AEEvent.SettingChange(None, self.perk, state, 
+                                    name, value, sensitive, **kwargs)
+    else:
+      event = AEEvent.SettingChange(self.tier.getIdentity(), self.perk, state, 
+                                    name, value, sensitive, **kwargs)
+    self.event_man.postEvents(event)
