mount-operation: Handle multi-line questions

Don't discard multiple lines when updating the message label.

https://bugzilla.gnome.org/show_bug.cgi?id=745713
This commit is contained in:
Ross Lagerwall 2015-03-05 23:38:11 +00:00
parent 17a336c795
commit dada0420b1

View File

@ -49,9 +49,9 @@ function _setButtonsForChoices(dialog, choices) {
function _setLabelsForMessage(dialog, message) {
let labels = message.split('\n');
_setLabelText(dialog.subjectLabel, labels[0]);
if (labels.length > 1)
_setLabelText(dialog.descriptionLabel, labels[1]);
_setLabelText(dialog.subjectLabel, labels.shift());
if (labels.length > 0)
_setLabelText(dialog.descriptionLabel, labels.join('\n'));
}
function _createIcon(gicon) {