linuxmint/Cinnamon — pull request #2138 by derAndreas (2013-06-06 04:34:08+00:00)
Title: fixing #2110 keyboard tab nav in looking glass

Hi,

I saw this code while developing an applet and found several issues with it:

1. it is looking for 'newIndex' when pressing left/right but it is not activating the index in the notebook. Means the whole "left/right" keynav is not even working (at least for me)
2. missing return value (cosmetic, emitted signals do need return values from callbacks?)
3. Left/Right keys are not working really, because starting lookingglass opens the "Evaluator" tab and this one is "stealing" the left/right listeners in the "js>>" input field
4. overflow of "Right" Key is wrong, we have 6 Tabs (Evaluator, Windows, Errors, Memory, Applets, Extenstions, "Desklets") but it sets the last one to 4 and we can never navigate to "Extensions" and "Desklets" by keys, so even if adding the notebook.selectIndex would not switch between all tabs
5. intendation issue

I fixed it on my local machine by
1. adding the notebook selecting after determining newIndex
2. added return value
3. removed binding to left/right keys and used Page_Up/Page_Down
4. do not set static values, rather than use selt._notebook._tabs.length
5. fixed intendation

Should fix Issue #2110

Bye
Andreas