From bcd8062712fe5b5995e6b1f91ff11301cd6c6dbc Mon Sep 17 00:00:00 2001 From: "mgalli%geckonnection.com" Date: Wed, 28 Jun 2006 20:27:45 +0000 Subject: [PATCH] Fix to keyspin escape function. The escape function is the feature that allows the user to call the 2nd softkey ( escapes the spin) and puts an entry so that the Current state is recovered. git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@201128 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/minimo/chrome/content/minimo.js | 27 +++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/mozilla/minimo/chrome/content/minimo.js b/mozilla/minimo/chrome/content/minimo.js index 264e180e5a6..8ca07ada15f 100755 --- a/mozilla/minimo/chrome/content/minimo.js +++ b/mozilla/minimo/chrome/content/minimo.js @@ -1827,6 +1827,11 @@ function BrowserPanMouseHandlerDestroy(e) { /* * Keyboard Spin Menu Control + * -- + * The key spin engine. This will call the SpinOut() state of the current State, + * will set the current State to be the .next ( of the linked list defined in + * spinCreate function ) and will call the SpinIn state of the next. The setTimeout + * was used because of a bug. */ function spinCycle() { @@ -1835,9 +1840,27 @@ function spinCycle() { setTimeout("gKeySpinCurrent.SpinIn()",0); } +/* + * The spinSetNext + * --- + * Is used to set a temporary state to the keyboard spin state machine. + * Let's say if the user hits the Keyboard softkey when the state is + * over a menu, we want to tell that the Next State is the Current state. + * So when it press the Left softkey, it will recover the current state. + */ + function spinSetnext(ref) { - gSpinTemp.next = ref; - gKeySpinCurrent = gSpinTemp; + + /* + * This should be performed only once to break the normal Spin states. + * If you call this twice it will call itself thus loopback. + */ + + if(ref!=gSpinTemp) { + gSpinTemp.next = ref; + gKeySpinCurrent = gSpinTemp; + } + } function spinCreate() {