/[gzz]/gzz/gzz/modules/pp/demotest.py
ViewVC logotype

Diff of /gzz/gzz/modules/pp/demotest.py

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

revision 1.54 by mudyc, Fri Jan 10 06:40:16 2003 UTC revision 1.55 by mudyc, Fri Jan 10 09:11:39 2003 UTC
# Line 36  PPDIR=os.getcwd()+'/gzz/modules/pp/examp Line 36  PPDIR=os.getcwd()+'/gzz/modules/pp/examp
36  def clean_data(args=''):  def clean_data(args=''):
37      os.system('rm '+PPDIR+'b_*')      os.system('rm '+PPDIR+'b_*')
38      os.system('rm '+PPDIR+'d*')      os.system('rm '+PPDIR+'d*')
     #os.system('rm '+PPDIR+'ps_F*')  
39      if args=='full':      if args=='full':
40          os.system('rm '+PPDIR+'ps_*')          os.system('rm '+PPDIR+'ps_*')
41          os.system('rm '+PPDIR+'pp.gz')          os.system('rm '+PPDIR+'pp.gz')
# Line 44  def clean_data(args=''): Line 43  def clean_data(args=''):
43          os.system('rm '+PPDIR+'pp.gz')          os.system('rm '+PPDIR+'pp.gz')
44      if args=='exept_pkg':      if args=='exept_pkg':
45          os.system('rm '+PPDIR+'ps_*')          os.system('rm '+PPDIR+'ps_*')
     #os.system('ls -la '+PPDIR)  
46    
47  def return_data():  def return_data():
48      clean_data('exept_pkg')      clean_data('exept_pkg')
# Line 117  class PPView2Scene: Line 115  class PPView2Scene:
115          self.ppv.viewMode = self.ppv.JUST_BROWSING          self.ppv.viewMode = self.ppv.JUST_BROWSING
116    
117      def key(self, key):      def key(self, key):
118          #print 'key: ',key          print 'key: ',key
119          self.setDefaultViewMode()          self.setDefaultViewMode()
120    
121          if key == "Ctrl-T":          if key == "Ctrl-T":
# Line 127  class PPView2Scene: Line 125  class PPView2Scene:
125              self.ppv.test_Y = 1              self.ppv.test_Y = 1
126          if key == "Ctrl-U":          if key == "Ctrl-U":
127              self.ppv.test_U = 1              self.ppv.test_U = 1
128                
129            if key == "Ctrl-E":
130                print self.vs.matcher.interpList(self.vs.matcher, 0)
131    
132          if key == "Alt-R":          if key == "Alt-R":
133              os.system('make compile')              os.system('make compile')
134              loadScenes()              loadScenes()
# Line 143  class PPView2Scene: Line 144  class PPView2Scene:
144          if key == "Ctrl-X":          if key == "Ctrl-X":
145              print 'Save...'              print 'Save...'
146    
147                # Before saveing all empty cells should be removed!
148    
149              if firstTime:              if firstTime:
150                  clean_data('exept_ptr')                  clean_data('exept_ptr')
151              #else:              #else:
# Line 179  class PPView2Scene: Line 182  class PPView2Scene:
182          if key == "Ctrl-L":          if key == "Ctrl-L":
183              self.ppv.showLinkbuoys = not self.ppv.showLinkbuoys              self.ppv.showLinkbuoys = not self.ppv.showLinkbuoys
184    
185          if key == "Return":          if key == "Returnadsf":
186                return
187              self.ppv.viewMode = self.ppv.TEXT_EDITING              self.ppv.viewMode = self.ppv.TEXT_EDITING
188              c = self.avc.getAccursed()              c = self.avc.getAccursed()
189              print "Acc: ",c              print "Acc: ",c
# Line 195  class PPView2Scene: Line 199  class PPView2Scene:
199              self.avc.setCursorOffset(0)              self.avc.setCursorOffset(0)
200                            
201          if len(key) == 1 or key == "Backspace" or key == "Delete" \          if len(key) == 1 or key == "Backspace" or key == "Delete" \
202                 or key == "Left" or key == "Right":                 or key == "Left" or key == "Right" \
203                   or key == "Up" or key == "Down" \
204                   or key == "Home" or key == "End" \
205                   or key == "Return":
206    
207              self.ppv.viewMode = self.ppv.TEXT_EDITING              self.ppv.viewMode = self.ppv.TEXT_EDITING
208              self.ppv.showLinkbuoys = 1              self.ppv.showLinkbuoys = 1
209              if key == "Left" or key == "Right":              if key == "Left" or key == "Right" or key == "Up" or key == "Down":
210                  self.ppv.showLinkbuoys = 0                  self.ppv.showLinkbuoys = 0
211    
212              if not 32 <= ord(key[0]) <= 254:              if not 32 <= ord(key[0]) <= 254:
# Line 219  class PPView2Scene: Line 226  class PPView2Scene:
226              if len(key) == 1:              if len(key) == 1:
227                  self.ppactions.insertText(c.getId(), offs, key)                  self.ppactions.insertText(c.getId(), offs, key)
228                  self.avc.setCursorOffset(offs+1)                  self.avc.setCursorOffset(offs+1)
229                if key == "Return":
230                    self.ppactions.insertText(c.getId(), offs, '\n')
231                    self.avc.setCursorOffset(offs+1)
232              if key == "Backspace":              if key == "Backspace":
233                  if offs != 0:                  if offs != 0:
234                      self.ppactions.deleteText(c.getId(), offs-1, offs)                      self.ppactions.deleteText(c.getId(), offs-1, offs)
# Line 232  class PPView2Scene: Line 242  class PPView2Scene:
242              if key == "Right":              if key == "Right":
243                  if offs < len(c.t()):                  if offs < len(c.t()):
244                      self.avc.setCursorOffset(offs+1)                      self.avc.setCursorOffset(offs+1)
245                if key == "Up":
246                    self.avc.setCursorOffset(0)
247                if key == "Down":
248                    self.avc.setCursorOffset(len(c.t()))
249                            
250      def scene(self, vs):      def scene(self, vs):
251          vs.map.put(background((0.4,0.5,0.8)))          vs.map.put(background((0.4,0.5,0.8)))

Legend:
Removed from v.1.54  
changed lines
  Added in v.1.55

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