Fixed miscellaneous bugs while adding new files.

As pointed out by @zas, the combo's current index is used rather than
its text (which might be translated.)

Fixed bugs that might occur when toolbar_multiselect is not set.