/[circus]/circus/circus/circus.py
ViewVC logotype

Diff of /circus/circus/circus.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by tvon, Sat Nov 16 13:43:55 2002 UTC revision 1.12 by tvon, Sat Nov 16 20:02:05 2002 UTC
# Line 78  class Ringmaster: Line 78  class Ringmaster:
78          loop, waiting for events.          loop, waiting for events.
79          """          """
80    
         i = 0  
81          try:          try:
82              while 1:              while 1:
83                  self.manage_events(self.display.next_event())                  self.manage_events(self.display.next_event())
# Line 101  class Ringmaster: Line 100  class Ringmaster:
100          if event.type in self.module_events:          if event.type in self.module_events:
101             # print self.module_events[event.type], "Got the event:", event.type             # print self.module_events[event.type], "Got the event:", event.type
102              for i in range(len(self.module_events[event.type])):              for i in range(len(self.module_events[event.type])):
103                     # Avoiding using a tmp var here:
104                   # foo = self.module_events[event.type][i]                   # foo = self.module_events[event.type][i]
105                   # self.modules[foo].handle_event(event)                   # self.modules[foo].handle_event(event)
106                   self.modules[self.module_events[event.type][i]].handle_event(event)                   self.modules[self.module_events[event.type][i]].handle_event(event)
# Line 152  class Ringmaster: Line 152  class Ringmaster:
152    
153          # Add module name to events list, so we know what it wants to know about          # Add module name to events list, so we know what it wants to know about
154          for e in self.modules[module_name].my_events:          for e in self.modules[module_name].my_events:
155              self.module_events.setdefault(e, [module_name])              try:
156                    self.module_events[e].append(module_name)
157                except KeyError:
158                    self.module_events[e] = [module_name]
159                    
160          self.modules[module_name].__name__ = module_name          self.modules[module_name].__name__ = module_name
161          self.modules[module_name]._load(self.config, self.display)          self.modules[module_name]._load(self.config, self.display)

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26