/[gzz]/gzz/Gzz.py
ViewVC logotype

Diff of /gzz/Gzz.py

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

revision 1.60 by benja, Sun Jan 5 10:41:27 2003 UTC revision 1.61 by benja, Sun Jan 5 11:13:00 2003 UTC
# Line 33  flagset = ['multiline', 'double-size', ' Line 33  flagset = ['multiline', 'double-size', '
33    
34  def call(list, type=gzz.potion.CommandCall):  def call(list, type=gzz.potion.CommandCall):
35      if list is None: return None      if list is None: return None
36        if isinstance(list, gzz.potion.Expression): return list
37      head = list[0]      head = list[0]
38      params = [call(l, gzz.potion.FunctionCall) for l in list[1:]]      params = [call(l, gzz.potion.FunctionCall) for l in list[1:]]
39      print head, params      print head, params
# Line 123  class Gzz(java.lang.Runnable): Line 124  class Gzz(java.lang.Runnable):
124    
125              from gzz.potion.potions import NewCell, Connect, PrefixOrOther, \              from gzz.potion.potions import NewCell, Connect, PrefixOrOther, \
126                                             Hop2, Put, PrefixOrRight, PrefixOrLeft, \                                             Hop2, Put, PrefixOrRight, PrefixOrLeft, \
127                                             RightWindow, LeftWindow, Go, Clone,ToggleMark                                             RightWindow, LeftWindow, Go, Clone, \
128                                               ToggleMark, Quit, ChangeView, ChangeDim
129    
130                def const(i):
131                    from gzz.potion.potions import ConstantExpression
132                    return ConstantExpression(i, str(i))
133    
134              bindings = {              bindings = {
135                  'Up': arr(1,1,-1), 'i': arr(1,1,-1), 'e': arr(0,1,-1),                  'Up': arr(1,1,-1), 'i': arr(1,1,-1), 'e': arr(0,1,-1),
136                  'Down': arr(1,1,1), ',': arr(1,1,1), 'c': arr(0,1,1),                  'Down': arr(1,1,1), ',': arr(1,1,1), 'c': arr(0,1,1),
# Line 141  class Gzz(java.lang.Runnable): Line 148  class Gzz(java.lang.Runnable):
148                  'T': action([Clone,[PrefixOrLeft], None]),                  'T': action([Clone,[PrefixOrLeft], None]),
149                  'm': action([ToggleMark, [RightWindow]]),                  'm': action([ToggleMark, [RightWindow]]),
150                  'M': action([ToggleMark, [LeftWindow]]),                  'M': action([ToggleMark, [LeftWindow]]),
151                    'q': call([Quit]),
152                    'Q': call([Quit]),
153                    'x': call([ChangeDim, const(0), const(1)]),
154                    'Alt-X': call([ChangeDim, const(0), const(-1)]),
155                    'v': call([ChangeView, const(1)]),
156                    'Alt-V': call([ChangeView, const(-1)]),
157              }              }
158    
159              self.binder = gzz.client.PotionFallbackBinder(map(bindings))              self.binder = gzz.client.PotionFallbackBinder(map(bindings))
160              self.decorators.append(gzz.view.PendingPotionDecorator())              self.decorators.append(gzz.view.PendingPotionDecorator())
161          else:          else:

Legend:
Removed from v.1.60  
changed lines
  Added in v.1.61

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