~awn-extras/awn-extras/vector-effects-extras

« back to all changes in this revision

Viewing changes to src/to-do/settings.py

  • Committer: Michal Hruby
  • Date: 2008-09-29 19:42:23 UTC
  • mfrom: (877.1.13 awn-extras)
  • Revision ID: mhr3@zoznam.sk-20080929194223-c2q6qbr7attyuo8o
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
142
142
      for x in strings:
143
143
        self._connects[x].append([function,args1,args2])
144
144
  
 
145
  #Opposite of connect
 
146
  def disconnect(self, strings, function):
 
147
    if type(strings) == str:
 
148
      for func in self._connects[strings]:
 
149
        if func[0] == function:
 
150
          self._connects[strings].remove(func)
 
151
    
 
152
    else:
 
153
      for string in strings:
 
154
        for func in self._connects[strings]:
 
155
          if func[0] == function:
 
156
            self._connects[strings].remove(func)
 
157
  
145
158
  #In case the user wants to get a value via <settingsinstance>[<key>]
146
159
  def __getitem__(self,key):
147
160
    return self.get(key)