Restore corpus export functionality.
Restore Save as... behavior.
Disable actions depending on the tab.

Some of this logic didn't fully survive the change to multiple windows.
Merge tag '2.0.2' into ubuntu/quantal
New upstream release.