[gnome-shell] mount-operation: Handle multi-line questions
- From: Ross Lagerwall <rossl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] mount-operation: Handle multi-line questions
- Date: Sun, 8 Mar 2015 11:34:20 +0000 (UTC)
commit dada0420b1b0e277333726c32b1d1290504b2354
Author: Ross Lagerwall <rosslagerwall gmail com>
Date: Thu Mar 5 23:38:11 2015 +0000
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
js/ui/shellMountOperation.js | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/shellMountOperation.js b/js/ui/shellMountOperation.js
index a1cc81d..522ae08 100644
--- a/js/ui/shellMountOperation.js
+++ b/js/ui/shellMountOperation.js
@@ -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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]