[q-lang-cvs] qcalc qcalc.q,1.39,1.40
                
                Brought to you by:
                
                    agraef
                    
                
            
            
        
        
        
    | 
      
      
      From: Albert G. <ag...@us...> - 2007-10-29 19:36:49
      
     | 
| Update of /cvsroot/q-lang/qcalc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv5583 Modified Files: qcalc.q Log Message: suppress some editing operations when the corresponding view is not visible Index: qcalc.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/qcalc.q,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** qcalc.q 29 Oct 2007 19:12:21 -0000 1.39 --- qcalc.q 29 Oct 2007 19:36:39 -0000 1.40 *************** *** 513,517 **** = statusmsg $ sprintf "Line %d" (N+1); ! eval _ _ (I,J) = finish_edit true (I,J) if global and then not get REDIT; finish_edit ACCEPT (I,J) --- 513,520 ---- = statusmsg $ sprintf "Line %d" (N+1); ! eval _ _ (I,J) = finish_edit true (I,J) ! if global and then ! qt TABW "currentPageIndex" () = 0 and then ! not get REDIT; finish_edit ACCEPT (I,J) *************** *** 529,533 **** edit S D () where I = qt TABLE "currentRow" (), J = qt TABLE "currentColumn" () ! if global and then not qt TABLE "isEditing" (): = LAST_EDIT := (I,J) || qt TABLE "setText" (I,J,sprintf "= %s" S) || --- 532,537 ---- edit S D () where I = qt TABLE "currentRow" (), J = qt TABLE "currentColumn" () ! if global and then not qt TABLE "isEditing" () and then ! qt TABW "currentPageIndex" () = 0: = LAST_EDIT := (I,J) || qt TABLE "setText" (I,J,sprintf "= %s" S) || *************** *** 541,547 **** qt TABLE "setText" (I,J,sprintf "= %s" S) || qt TABLE "editCell" (I,J) ! where (S,_,_) = get EVAL!(I,J) if global; ! accept _ _ _ if global: = EDITED := true || REDIT := true || qt TABLE "endEdit" (I,J,true,false) || --- 545,552 ---- qt TABLE "setText" (I,J,sprintf "= %s" S) || qt TABLE "editCell" (I,J) ! where (S,_,_) = get EVAL!(I,J) ! if global and then qt TABW "currentPageIndex" () = 0; ! accept _ _ _ if global and then qt TABW "currentPageIndex" () = 0: = EDITED := true || REDIT := true || qt TABLE "endEdit" (I,J,true,false) || *************** *** 556,560 **** otherwise; ! accept2 S D A if global: = accept S D A || if qt TABLE "hasFocus" () then --- 561,565 ---- otherwise; ! accept2 S D A if global and then qt TABW "currentPageIndex" () = 0: = accept S D A || if qt TABLE "hasFocus" () then *************** *** 574,578 **** where I = qt TABLE "currentRow" (), J = qt TABLE "currentColumn" () ! if global and then qt TABLE "isEditing" (); check_editing = EDITED := true || REDIT := true || --- 579,584 ---- where I = qt TABLE "currentRow" (), J = qt TABLE "currentColumn" () ! if global and then qt TABLE "isEditing" () and then ! qt TABW "currentPageIndex" () = 0; check_editing = EDITED := true || REDIT := true || *************** *** 593,597 **** T:String = indentation (L-1), S = qt EDIT "text" L, R = takewhile isspace S, ! C0 = #R, C1 = if C>=C0 then #T+C-C0 else #T; indentation L = () if L<0; --- 599,604 ---- T:String = indentation (L-1), S = qt EDIT "text" L, R = takewhile isspace S, ! C0 = #R, C1 = if C>=C0 then #T+C-C0 else #T ! if qt TABW "currentPageIndex" () = 1; indentation L = () if L<0; *************** *** 702,705 **** --- 709,715 ---- = qt FIND_STATUS "setText" S; + show_table = qt TABW "setCurrentPage" 0 + if qt TABW "currentPageIndex" () = 1; + show_editor = qt TABW "setCurrentPage" 1 if qt TABW "currentPageIndex" () = 0; *************** *** 709,713 **** where I = qt TABLE "currentRow" (), J = qt TABLE "currentColumn" () ! where _ = check_editing; edit_redo _ _ _ if global: --- 719,724 ---- where I = qt TABLE "currentRow" (), J = qt TABLE "currentColumn" () ! where _ = check_editing ! if qt TABW "currentPageIndex" () = 0; edit_redo _ _ _ if global: *************** *** 715,719 **** where I = qt TABLE "currentRow" (), J = qt TABLE "currentColumn" () ! where _ = check_editing; cut _ _ _ if global: --- 726,731 ---- where I = qt TABLE "currentRow" (), J = qt TABLE "currentColumn" () ! where _ = check_editing ! if qt TABW "currentPageIndex" () = 0; cut _ _ _ if global: *************** *** 725,744 **** where SEL = check_editing || selection, VALS = sel_cellvals SEL, ! CELLS = sel_cells SEL; copy _ _ _ if global: = set_clipboard VALS where SEL = check_editing || selection, ! VALS = sel_cellvals SEL; val_copy _ _ _ if global: = set_clipboard VALS where SEL = check_editing || selection, ! VALS = sel_cellcvals SEL; copy_selection _ _ _ if global: = set_clipboard2 VALS where SEL = check_editing || selection, ! VALS = sel_cellcvals SEL; paste _ _ _ if global: --- 737,760 ---- where SEL = check_editing || selection, VALS = sel_cellvals SEL, ! CELLS = sel_cells SEL ! if qt TABW "currentPageIndex" () = 0; copy _ _ _ if global: = set_clipboard VALS where SEL = check_editing || selection, ! VALS = sel_cellvals SEL ! if qt TABW "currentPageIndex" () = 0; val_copy _ _ _ if global: = set_clipboard VALS where SEL = check_editing || selection, ! VALS = sel_cellcvals SEL ! if qt TABW "currentPageIndex" () = 0; copy_selection _ _ _ if global: = set_clipboard2 VALS where SEL = check_editing || selection, ! VALS = sel_cellcvals SEL ! if qt TABW "currentPageIndex" () = 0; paste _ _ _ if global: *************** *** 753,757 **** (DI,DJ) = (I-I1,J-J1), SEL = map (translate (DI,DJ)) SEL, ! CELLS = map (flip (flip sub 0) 1) SEL; fill _ _ _ if global: --- 769,774 ---- (DI,DJ) = (I-I1,J-J1), SEL = map (translate (DI,DJ)) SEL, ! CELLS = map (flip (flip sub 0) 1) SEL ! if qt TABW "currentPageIndex" () = 0; fill _ _ _ if global: *************** *** 768,772 **** VALS = cat $ sel_cellvals SEL, [(I,J,_)|_] = VALS, ! CELLS = map (flip (flip sub 0) 1) VALS; special checknum X; --- 785,790 ---- VALS = cat $ sel_cellvals SEL, [(I,J,_)|_] = VALS, ! CELLS = map (flip (flip sub 0) 1) VALS ! if qt TABW "currentPageIndex" () = 0; special checknum X; |