Fixes compile error in dialogs.cpp, I hope

Harri decided to add captions to the dialogs without making sure the code still compiles. So I've added .c_str() without making sure the code compiles again.