ajaxorg/cloud9 — pull request #1185 by mattpardee (2012-04-02 21:39:31+00:00)
Title: Hotfix/sbfixes

This fixes the breaking changes introduced in 4a4a0137.

That commit was solving the problem of opening the IDE into an image file (jpeg, png etc). The statusbar, zen mode and minimap would try to initialize on what was a nonexistent editor.

But, the changes were a bit messy and required the calling of init() potentially multiple times to test if the editor was ready yet. This instead detects if the imgview extension "is" the editor and if so, doesn't proceed.

I was able to remove the "afteropenfile" hooks because "afterswitch" is dispatched even when the first file is open from a blank slate.