@@ -21,7 +21,6 @@ import Ubuntu.Components 1.2
21import Unity.Notifications 1.0
21import Unity.Notifications 1.0
22import QMenuModel 0.1
22import QMenuModel 0.1
23import Utils 0.1
23import Utils 0.1
24−import "../Components/UnityInputInfo"
25import Ubuntu.Components.ListItems 0.1 as ListItem
24import Ubuntu.Components.ListItems 0.1 as ListItem
@@ -61,12 +60,12 @@ Item {
62 var result = "";
61 var result = "";
64− if (type === Notification.SnapDecision) {
63+ if (type == Notification.SnapDecision) {
65− if (ListView.view.currentIndex === index) {
64+ if (ListView.view.currentIndex == index) {
66 result = "expanded";
65 result = "expanded";
68 if (ListView.view.count > 2) {
67 if (ListView.view.count > 2) {
69− if (ListView.view.currentIndex === -1 && index == 1) {
68+ if (ListView.view.currentIndex == -1 && index == 1) {
70 result = "expanded";
69 result = "expanded";
72 result = "contracted";
71 result = "contracted";
@@ -84,7 +83,7 @@ Item {
85 objectName: "sound"
84 objectName: "sound"
86 audioRole: MediaPlayer.alert
85 audioRole: MediaPlayer.alert
87− source: hints["suppress-sound"] !== "true" && !!hints["sound-file"] ? hints["sound-file"] : ""
86+ source: hints["suppress-sound"] !== "true" && hints["sound-file"] !== undefined ? hints["sound-file"] : ""
90 Component.onCompleted: {
89 Component.onCompleted: {
@@ -141,7 +140,7 @@ Item {
142 clip: fullscreen ? false : true
141 clip: fullscreen ? false : true
144− visible: type !== Notification.PlaceHolder
143+ visible: type != Notification.PlaceHolder
146 UbuntuShape {
145 UbuntuShape {
147 id: shapedBack
146 id: shapedBack
@@ -197,7 +196,7 @@ Item {
197 actions: paths.actions
196 actions: paths.actions
198 menuObjectPath: paths.menuObjectPath
197 menuObjectPath: paths.menuObjectPath
199 onNameOwnerChanged: {
198 onNameOwnerChanged: {
200− if (lastNameOwner !== "" && nameOwner === "" && !!notification.notification) {
199+ if (lastNameOwner !== "" && nameOwner === "" && notification.notification !== undefined) {
201 notification.notification.close()
200 notification.notification.close()
203 lastNameOwner = nameOwner
202 lastNameOwner = nameOwner
@@ -216,7 +215,7 @@ Item {
216 drag.maximumX: notification.width
215 drag.maximumX: notification.width
218 onClicked: {
217 onClicked: {
219− if (notification.type === Notification.Interactive) {
218+ if (notification.type == Notification.Interactive) {
220 notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)
219 notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)
221 } else if (clickToClose && canBeClosed) {
220 } else if (clickToClose && canBeClosed) {
222 notification.notification.close()
221 notification.notification.close()
@@ -260,10 +259,10 @@ Item {
262 objectName: "icon"
261 objectName: "icon"
263− width: type === Notification.Ephemeral && !bodyLabel.visible ? units.gu(3) : units.gu(6)
262+ width: type == Notification.Ephemeral && !bodyLabel.visible ? units.gu(3) : units.gu(6)
264 height: width
263 height: width
265− shaped: notification.hints["x-canonical-non-shaped-icon"] === "true" ? false : true
264+ shaped: notification.hints["x-canonical-non-shaped-icon"] == "true" ? false : true
266− visible: !!iconSource && iconSource !== "" && type !== Notification.Confirmation
265+ visible: iconSource !== undefined && iconSource !== "" && type !== Notification.Confirmation
@@ -299,7 +298,7 @@ Item {
299 fontSize: "small"
298 fontSize: "small"
300 color: darkOnBright ? sdFontColor : Theme.palette.selected.backgroundText
299 color: darkOnBright ? sdFontColor : Theme.palette.selected.backgroundText
301 wrapMode: Text.WordWrap
300 wrapMode: Text.WordWrap
302− maximumLineCount: type === Notification.SnapDecision ? 12 : 2
301+ maximumLineCount: type == Notification.SnapDecision ? 12 : 2
303 elide: Text.ElideRight
302 elide: Text.ElideRight
304 textFormat: Text.StyledText
303 textFormat: Text.StyledText
@@ -317,7 +316,7 @@ Item {
319 ListItem.ThinDivider {
318 ListItem.ThinDivider {
320− visible: type === Notification.SnapDecision
319+ visible: type == Notification.SnapDecision
323 ShapedIcon {
322 ShapedIcon {
@@ -325,9 +324,9 @@ Item {
325 objectName: "centeredIcon"
324 objectName: "centeredIcon"
326 width: units.gu(5)
325 width: units.gu(5)
327 height: width
326 height: width
328− shaped: notification.hints["x-canonical-non-shaped-icon"] === "true" ? false : true
327+ shaped: notification.hints["x-canonical-non-shaped-icon"] == "true" ? false : true
329 fileSource: icon.fileSource
328 fileSource: icon.fileSource
330− visible: !!fileSource && fileSource !== "" && type === Notification.Confirmation
329+ visible: fileSource !== undefined && fileSource !== "" && type === Notification.Confirmation
331 anchors.horizontalCenter: parent.horizontalCenter
330 anchors.horizontalCenter: parent.horizontalCenter
@@ -443,7 +442,7 @@ Item {
443 objectName: "notify_oot_button" + index
442 objectName: "notify_oot_button" + index
444 width: oneOverTwoCase.width
443 width: oneOverTwoCase.width
445 text: oneOverTwoLoaderTop.actionLabel
444 text: oneOverTwoLoaderTop.actionLabel
446− color: notification.hints["x-canonical-private-affirmative-tint"] === "true" ? green : sdDarkGrey
445+ color: index == 1 && notification.hints["x-canonical-private-rejection-tint"] == "true" ? red : sdDarkGrey
447 onClicked: notification.notification.invokeAction(oneOverTwoLoaderTop.actionId)
446 onClicked: notification.notification.invokeAction(oneOverTwoLoaderTop.actionId)
@@ -533,10 +532,10 @@ Item {
533 text: loader.actionLabel
532 text: loader.actionLabel
535 var result = sdDarkGrey;
534 var result = sdDarkGrey;
536− if (index == 0 && notification.hints["x-canonical-private-affirmative-tint"] === "true") {
535+ if (index == 0 && notification.hints["x-canonical-private-affirmative-tint"] == "true") {
537 result = green;
536 result = green;
539− if (index == 1 && notification.hints["x-canonical-private-rejection-tint"] === "true") {
538+ if (index == 1 && notification.hints["x-canonical-private-rejection-tint"] == "true") {
540 result = red;
539 result = red;
542 return result;
541 return result;
@@ -559,7 +558,7 @@ Item {
559 margins: contentSpacing
558 margins: contentSpacing
562− visible: notification.type === Notification.SnapDecision && actionRepeater.count > 3 && !oneOverTwoCase.visible
561+ visible: notification.type == Notification.SnapDecision && actionRepeater.count > 3 && !oneOverTwoCase.visible
563 model: notification.actions
562 model: notification.actions
564 expanded: false
563 expanded: false
565 startIndex: 2
564 startIndex: 2