Added handler for the "commit button".

Now when there are not files selected to commit the *commit* button is disabled instead of be enabled but do nothing.