From: Ton v. O. <tvo...@us...> - 2006-09-18 17:54:25
|
Update of /cvsroot/easycalc/easycalc In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv12442 Modified Files: calc.c Log Message: Ignore key-up events for the hard keys (needed on Treo 650/700p) so hard keys do not get processed twice. Index: calc.c =================================================================== RCS file: /cvsroot/easycalc/easycalc/calc.c,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** calc.c 12 Sep 2006 19:40:55 -0000 1.33 --- calc.c 18 Sep 2006 17:54:17 -0000 1.34 *************** *** 492,503 **** UInt16 error; - /* Make it that the button assigned to easycalc, not the datebook switches modes */ do { EvtGetEvent(&event, evtTimeout); if (hard_key_to_pass_through(&event) || ! SysHandleEvent(&event)) { ! if (TxtCharIsHardKey(event.data.keyDown.modifiers, event.data.keyDown.chr) ! && ! (event.data.keyDown.modifiers & poweredOnKeyMask) && ! ! (hard_key_to_pass_through(&event))) GotHardKey(); else if (! MenuHandleEvent(0, &event, &error)) --- 492,504 ---- UInt16 error; do { EvtGetEvent(&event, evtTimeout); + /* Only the button assigned to EasyCalc should switch modes */ if (hard_key_to_pass_through(&event) || ! SysHandleEvent(&event)) { ! if (event.eType == keyDownEvent ! && TxtCharIsHardKey(event.data.keyDown.modifiers, event.data.keyDown.chr) ! && ! (event.data.keyDown.modifiers & poweredOnKeyMask) ! && ! (hard_key_to_pass_through(&event))) GotHardKey(); else if (! MenuHandleEvent(0, &event, &error)) |