[q-lang-cvs] qcalc qcalc.q,1.149,1.150
Brought to you by:
agraef
From: Albert G. <ag...@us...> - 2007-11-16 06:45:45
|
Update of /cvsroot/q-lang/qcalc In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18183 Modified Files: qcalc.q Log Message: code cleanup, bugfixes Index: qcalc.q =================================================================== RCS file: /cvsroot/q-lang/qcalc/qcalc.q,v retrieving revision 1.149 retrieving revision 1.150 diff -C2 -d -r1.149 -r1.150 *** qcalc.q 16 Nov 2007 03:59:44 -0000 1.149 --- qcalc.q 16 Nov 2007 06:45:42 -0000 1.150 *************** *** 1047,1054 **** = IT if eq () X; - gui_data (I,J) = DATA - where IT:QtObject = get CELLS!(I,J), - (_,_,_,_|DATA) = qt_data IT; - has_table_item (I,J) = true --- 1047,1050 ---- *************** *** 1216,1222 **** where (I,J) = real_index (I,J) if is_global and then not is_recursive and then not is_nil X: ! = if (I,J)<>real_current_cell then ! set_current_cell (I,J) || ! gui_action X (I,J) || process_gui2 (I,J) X || digest_loop; --- 1212,1216 ---- where (I,J) = real_index (I,J) if is_global and then not is_recursive and then not is_nil X: ! = if (I,J)<>real_current_cell then set_current_cell (I,J) || process_gui2 (I,J) X || digest_loop; *************** *** 2457,2462 **** ICONSET = qt_new "QIconSet" PM; ! actionbutton_gui (I,J) () (TEXT,ICON) = qt_connect X (SIGNAL "clicked()") X (SLOT "guiUpdate()") || qt TABLE "setCellWidget" (I,J,X) || IT if not is_nil IT and then not is_nil X --- 2451,2457 ---- ICONSET = qt_new "QIconSet" PM; ! actionbutton_gui (I,J) () (TEXT,ICON,INIT) = qt_connect X (SIGNAL "clicked()") X (SLOT "guiUpdate()") || + gui_set_actionbutton X INIT || qt TABLE "setCellWidget" (I,J,X) || IT if not is_nil IT and then not is_nil X *************** *** 2470,2478 **** // slots [("guiUpdate()",gui_update)] [], ! IT:QtObject = make_table_item (I,J,X,ref ()) (qt_val "QTableItem" "Never"); ! actionbutton_gui (I,J) X:QtObject (TEXT,ICON) ! = qt X "setText" TEXT || qt X "setIconSet" ICONSET where PM = if null ICON then NULLPM --- 2465,2474 ---- // slots [("guiUpdate()",gui_update)] [], ! IT:QtObject = make_table_item (I,J,X) (qt_val "QTableItem" "Never"); ! actionbutton_gui (I,J) X:QtObject (TEXT,ICON,INIT) ! = qt X "setText" TEXT || qt X "setIconSet" ICONSET || ! gui_set_actionbutton X INIT where PM = if null ICON then NULLPM *************** *** 2644,2648 **** gui_get_actionbutton X ! = get Y where (I,J) = qt_data X, (Y,) = gui_data (I,J); gui_get_togglebutton X --- 2640,2644 ---- gui_get_actionbutton X ! = cell_getval (I,J) where (I,J) = qt_data X; gui_get_togglebutton X *************** *** 2684,2690 **** gui_set_actionbutton X S ! = Y := Z ! where (I,J) = qt_data X, (Y,) = gui_data (I,J), ! 'Z = valq S, Z = catch fail Z; gui_set_togglebutton X S --- 2680,2685 ---- gui_set_actionbutton X S ! = cell_setval (I,J) S0 ! where (I,J) = qt_data X, (S0,S1) = unquote S; gui_set_togglebutton X S *************** *** 2761,2764 **** --- 2756,2764 ---- = send_expr '(yyaction (I,J)) if C = "MyActionButton"; + = // make sure that the new value is set in the inferior + // process (also check that the value is transferable) + submit_val (I,J) Y || process_gui (I,J) X + if checkval Y + where Y = gui_getval X; gui_clear X (I,J) *************** *** 2766,2770 **** = send_expr '(yytask (I,J) ()) if C = "MyTaskButton"; ! = send_expr '(yyclearaction (I,J)) if C = "MyActionButton"; --- 2766,2770 ---- = send_expr '(yytask (I,J) ()) if C = "MyTaskButton"; ! = send_expr '(yyclearaction (I,J)) || cell_setval (I,J) () if C = "MyActionButton"; *************** *** 3355,3360 **** "^\\+\\+\\+ Actionbutton: (\\([0-9]+,[0-9]+\\)) (.*)$" S (reg 1,reg 2), ! (I1,J1) = val K1, (TEXT,ICON) = val S1, ! IT:QtObject = make_gui actionbutton_gui (I1,J1) (TEXT,ICON); = results_loop (insert U ((I1,J1),IT)) [(I,J)|V] --- 3355,3360 ---- "^\\+\\+\\+ Actionbutton: (\\([0-9]+,[0-9]+\\)) (.*)$" S (reg 1,reg 2), ! (I1,J1) = val K1, (TEXT,ICON,INIT) = val S1, ! IT:QtObject = make_gui actionbutton_gui (I1,J1,INIT) (TEXT,ICON); = results_loop (insert U ((I1,J1),IT)) [(I,J)|V] *************** *** 3482,3490 **** process_gui2 (I,J) X ! = // make sure that the new value is set in the inferior ! // process (also check that the value is transferable) ! if checkval Y then submit_val (I,J) Y || ! process_gui (I,J) X ! where Y = gui_getval X; process1 (I,J,S) --- 3482,3486 ---- process_gui2 (I,J) X ! = gui_action X (I,J) || process_gui (I,J) X otherwise; process1 (I,J,S) |