Set title of dialog according to task.