gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz/gzz/modules/pp demotest.py


From: Matti Katila
Subject: [Gzz-commits] gzz/gzz/modules/pp demotest.py
Date: Fri, 07 Feb 2003 03:25:10 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Matti Katila <address@hidden>   03/02/07 03:25:10

Modified files:
        gzz/modules/pp : demotest.py 

Log message:
        fixes: PPDIR and falling down on empty cell link.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gzz/modules/pp/demotest.py.diff?tr1=1.71&tr2=1.72&r1=text&r2=text

Patches:
Index: gzz/gzz/modules/pp/demotest.py
diff -u gzz/gzz/modules/pp/demotest.py:1.71 gzz/gzz/modules/pp/demotest.py:1.72
--- gzz/gzz/modules/pp/demotest.py:1.71 Tue Feb  4 21:31:24 2003
+++ gzz/gzz/modules/pp/demotest.py      Fri Feb  7 03:25:10 2003
@@ -50,8 +50,14 @@
 slicer = SingleSlicer("foo")
 
 usingNormalBindings = 0
+ownUse = 0
 
-PPDIR=os.getcwd()+'/gzz/modules/pp/example/'
+if ownUse:
+    PPDIR=os.getcwd()+'/pp/'
+    FILE=File
+else:
+    PPDIR=os.getcwd()+'/gzz/modules/pp/example/'
+    
 def clean_data(args=''):
     os.system('rm '+PPDIR+'b_*')
     os.system('rm '+PPDIR+'d*')
@@ -77,9 +83,11 @@
             clean_data('full')
         os.system('mv '+ PPDIR +'ps_FOO '+ PPDIR+'ps_foo')            
 
+        print os.getcwd()+PPDIR
+
         # Next, the mediaserver we'll save to.
         self.ms = gzz.mediaserver.SimpleMediaserver(
-            
gzz.mediaserver.storage.DirStorer(File(os.getcwd()+'/gzz/modules/pp/example/')))
+            gzz.mediaserver.storage.DirStorer(File(PPDIR)))
         
         # We need to get a "filer" for storing versions of our space.
         # Accept this part as 'magic' for now...
@@ -287,9 +295,10 @@
                 self.ppactions.insertText(c.getId(), offs, '\n')
                 self.avc.setCursorOffset(offs+1)
             if key == "Backspace":
-                if offs != 0:
+                if offs > 0:
                     self.ppactions.deleteText(c.getId(), offs-1, offs)
                     self.avc.setCursorOffset(offs-1)
+                    
                 if c.t() == None or c.t() == '':
                     d = self.ppv.d
                     print 'Cell empty!'
@@ -300,6 +309,10 @@
                         self.avc.setAccursed(paper)
                         self.ppv.showLinkbuoys = 0
                         self.ppv.viewMode = self.ppv.JUST_BROWSING
+                    else:
+                        print '...what\'s then?'
+                        self.ppactions.insertText(c.getId(), 0, '_')
+                        
                     
             if key == "Delete":
                 print 'Untested! Doesn\'t check the length'




reply via email to

[Prev in Thread] Current Thread [Next in Thread]