Merge pull request #201 from kamalpreetgrewal/master

corrects both script and command widgets for every document
corrects the checked menu for scripting and console widgets
Merge pull request #202 from bhattigurjot/master

corrects the checked menu for scripting and console widgets