Update of /cvsroot/q-lang/qcalc
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv8534
Modified Files:
qcalc.q
Log Message:
bugfixes
Index: qcalc.q
===================================================================
RCS file: /cvsroot/q-lang/qcalc/qcalc.q,v
retrieving revision 1.173
retrieving revision 1.174
diff -C2 -d -r1.173 -r1.174
*** qcalc.q 22 Nov 2007 09:28:49 -0000 1.173
--- qcalc.q 23 Nov 2007 00:52:01 -0000 1.174
***************
*** 638,642 ****
def CBQ = semaphore;
! def WL = [abort,eval,gui_update,popup,text_changed,linenumbermsg,indent],
BL1 = [eval,gui_update], BL2 = [timer];
--- 638,643 ----
def CBQ = semaphore;
! def WL = [abort,activate,eval,gui_update,popup,
! text_changed,linenumbermsg,indent],
BL1 = [eval,gui_update], BL2 = [timer];
***************
*** 652,659 ****
= true if not is_global and then any (eq SLOT) BL2;
// All other callbacks are deferred in local mode unless they're on the
! // whitelist. These will be executed later from the timer. Also note that
! // while eval and gui_update are on the whitelist and hence passed through
! // here (unless in recursive mode), in local mode these callbacks will
! // simply queue a corresponding GUI update request for later processing.
= post CBQ '(SLOT OBJ (qt_data OBJ) ARGS || true) || true
if not is_global and then all (neq SLOT) WL;
--- 653,657 ----
= true if not is_global and then any (eq SLOT) BL2;
// All other callbacks are deferred in local mode unless they're on the
! // whitelist. These will then be executed later from the timer.
= post CBQ '(SLOT OBJ (qt_data OBJ) ARGS || true) || true
if not is_global and then all (neq SLOT) WL;
***************
*** 748,751 ****
--- 746,762 ----
manual A _ _ _ = assistant (which "doc/qdoc.html"++A);
+ /* XXXFIXME: A horrible kludge to set the current cell to the one which holds
+ one of our GUI elements if it gets the focus. Unfortunately, this isn't
+ handled automatically by Qt. */
+
+ check_focus N X = set_current_cell (I,J)
+ if (I,J)<>current_cell
+ where (I,J) = qt_data X;
+ // check for a maximum of 5 levels; this should be good enough for most
+ // purposes
+ = check_focus (N+1) X
+ if not is_nil X where X:QtObject = qt_parent X
+ if N < 5;
+
/* Timer processing. */
***************
*** 754,757 ****
--- 765,769 ----
timer _ _ _ = set_status HAVE_UNDO EDIT_UNDO ||
set_status HAVE_REDO EDIT_REDO ||
+ check_focus 0 (qt APP "focusWidget" ()) ||
digest_loop
where HAVE_TABLE = (qt TABW "currentPageIndex" () = 0),
***************
*** 1324,1328 ****
activate _ _ (I,J)
! = check_editing || updatemsg (I,J);
clicked _ _ (I,J)
--- 1336,1340 ----
activate _ _ (I,J)
! = updatemsg (I,J) if check_editing || is_global;
clicked _ _ (I,J)
|