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

Diff of /gzz/Gzz.py

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

revision 1.62 by benja, Sun Jan 5 11:17:59 2003 UTC revision 1.63 by benja, Sun Jan 5 11:33:08 2003 UTC
# Line 34  flagset = ['multiline', 'double-size', ' Line 34  flagset = ['multiline', 'double-size', '
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      if isinstance(list, gzz.potion.Expression): return list
37        print list
38      head = list[0]      head = list[0]
39      params = [call(l, gzz.potion.FunctionCall) for l in list[1:]]      params = [call(l, gzz.potion.FunctionCall) for l in list[1:]]
     print head, params  
40      return type(head(), params)      return type(head(), params)
41    
42  def action(list, win=1):  def action(list, win=1):
# Line 126  class Gzz(java.lang.Runnable): Line 126  class Gzz(java.lang.Runnable):
126                                             Hop2, Put, PrefixOrRight, PrefixOrLeft, \                                             Hop2, Put, PrefixOrRight, PrefixOrLeft, \
127                                             RightWindow, LeftWindow, Go, Clone, \                                             RightWindow, LeftWindow, Go, Clone, \
128                                             ToggleMark, Quit, ChangeView, ChangeDim, \                                             ToggleMark, Quit, ChangeView, ChangeDim, \
129                                             Break                                             Break, Delete, GoToOriginal
130    
131              def const(i):              def const(i):
132                  from gzz.potion.potions import ConstantExpression                  from gzz.potion.potions import ConstantExpression
# Line 142  class Gzz(java.lang.Runnable): Line 142  class Gzz(java.lang.Runnable):
142                  'n': action([NewCell, None]),                  'n': action([NewCell, None]),
143                  '-': action([Connect, [PrefixOrOther], None]),                  '-': action([Connect, [PrefixOrOther], None]),
144                  'h': action([Hop2, None]),                  'h': action([Hop2, None]),
145                  'p': action([Put,[RightWindow],[PrefixOrLeft]]),                  'p': action([Put,[RightWindow], [PrefixOrLeft]]),
146                    'P': action([Put,[LeftWindow], [PrefixOrRight]]),
147                  'g': action([Go, [PrefixOrOther]], 1),                  'g': action([Go, [PrefixOrOther]], 1),
148                  'G': action([Go, [PrefixOrOther]], 0),                  'G': action([Go, [PrefixOrOther]], 0),
149                  't': action([Clone,[PrefixOrRight], None]),                  't': action([Clone,[PrefixOrRight], None]),
# Line 157  class Gzz(java.lang.Runnable): Line 158  class Gzz(java.lang.Runnable):
158                  'Alt-V': action(call([ChangeView, const(-1)])),                  'Alt-V': action(call([ChangeView, const(-1)])),
159                  'b': action(call([Break, None])),                  'b': action(call([Break, None])),
160                  'B': action(call([Break, None])),                  'B': action(call([Break, None])),
161                    'Delete': action(call([Delete, [PrefixOrRight]])),
162                    'Alt-Backspace': action(call([Delete, [PrefixOrRight]])),
163                    'Shift-Delete': action(call([Delete, [PrefixOrLeft]])),
164                    'Alt-Shift-Delete': action(call([Delete, [PrefixOrLeft]])),
165                    'o': action(call([GoToOriginal, [RightWindow]]), 1),
166                    'O': action(call([GoToOriginal, [LeftWindow]]), 0),
167              }              }
168    
169              self.binder = gzz.client.PotionFallbackBinder(map(bindings))              self.binder = gzz.client.PotionFallbackBinder(map(bindings))

Legend:
Removed from v.1.62  
changed lines
  Added in v.1.63

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