on xenial help sign in
Brought messaging indicator inline with UnityMenuModel & UnityMenuAction. Fixes: https://bugs.launchpad.net/bugs/1217676, https://bugs.launchpad.net/bugs/1217678.
85f94d3Nick Dedekind
Panel/IndicatorsDataModel.qml+2−2
@@ -42,8 +42,8 @@ Indicators.IndicatorsModel {
42 'indicator-messages' : {
42 'indicator-messages' : {
43 'title': 'Messaging',
43 'title': 'Messaging',
44 'description' : '',
44 'description' : '',
45− 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/MessagingIndicatorWidget.qml',
45+ 'widgetSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorWidget2.qml',
46− 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/MessagingIndicatorPage.qml'
46+ 'pageSource' : ApplicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorPage2.qml'
47 },
47 },
48 'indicator-sound' : {
48 'indicator-sound' : {
49 'title': 'Sound',
49 'title': 'Sound',
debian/unity8.install−1
@@ -13,4 +13,3 @@ usr/share/unity8/Panel
13usr/share/unity8/Shell.qml
13usr/share/unity8/Shell.qml
14usr/share/unity8/SideStage
14usr/share/unity8/SideStage
15usr/share/unity8/graphics
15usr/share/unity8/graphics
16−usr/share/unity8/unity/indicators/*
plugins/Unity/Indicators/CMakeLists.txt+1
@@ -12,6 +12,7 @@ find_package(Qt5Core REQUIRED)
12find_package(Qt5Quick REQUIRED)
12find_package(Qt5Quick REQUIRED)
13
13
14add_subdirectory(qml)
14add_subdirectory(qml)
15+add_subdirectory(Messaging)
15add_subdirectory(Network)
16add_subdirectory(Network)
16
17
17include_directories(
18include_directories(
plugins/Unity/IndicatorsLegacy/Messaging/CMakeLists.txt → plugins/Unity/Indicators/Messaging/CMakeLists.txtrenamed

The content is the same.

plugins/Unity/IndicatorsLegacy/Messaging/qml/ActionButton.qml → plugins/Unity/Indicators/Messaging/qml/ActionButton.qmlrenamed

The content is the same.

plugins/Unity/IndicatorsLegacy/Messaging/qml/ActionTextField.qml → plugins/Unity/Indicators/Messaging/qml/ActionTextField.qmlrenamed+10−7
@@ -22,11 +22,12 @@ import QtQuick 2.0
22import Ubuntu.Components 0.1
22import Ubuntu.Components 0.1
23
23
24Item {
24Item {
25− property alias actionGroup: sendButton.actionGroup
25+ id: textField
26− property alias action: sendButton.action
27−
28 property alias text: replyField.text
26 property alias text: replyField.text
29 property alias buttonText: sendButton.text
27 property alias buttonText: sendButton.text
28+ property bool activateEnabled: false
29+
30+ signal activate(var value)
30
31
31 TextField {
32 TextField {
32 id: replyField
33 id: replyField
@@ -50,17 +51,19 @@ Item {
50 }
51 }
51 }
52 }
52
53
53− ActionButton {
54+ Button {
54 id: sendButton
55 id: sendButton
55−
56− actionParameter: replyField.text
57 anchors {
56 anchors {
58 top: parent.top
57 top: parent.top
59 bottom: parent.bottom
58 bottom: parent.bottom
60 right: parent.right
59 right: parent.right
61 }
60 }
62 width: units.gu(9)
61 width: units.gu(9)
63− enabled: replyField.text !== ""
62+ enabled: replyField.text !== "" && textField.activateEnabled
64 color: enabled ? "#c94212" : "#bababa"
63 color: enabled ? "#c94212" : "#bababa"
64+
65+ onClicked: {
66+ textField.activate(replyField.text);
67+ }
65 }
68 }
66}
69}
plugins/Unity/Indicators/Messaging/qml/CMakeLists.txtnew file+5
@@ -0,0 +1,5 @@
1+# export_qmlfiles macro
2+include(Plugins)
3+
4+# export the qmldir, *.qml files.
5+export_qmlfiles(Unity.Indicators.Messaging Unity/Indicators/Messaging)
plugins/Unity/IndicatorsLegacy/Messaging/qml/GroupedMessage.qml → plugins/Unity/Indicators/Messaging/qml/GroupedMessage.qmlrenamed+13−18
@@ -20,20 +20,19 @@
20
20
21import QtQuick 2.0
21import QtQuick 2.0
22import Ubuntu.Components 0.1
22import Ubuntu.Components 0.1
23−import Unity.IndicatorsLegacy 0.1 as Indicators
23+import Unity.Indicators 0.1 as Indicators
24
24
25−Indicators.BasicMenuItem {
25+Indicators.BaseMenuItem {
26 id: groupedMessage
26 id: groupedMessage
27+
28+ property alias title: __title.text
27 property alias count: label.text
29 property alias count: label.text
30+ property string appIcon: "qrc:/indicators/artwork/messaging/default_app.svg"
28
31
29− color: "#221e1b"
32+ signal activateApp()
30− implicitHeight: units.gu(10)
33+ signal dismiss()
31
34
32− Indicators.MenuAction {
35+ implicitHeight: units.gu(10)
33− id: menuAction
34− actionGroup: groupedMessage.actionGroup
35− action: menu ? menu.action : ""
36− }
37
36
38 Row {
37 Row {
39 anchors.fill: parent
38 anchors.fill: parent
@@ -44,17 +43,17 @@ Indicators.BasicMenuItem {
44 height: units.gu(6)
43 height: units.gu(6)
45 width: units.gu(6)
44 width: units.gu(6)
46 image: Image {
45 image: Image {
47− source: menu && (menu.extra.canonical_icon.length > 0) ? "image://theme/" + encodeURI(menu.extra.canonical_icon) : "qrc:/indicators/artwork/messaging/default_app.svg"
46+ source: groupedMessage.appIcon
48 fillMode: Image.PreserveAspectFit
47 fillMode: Image.PreserveAspectFit
49 }
48 }
50 }
49 }
51
50
52 Label {
51 Label {
52+ id: __title
53 anchors.verticalCenter: parent.verticalCenter
53 anchors.verticalCenter: parent.verticalCenter
54 color: "#e8e1d0"
54 color: "#e8e1d0"
55 font.weight: Font.DemiBold
55 font.weight: Font.DemiBold
56 fontSize: "medium"
56 fontSize: "medium"
57− text: menu && menu.label ? menu.label : ""
58 }
57 }
59
58
60 Label {
59 Label {
@@ -65,7 +64,7 @@ Indicators.BasicMenuItem {
65 color: "#e8e1d0"
64 color: "#e8e1d0"
66 font.weight: Font.DemiBold
65 font.weight: Font.DemiBold
67 fontSize: "medium"
66 fontSize: "medium"
68− text: menuAction.valid ? menuAction.state[0] : "0"
67+ text: "0"
69 }
68 }
70 }
69 }
71
70
@@ -82,15 +81,11 @@ Indicators.BasicMenuItem {
82 MouseArea {
81 MouseArea {
83 anchors.fill: parent
82 anchors.fill: parent
84 onClicked: {
83 onClicked: {
85− if (menuAction.valid) {
84+ groupedMessage.activateApp();
86− menuAction.activate(true);
87− }
88 }
85 }
89 }
86 }
90
87
91 onItemRemoved: {
88 onItemRemoved: {
92− if (menuAction.valid) {
89+ groupedMessage.dismiss();
93− menuAction.activate(false);
94− }
95 }
90 }
96}
91}
plugins/Unity/IndicatorsLegacy/Messaging/qml/HeroMessage.qml → plugins/Unity/Indicators/Messaging/qml/HeroMessage.qmlrenamed+25−22
@@ -20,25 +20,30 @@
20
20
21import QtQuick 2.0
21import QtQuick 2.0
22import Ubuntu.Components 0.1
22import Ubuntu.Components 0.1
23−import Unity.IndicatorsLegacy 0.1 as Indicators
23+import Unity.Indicators 0.1 as Indicators
24
24
25−Indicators.BasicMenuItem {
25+Indicators.BaseMenuItem {
26 id: heroMessage
26 id: heroMessage
27
27
28− property variant actionsDescription: null
29 property alias heroMessageHeader: __heroMessageHeader
28 property alias heroMessageHeader: __heroMessageHeader
30 property real collapsedHeight: heroMessageHeader.y + heroMessageHeader.bodyBottom + units.gu(2)
29 property real collapsedHeight: heroMessageHeader.y + heroMessageHeader.bodyBottom + units.gu(2)
31 property real expandedHeight: collapsedHeight
30 property real expandedHeight: collapsedHeight
32
31
33− color: "#221e1c"
32+ property alias avatar: __heroMessageHeader.avatar
33+ property alias appIcon: __heroMessageHeader.icon
34+
35+ signal activateApp
36+ signal dismiss
34
37
35 removable: state !== "expanded"
38 removable: state !== "expanded"
36 implicitHeight: collapsedHeight
39 implicitHeight: collapsedHeight
37
40
38− Indicators.MenuAction {
41+ Rectangle {
39− id: menuAction
42+ id: background
40− actionGroup: heroMessage.actionGroup
43+ property real alpha: 0.0
41− action: menu ? menu.action : ""
44+ anchors.fill: parent
45+ color: Qt.rgba(1.0, 1.0, 1.0, alpha)
46+ z: -1
42 }
47 }
43
48
44 HeroMessageHeader {
49 HeroMessageHeader {
@@ -48,25 +53,22 @@ Indicators.BasicMenuItem {
48 anchors.left: parent.left
53 anchors.left: parent.left
49 anchors.right: parent.right
54 anchors.right: parent.right
50
55
51− avatar: menu && (menu.extra.canonical_icon.length > 0) ? "image://theme/" + encodeURI(menu.extra.canonical_icon) : "qrc:/indicators/artwork/messaging/default_contact.png"
56+ avatar: "qrc:/indicators/artwork/messaging/default_contact.png"
52− icon: menu && (menu.extra.canonical_app_icon.length > 0) ? "image://theme/" + encodeURI(menu.extra.canonical_app_icon) : ""
53 appIcon: icon
57 appIcon: icon
54
58
55 state: heroMessage.state
59 state: heroMessage.state
56
60
57 onAppIconClicked: {
61 onAppIconClicked: {
58− if (menuAction.valid) {
62+ deselectMenu();
59− deactivateMenu();
63+ heroMessage.activateApp();
60− action.activate(true);
61− }
62 }
64 }
63 }
65 }
64
66
65 onClicked: {
67 onClicked: {
66− if (menuActivated) {
68+ if (menuSelected) {
67− deactivateMenu();
69+ deselectMenu();
68 } else {
70 } else {
69− activateMenu();
71+ selectMenu();
70 }
72 }
71 }
73 }
72
74
@@ -84,13 +86,16 @@ Indicators.BasicMenuItem {
84
86
85 states: State {
87 states: State {
86 name: "expanded"
88 name: "expanded"
87− when: menuActivated
89+ when: menuSelected
88
90
89 PropertyChanges {
91 PropertyChanges {
90 target: heroMessage
92 target: heroMessage
91− color: "#333130"
92 implicitHeight: heroMessage.expandedHeight
93 implicitHeight: heroMessage.expandedHeight
93 }
94 }
95+ PropertyChanges {
96+ target: background
97+ alpha: 0.05
98+ }
94 PropertyChanges {
99 PropertyChanges {
95 target: __topHLine
100 target: __topHLine
96 opacity: 0.0
101 opacity: 0.0
@@ -113,8 +118,6 @@ Indicators.BasicMenuItem {
113 }
118 }
114
119
115 onItemRemoved: {
120 onItemRemoved: {
116− if (menuAction.valid) {
121+ heroMessage.dismiss();
117− menuAction.activate(false);
118− }
119 }
122 }
120}
123}
plugins/Unity/IndicatorsLegacy/Messaging/qml/HeroMessageHeader.qml → plugins/Unity/Indicators/Messaging/qml/HeroMessageHeader.qmlrenamed

The content is the same.

plugins/Unity/Indicators/Messaging/qml/MessageMenuItemFactory.qmlnew file+180
@@ -0,0 +1,180 @@
1+/*
2+ * Copyright 2013 Canonical Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU Lesser General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU Lesser General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU Lesser General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ *
16+ * Authors:
17+ * Renato Araujo Oliveira Filho <renato@canonical.com>
18+ * Olivier Tilloy <olivier.tilloy@canonical.com>
19+ */
20+
21+import QtQuick 2.0
22+import Ubuntu.Components 0.1
23+import Unity.Indicators 0.1 as Indicators
24+import QMenuModel 0.1 as QMenuModel
25+import "utils.js" as Utils
26+
27+Indicators.BaseMenuItem {
28+ id: menuItem
29+ property var actionsDescription: menu ? menu.ext.xCanonicalMessageActions : undefined
30+
31+ implicitHeight: contents.status == Loader.Ready ? contents.item.implicitHeight : 0
32+
33+ property var model: null
34+
35+ Loader {
36+ id: contents
37+ anchors.fill: parent
38+
39+ sourceComponent: loadMessage(actionsDescription);
40+
41+ // Binding all properties for the item, to make sure that any change in the
42+ // property will be propagated to the contents.item at any time
43+ Binding {
44+ target: contents.item
45+ property: "menuSelected"
46+ value: menuSelected
47+ when: (contents.status == Loader.Ready)
48+ }
49+
50+ Binding {
51+ target: contents.item
52+ property: "menu"
53+ value: menu
54+ when: (contents.status == Loader.Ready)
55+ }
56+
57+ Connections {
58+ target: contents.item ? contents.item : null
59+ onSelectMenu: selectMenu()
60+ onDeselectMenu: deselectMenu()
61+ }
62+
63+ Component {
64+ id: simpleTextMessage
65+ SimpleTextMessage {
66+ // text
67+ title: menu && menu.label ? menu.label : ""
68+ time: menu ? Utils.formatDate(menu.ext.xCanonicalTime) : ""
69+ message: menu && menu.ext.xCanonicalText ? menu.ext.xCanonicalText : ""
70+ // icons
71+ avatar: menu && menu.ext.icon !== undefined ? menu.ext.icon : "qrc:/indicators/artwork/messaging/default_contact.png"
72+ appIcon: menu && menu.ext.xCanonicalAppIcon !== undefined ? menu.ext.xCanonicalAppIcon : "qrc:/indicators/artwork/messaging/default_app.svg"
73+
74+ onActivateApp: {
75+ menuItem.model.activate(modelIndex, true);
76+ }
77+ onDismiss: {
78+ menuItem.model.activate(modelIndex, false);
79+ }
80+ }
81+ }
82+ Component {
83+ id: textMessage
84+ TextMessage {
85+ property var replyAction: QMenuModel.UnityMenuAction {
86+ model: menuItem.model
87+ index: modelIndex
88+ name: menu && actionsDescription[0].name ? actionsDescription[0].name : ""
89+ }
90+
91+ // text
92+ title: menu && menu.label ? menu.label : ""
93+ time: menu ? Utils.formatDate(menu.ext.xCanonicalTime) : ""
94+ message: menu && menu.ext.xCanonicalText ? menu.ext.xCanonicalText : ""
95+ replyButtonText: actionsDescription && actionsDescription[0].label ? actionsDescription[0].label : "Send"
96+ // icons
97+ avatar: menu && menu.ext.icon !== undefined ? menu.ext.icon : "qrc:/indicators/artwork/messaging/default_contact.png"
98+ appIcon: menu && menu.ext.xCanonicalAppIcon !== undefined ? menu.ext.xCanonicalAppIcon : "qrc:/indicators/artwork/messaging/default_app.svg"
99+ // actions
100+ replyEnabled: replyAction.valid && replyAction.enabled
101+
102+ onActivateApp: {
103+ menuItem.model.activate(modelIndex, true);
104+ }
105+ onDismiss: {
106+ menuItem.model.activate(modelIndex, false);
107+ }
108+ onReply: {
109+ replyAction.activate(value);
110+ }
111+ }
112+ }
113+ Component {
114+ id: snapDecision
115+ SnapDecision {
116+ property var activateAction: QMenuModel.UnityMenuAction {
117+ model: menuItem.model
118+ index: modelIndex
119+ name: menu && actionsDescription[0].name ? actionsDescription[0].name : ""
120+ }
121+ property var replyAction: QMenuModel.UnityMenuAction {
122+ model: menuItem.model
123+ index: modelIndex
124+ name: menu && actionsDescription[1].name ? actionsDescription[1].name : ""
125+ }
126+
127+ // text
128+ title: menu && menu.label ? menu.label : ""
129+ time: menu ? Utils.formatDate(menu.ext.xCanonicalTime) : ""
130+ message: menu && menu.ext.xCanonicalText ? menu.ext.xCanonicalText : ""
131+ actionButtonText: actionsDescription && actionsDescription[0].label ? actionsDescription[0].label : "Call back"
132+ replyButtonText: actionsDescription && actionsDescription[1].label ? actionsDescription[1].label : "Send"
133+ replyMessages: actionsDescription && actionsDescription[1]["parameter-hint"] ? actionsDescription[1]["parameter-hint"] : ""
134+ // icons
135+ avatar: menu && menu.ext.icon !== undefined ? menu.ext.icon : "qrc:/indicators/artwork/messaging/default_contact.png"
136+ appIcon: menu && menu.ext.xCanonicalAppIcon !== undefined ? menu.ext.xCanonicalAppIcon : "qrc:/indicators/artwork/messaging/default_app.svg"
137+ // actions
138+ activateEnabled: activateAction.valid && activateAction.enabled
139+ replyEnabled: replyAction.valid && replyAction.enabled
140+
141+ onActivateApp: {
142+ menuItem.model.activate(modelIndex, true);
143+ }
144+ onDismiss: {
145+ menuItem.model.activate(modelIndex, false);
146+ }
147+ onActivate: {
148+ activateAction.activate();
149+ }
150+ onReply: {
151+ replyAction.activate(value);
152+ }
153+ }
154+ }
155+ }
156+
157+ function loadMessage(actions)
158+ {
159+ var parameterType = ""
160+ for (var actIndex in actions) {
161+ var desc = actions[actIndex];
162+ if (desc["parameter-type"] !== undefined) {
163+ parameterType += desc["parameter-type"];
164+ } else {
165+ parameterType += "_";
166+ }
167+ }
168+
169+ if (parameterType === "") {
170+ return simpleTextMessage;
171+ } else if (parameterType === "s") {
172+ return textMessage;
173+ } else if (parameterType === "_s") {
174+ return snapDecision;
175+ } else {
176+ console.debug("Unknown paramater type: " + parameterType);
177+ }
178+ return undefined;
179+ }
180+}
plugins/Unity/IndicatorsLegacy/Messaging/qml/QuickReply.qml → plugins/Unity/Indicators/Messaging/qml/QuickReply.qmlrenamed+10−5
@@ -23,12 +23,13 @@ import Ubuntu.Components 0.1
23import Unity.IndicatorsLegacy 0.1 as Indicators
23import Unity.IndicatorsLegacy 0.1 as Indicators
24
24
25Item {
25Item {
26− property alias actionGroup: actionTextField.actionGroup
26+ id: quickReply
27− property alias action: actionTextField.action
28−
29 property alias buttonText: actionTextField.buttonText
27 property alias buttonText: actionTextField.buttonText
30 property real expandedHeight: childrenRect.height
28 property real expandedHeight: childrenRect.height
31 property alias messages : messagelistRepeater.model
29 property alias messages : messagelistRepeater.model
30+ property alias replyEnabled: actionTextField.activateEnabled
31+
32+ signal reply(var value)
32
33
33 Item {
34 Item {
34 id: header
35 id: header
@@ -83,10 +84,9 @@ Item {
83
84
84 height: childrenRect.height
85 height: childrenRect.height
85
86
86− Rectangle {
87+ Item {
87 width: messagelist.width
88 width: messagelist.width
88 height: units.gu(5)
89 height: units.gu(5)
89− color: "#333230"
90
90
91 Label {
91 Label {
92 id: __label
92 id: __label
@@ -150,6 +150,11 @@ Item {
150
150
151 anchors.fill: parent
151 anchors.fill: parent
152 anchors.margins: units.gu(1)
152 anchors.margins: units.gu(1)
153+ activateEnabled: replyEnabled
154+
155+ onActivate: {
156+ quickReply.reply(value)
157+ }
153 }
158 }
154
159
155 Indicators.HLine {
160 Indicators.HLine {
plugins/Unity/IndicatorsLegacy/Messaging/qml/SimpleTextMessage.qml → plugins/Unity/Indicators/Messaging/qml/SimpleTextMessage.qmlrenamed+7−4
@@ -20,17 +20,20 @@
20
20
21import QtQuick 2.0
21import QtQuick 2.0
22import Ubuntu.Components 0.1
22import Ubuntu.Components 0.1
23−import "utils.js" as Utils
24
23
25HeroMessage {
24HeroMessage {
26 id: __heroMessage
25 id: __heroMessage
27
26
27+ property string title: ""
28+ property string time: ""
29+ property string message: ""
30+
28 property alias footer: footerLoader.sourceComponent
31 property alias footer: footerLoader.sourceComponent
29
32
30 expandedHeight: fullMessage.y + fullMessage.height + units.gu(2)
33 expandedHeight: fullMessage.y + fullMessage.height + units.gu(2)
31− heroMessageHeader.titleText.text: menu ? menu.label : ""
34+ heroMessageHeader.titleText.text: title
32− heroMessageHeader.subtitleText.text: menu ? Utils.formatDate(menu.extra.canonical_time) : ""
35+ heroMessageHeader.subtitleText.text: time
33− heroMessageHeader.bodyText.text: menu ? menu.extra.canonical_text : ""
36+ heroMessageHeader.bodyText.text: message
34
37
35 Item {
38 Item {
36 id: fullMessage
39 id: fullMessage
plugins/Unity/IndicatorsLegacy/Messaging/qml/SnapDecision.qml → plugins/Unity/Indicators/Messaging/qml/SnapDecision.qmlrenamed+33−14
@@ -20,19 +20,33 @@
20
20
21import QtQuick 2.0
21import QtQuick 2.0
22import Ubuntu.Components 0.1
22import Ubuntu.Components 0.1
23−import Unity.IndicatorsLegacy 0.1 as Indicators
23+import Unity.Indicators 0.1 as Indicators
24import "utils.js" as Utils
24import "utils.js" as Utils
25
25
26HeroMessage {
26HeroMessage {
27 id: snapDecision
27 id: snapDecision
28
28
29+ property string title: ""
30+ property string time: ""
31+ property string message: ""
32+
33+ property bool activateEnabled: true
34+ property alias actionButtonText: actionButton.text
35+
36+ property bool replyEnabled: true
37+ property alias replyMessages: quickreply.messages
38+ property alias replyButtonText: quickreply.buttonText
39+
29 expandedHeight: buttons.y + buttons.height + quickreply.height + units.gu(2)
40 expandedHeight: buttons.y + buttons.height + quickreply.height + units.gu(2)
30− heroMessageHeader.titleText.text: menu ? menu.label : ""
41+ heroMessageHeader.titleText.text: title
31− heroMessageHeader.subtitleText.text: menu ? menu.extra.canonical_text : ""
42+ heroMessageHeader.subtitleText.text: message
32 heroMessageHeader.subtitleText.color: "#e8e1d0"
43 heroMessageHeader.subtitleText.color: "#e8e1d0"
33− heroMessageHeader.bodyText.text: menu ? Utils.formatDate(menu.extra.canonical_time) : ""
44+ heroMessageHeader.bodyText.text: time
34 heroMessageHeader.bodyText.color: "#8f8f88"
45 heroMessageHeader.bodyText.color: "#8f8f88"
35
46
47+ signal activate
48+ signal reply(string value)
49+
36 Item {
50 Item {
37 id: buttons
51 id: buttons
38
52
@@ -62,16 +76,19 @@ HeroMessage {
62 }
76 }
63 }
77 }
64
78
65− ActionButton {
79+ Button {
66− actionGroup: snapDecision.actionGroup
80+ id: actionButton
67− action: actionsDescription[0].name
81+ text: "Call back"
68−
69− text: actionsDescription ? actionsDescription[0].label : "Call back"
70− color: "#c94212"
82+ color: enabled ? "#c94212" : "#bababa"
71 anchors.right: parent.right
83 anchors.right: parent.right
72 anchors.top: parent.top
84 anchors.top: parent.top
73 anchors.bottom: parent.bottom
85 anchors.bottom: parent.bottom
74 width: (parent.width - units.gu(1)) / 2
86 width: (parent.width - units.gu(1)) / 2
87+ enabled: snapDecision.activateEnabled
88+
89+ onClicked: {
90+ snapDecision.activate();
91+ }
75 }
92 }
76
93
77 states: State {
94 states: State {
@@ -95,11 +112,12 @@ HeroMessage {
95 QuickReply {
112 QuickReply {
96 id: quickreply
113 id: quickreply
97
114
115+ onReply: {
98− actionGroup: snapDecision.actionGroup
116+ snapDecision.reply(value);
99− action: actionsDescription[1].name
117+ }
100
118
101− messages: actionsDescription ? actionsDescription[1]["parameter-hint"] : ""
119+ messages: ""
102− buttonText: actionsDescription ? actionsDescription[1].label : "send"
120+ buttonText: "Send"
103 anchors {
121 anchors {
104 top: buttons.bottom
122 top: buttons.bottom
105 topMargin: units.gu(2)
123 topMargin: units.gu(2)
@@ -109,6 +127,7 @@ HeroMessage {
109 height: 0
127 height: 0
110 opacity: 0.0
128 opacity: 0.0
111 enabled: false
129 enabled: false
130+ replyEnabled: snapDecision.replyEnabled
112
131
113 states: State {
132 states: State {
114 name: "expanded"
133 name: "expanded"
plugins/Unity/IndicatorsLegacy/Messaging/qml/TextMessage.qml → plugins/Unity/Indicators/Messaging/qml/TextMessage.qmlrenamed+12−4
@@ -20,16 +20,24 @@
20
20
21import QtQuick 2.0
21import QtQuick 2.0
22import Ubuntu.Components 0.1
22import Ubuntu.Components 0.1
23−import Unity.IndicatorsLegacy 0.1 as Indicators
23+import Unity.Indicators 0.1 as Indicators
24
24
25SimpleTextMessage {
25SimpleTextMessage {
26 id: simpleMessage
26 id: simpleMessage
27
27
28+ property bool replyEnabled: false
29+ property string replyButtonText: "Send"
30+
31+ signal reply(string value)
32+
28 footer: ActionTextField {
33 footer: ActionTextField {
29 anchors.fill: parent
34 anchors.fill: parent
30− actionGroup: simpleMessage.actionGroup
31− action: actionsDescription[0].name
32
35
33− buttonText: actionsDescription ? actionsDescription[0].label : "Send"
36+ activateEnabled: simpleMessage.replyEnabled
37+ buttonText: simpleMessage.replyButtonText
38+
39+ onActivate: {
40+ simpleMessage.reply(value);
41+ }
34 }
42 }
35}
43}
plugins/Unity/IndicatorsLegacy/Messaging/qml/qmldir → plugins/Unity/Indicators/Messaging/qml/qmldirrenamed+2−2
@@ -1,11 +1,11 @@
1−module Unity.IndicatorsLegacy.Messaging
1+module Unity.Indicators.Messaging
2
2
3ActionButton 0.1 ActionButton.qml
3ActionButton 0.1 ActionButton.qml
4ActionTextField 0.1 ActionTextField.qml
4ActionTextField 0.1 ActionTextField.qml
5GroupedMessage 0.1 GroupedMessage.qml
5GroupedMessage 0.1 GroupedMessage.qml
6HeroMessage 0.1 HeroMessage.qml
6HeroMessage 0.1 HeroMessage.qml
7HeroMessageHeader 0.1 HeroMessageHeader.qml
7HeroMessageHeader 0.1 HeroMessageHeader.qml
8−MessageMenuItem 0.1 MessageMenuItem.qml
8+MessageMenuItemFactory 0.1 MessageMenuItemFactory.qml
9QuickReply 0.1 QuickReply.qml
9QuickReply 0.1 QuickReply.qml
10SimpleTextMessage 0.1 SimpleTextMessage.qml
10SimpleTextMessage 0.1 SimpleTextMessage.qml
11SnapDecision 0.1 SnapDecision.qml
11SnapDecision 0.1 SnapDecision.qml
plugins/Unity/IndicatorsLegacy/Messaging/qml/utils.js → plugins/Unity/Indicators/Messaging/qml/utils.jsrenamed

The content is the same.

plugins/Unity/Indicators/plugin.cpp+2
@@ -42,6 +42,8 @@ static QObject* menuModelCacheSingleton(QQmlEngine* engine, QJSEngine* scriptEng
42
42
43void Indicators2Plugin::registerTypes(const char *uri)
43void Indicators2Plugin::registerTypes(const char *uri)
44{
44{
45+ Q_INIT_RESOURCE(indicators);
46+
45 qmlRegisterType<IndicatorsManager>(uri, 0, 1, "IndicatorsManager");
47 qmlRegisterType<IndicatorsManager>(uri, 0, 1, "IndicatorsManager");
46 qmlRegisterType<IndicatorsModel>(uri, 0, 1, "IndicatorsModel");
48 qmlRegisterType<IndicatorsModel>(uri, 0, 1, "IndicatorsModel");
47 qmlRegisterType<MenuContentActivator>(uri, 0, 1, "MenuContentActivator");
49 qmlRegisterType<MenuContentActivator>(uri, 0, 1, "MenuContentActivator");
plugins/Unity/Indicators/qml/BaseMenuItem.qml+1−1
@@ -24,7 +24,7 @@ import Ubuntu.Components.ListItems 0.1 as ListItem
24ListItem.Standard {
24ListItem.Standard {
25 id: baseMenu
25 id: baseMenu
26
26
27− property bool menuActivated: false
27+ property bool menuSelected: false
28
28
29 signal selectMenu()
29 signal selectMenu()
30 signal deselectMenu()
30 signal deselectMenu()
plugins/Unity/Indicators/qml/IndicatorPage.qml+33−6
@@ -60,7 +60,34 @@ IndicatorBase {
60 // Only allow flicking if the content doesn't fit on the page
60 // Only allow flicking if the content doesn't fit on the page
61 interactive: contentHeight > height
61 interactive: contentHeight > height
62
62
63+ property int selectedIndex: -1
64+ property bool blockCurrentIndexChange: false
65+ // for count = 0
66+ onCountChanged: {
67+ if (count == 0 && selectedIndex != -1) {
68+ selectedIndex = -1;
69+ }
70+ }
71+ // for highlight following
72+ onSelectedIndexChanged: {
63− currentIndex: -1
73+ if (currentIndex != selectedIndex) {
74+ var blocked = blockCurrentIndexChange;
75+ blockCurrentIndexChange = true;
76+
77+ currentIndex = selectedIndex;
78+
79+ blockCurrentIndexChange = blocked;
80+ }
81+ }
82+ // for item addition/removal
83+ onCurrentIndexChanged: {
84+ if (!blockCurrentIndexChange) {
85+ if (selectedIndex != -1 && selectedIndex != currentIndex) {
86+ selectedIndex = currentIndex;
87+ }
88+ }
89+ }
90+
64 delegate: Item {
91 delegate: Item {
65 id: menuDelegate
92 id: menuDelegate
66
93
@@ -89,10 +116,10 @@ IndicatorBase {
89 menuStack.push(mainMenu.model.submenu(index));
116 menuStack.push(mainMenu.model.submenu(index));
90 }
117 }
91
118
92− if (item.hasOwnProperty("menuActivated")) {
119+ if (item.hasOwnProperty("menuSelected")) {
93− item.menuActivated = Qt.binding(function() { return ListView.isCurrentItem; });
120+ item.menuSelected = Qt.binding(function() { return mainMenu.selectedIndex == index; });
94− item.selectMenu.connect(function() { ListView.view.currentIndex = index });
121+ item.selectMenu.connect(function() { mainMenu.selectedIndex = index; });
95− item.deselectMenu.connect(function() { ListView.view.currentIndex = -1 });
122+ item.deselectMenu.connect(function() { mainMenu.selectedIndex = -1; });
96 }
123 }
97 if (item.hasOwnProperty("menu")) {
124 if (item.hasOwnProperty("menu")) {
98 item.menu = Qt.binding(function() { return model; });
125 item.menu = Qt.binding(function() { return model; });
@@ -149,7 +176,7 @@ IndicatorBase {
149
176
150 function reset()
177 function reset()
151 {
178 {
152− mainMenu.currentIndex = -1;
179+ mainMenu.selectedIndex = -1;
153 mainMenu.positionViewAtBeginning();
180 mainMenu.positionViewAtBeginning();
154 }
181 }
155}
182}
plugins/Unity/Indicators/qml/MenuItemFactory.qml+62−12
@@ -20,6 +20,7 @@
20import QtQuick 2.0
20import QtQuick 2.0
21import Unity.Indicators 0.1 as Indicators
21import Unity.Indicators 0.1 as Indicators
22import Unity.Indicators.Network 0.1 as ICNetwork
22import Unity.Indicators.Network 0.1 as ICNetwork
23+import Unity.Indicators.Messaging 0.1 as ICMessaging
23import QMenuModel 0.1 as QMenuModel
24import QMenuModel 0.1 as QMenuModel
24
25
25Item {
26Item {
@@ -38,6 +39,9 @@ Item {
38 "com.canonical.indicator.slider" : sliderMenu,
39 "com.canonical.indicator.slider" : sliderMenu,
39 "com.canonical.indicator.switch" : switchMenu,
40 "com.canonical.indicator.switch" : switchMenu,
40
41
42+ "com.canonical.indicator.messages.messageitem" : messageItem,
43+ "com.canonical.indicator.messages.sourceitem" : groupedMessage,
44+
41 "com.canonical.unity.slider" : sliderMenu,
45 "com.canonical.unity.slider" : sliderMenu,
42 "com.canonical.unity.switch" : switchMenu,
46 "com.canonical.unity.switch" : switchMenu,
43
47
@@ -45,15 +49,17 @@ Item {
45 "unity.widgets.systemsettings.tablet.accesspoint" : accessPoint,
49 "unity.widgets.systemsettings.tablet.accesspoint" : accessPoint,
46 }
50 }
47
51
52+ Component { id: divMenu; Indicators.DivMenuItem {} }
53+
48 Component {
54 Component {
49 id: sliderMenu;
55 id: sliderMenu;
50 Indicators.SliderMenuItem {
56 Indicators.SliderMenuItem {
51 property QtObject menu: null
57 property QtObject menu: null
52
58
53 text: menu && menu.label ? menu.label : ""
59 text: menu && menu.label ? menu.label : ""
54− icon: menu ? menu.icon : ""
60+ icon: menu && menu.icon ? menu.icon : ""
55− minIcon: menu.ext.minIcon
61+ minIcon: menu && menu.ext.minIcon ? menu.ext.minIcon : ""
56− maxIcon: menu.ext.maxIcon
62+ maxIcon: menu && menu.ext.maxIcon ? menu.ext.maxIcon : ""
57
63
58 minimumValue: menu.ext.minValue ? menu.ext.minValue : 0.0
64 minimumValue: menu.ext.minValue ? menu.ext.minValue : 0.0
59 maximumValue: {
65 maximumValue: {
@@ -79,8 +85,6 @@ Item {
79 }
85 }
80 }
86 }
81
87
82− Component { id: divMenu; Indicators.DivMenuItem {} }
83−
84 Component {
88 Component {
85 id: buttonMenu;
89 id: buttonMenu;
86 Indicators.ButtonMenuItem {
90 Indicators.ButtonMenuItem {
@@ -89,7 +93,9 @@ Item {
89 text: menu && menu.label ? menu.label : ""
93 text: menu && menu.label ? menu.label : ""
90 enabled: menu ? menu.sensitive : false
94 enabled: menu ? menu.sensitive : false
91
95
96+ onActivate: {
92− onActivate: model.activate(modelIndex);
97+ model.activate(modelIndex);
98+ }
93 }
99 }
94 }
100 }
95 Component {
101 Component {
@@ -118,12 +124,14 @@ Item {
118 property QtObject menu: null
124 property QtObject menu: null
119
125
120 text: menu && menu.label ? menu.label : ""
126 text: menu && menu.label ? menu.label : ""
121− icon: menu ? menu.icon : ""
127+ icon: menu && menu.icon ? menu.icon : ""
122 checkable: menu ? (menu.isCheck || menu.isRadio) : false
128 checkable: menu ? (menu.isCheck || menu.isRadio) : false
123 checked: checkable ? menu.isToggled : false
129 checked: checkable ? menu.isToggled : false
124 enabled: menu ? menu.sensitive : false
130 enabled: menu ? menu.sensitive : false
125
131
132+ onActivate: {
126− onActivate: model.activate(modelIndex);
133+ model.activate(modelIndex);
134+ }
127 }
135 }
128 }
136 }
129
137
@@ -133,11 +141,13 @@ Item {
133 property QtObject menu: null
141 property QtObject menu: null
134
142
135 text: menu && menu.label ? menu.label : ""
143 text: menu && menu.label ? menu.label : ""
136− icon: menu ? menu.icon : ""
144+ icon: menu && menu.icon ? menu.icon : ""
137 checked: menu ? menu.isToggled : false
145 checked: menu ? menu.isToggled : false
138 enabled: menu ? menu.sensitive : false
146 enabled: menu ? menu.sensitive : false
139
147
148+ onActivate: {
140− onActivate: model.activate(modelIndex);
149+ model.activate(modelIndex);
150+ }
141 }
151 }
142 }
152 }
143
153
@@ -161,11 +171,11 @@ Item {
161 property QtObject menu: null
171 property QtObject menu: null
162 property var strengthAction: QMenuModel.UnityMenuAction {
172 property var strengthAction: QMenuModel.UnityMenuAction {
163 model: menuFactory.model ? menuFactory.model : null
173 model: menuFactory.model ? menuFactory.model : null
174+ index: modelIndex
164 name: menu ? menu.ext.xCanonicalWifiApStrengthAction : ""
175 name: menu ? menu.ext.xCanonicalWifiApStrengthAction : ""
165 }
176 }
166
177
167 text: menu && menu.label ? menu.label : ""
178 text: menu && menu.label ? menu.label : ""
168− icon: menu ? menu.icon : ""
169 secure: menu ? menu.ext.xCanonicalWifiApIsSecure : false
179 secure: menu ? menu.ext.xCanonicalWifiApIsSecure : false
170 adHoc: menu ? menu.ext.xCanonicalWifiApIsAdhoc : false
180 adHoc: menu ? menu.ext.xCanonicalWifiApIsAdhoc : false
171 checked: menu ? menu.isToggled : false
181 checked: menu ? menu.isToggled : false
@@ -177,7 +187,47 @@ Item {
177 'x-canonical-wifi-ap-is-secure': 'bool',
187 'x-canonical-wifi-ap-is-secure': 'bool',
178 'x-canonical-wifi-ap-strength-action': 'string'});
188 'x-canonical-wifi-ap-strength-action': 'string'});
179 }
189 }
190+ onActivate: {
180− onActivate: model.activate(modelIndex);
191+ model.activate(modelIndex);
192+ }
193+ }
194+ }
195+
196+ Component {
197+ id: messageItem
198+ ICMessaging.MessageMenuItemFactory {
199+
200+ property QtObject menu: null
201+ model: menuFactory.model ? menuFactory.model : null
202+
203+ Component.onCompleted: {
204+ model.loadExtendedAttributes(modelIndex, {'x-canonical-time': 'int64',
205+ 'x-canonical-text': 'string',
206+ 'x-canonical-message-actions': 'variant',
207+ 'icon': 'icon',
208+ 'x-canonical-app-icon': 'icon'});
209+ }
210+ }
211+ }
212+
213+ Component {
214+ id: groupedMessage
215+ ICMessaging.GroupedMessage {
216+ property QtObject menu: null
217+
218+ title: menu && menu.label ? menu.label : ""
219+ count: menu && menu.actionState[0] ? menu.actionState[0] : "0"
220+ appIcon: menu && menu.ext.icon !== undefined ? menu.ext.icon : "qrc:/indicators/artwork/messaging/default_app.svg"
221+
222+ Component.onCompleted: {
223+ model.loadExtendedAttributes(modelIndex, {'icon': 'icon'});
224+ }
225+ onActivateApp: {
226+ model.activate(modelIndex, true);
227+ }
228+ onDismiss: {
229+ model.activate(modelIndex, false);
230+ }
181 }
231 }
182 }
232 }
183
233
plugins/Unity/IndicatorsLegacy/resources/artwork/messaging/default_app.svg → plugins/Unity/Indicators/resources/artwork/messaging/default_app.svgrenamed

The content is the same.

plugins/Unity/IndicatorsLegacy/resources/artwork/messaging/default_contact.png → plugins/Unity/Indicators/resources/artwork/messaging/default_contact.pngrenamed

Binary file not shown.

plugins/Unity/IndicatorsLegacy/resources/artwork/messaging/message_sms01_54px.png → plugins/Unity/Indicators/resources/artwork/messaging/message_sms01_54px.pngrenamed

Binary file not shown.

plugins/Unity/Indicators/resources/indicators.qrc+3
@@ -1,5 +1,8 @@
1<RCC>
1<RCC>
2 <qresource prefix="/indicators">
2 <qresource prefix="/indicators">
3 <file>artwork/network/secure.svg</file>
3 <file>artwork/network/secure.svg</file>
4+ <file>artwork/messaging/default_contact.png</file>
5+ <file>artwork/messaging/default_app.svg</file>
6+ <file>artwork/messaging/message_sms01_54px.png</file>
4 </qresource>
7 </qresource>
5</RCC>
8</RCC>
plugins/Unity/IndicatorsLegacy/CMakeLists.txt−1
@@ -8,7 +8,6 @@ find_package(Qt5Core REQUIRED)
8find_package(Qt5Quick REQUIRED)
8find_package(Qt5Quick REQUIRED)
9
9
10add_subdirectory(qml)
10add_subdirectory(qml)
11−add_subdirectory(Messaging)
12add_subdirectory(Network)
11add_subdirectory(Network)
13
12
14include_directories(
13include_directories(
plugins/Unity/IndicatorsLegacy/Messaging/qml/CMakeLists.txtdeleted−5
@@ -1,5 +0,0 @@
1−# export_qmlfiles macro
2−include(Plugins)
3−
4−# export the qmldir, *.qml files.
5−export_qmlfiles(Unity.IndicatorsLegacy.Messaging Unity/IndicatorsLegacy/Messaging)
plugins/Unity/IndicatorsLegacy/Messaging/qml/MessageMenuItem.qmldeleted−96
@@ -1,96 +0,0 @@
1−/*
2− * Copyright 2013 Canonical Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU Lesser General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU Lesser General Public License for more details.
12− *
13− * You should have received a copy of the GNU Lesser General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− *
16− * Authors:
17− * Renato Araujo Oliveira Filho <renato@canonical.com>
18− * Olivier Tilloy <olivier.tilloy@canonical.com>
19− */
20−
21−import QtQuick 2.0
22−import Ubuntu.Components 0.1
23−import Unity.IndicatorsLegacy 0.1 as Indicators
24−
25−Indicators.BasicMenuItem {
26− property variant actionsDescription: menu ? menu.extra.canonical_message_actions : undefined
27−
28− onActionGroupChanged: loadItem()
29− onActionsDescriptionChanged: loadItem()
30− implicitHeight: contents.status == Loader.Ready ? contents.item.implicitHeight : 0
31−
32− Loader {
33− id: contents
34−
35− anchors.fill: parent
36− // Binding all properties for the item, to make sure that any change in the
37− // property will be propagated to the contents.item at any time
38− Binding {
39− target: contents.item
40− property: "menuActivated"
41− value: menuActivated
42− when: (contents.status == Loader.Ready)
43− }
44−
45− Binding {
46− target: contents.item
47− property: "actionGroup"
48− value: actionGroup
49− when: (contents.status == Loader.Ready)
50− }
51−
52− Binding {
53− target: contents.item
54− property: "menu"
55− value: menu
56− when: (contents.status == Loader.Ready)
57− }
58−
59− Binding {
60− target: contents.item
61− property: "actionsDescription"
62− value: actionsDescription
63− when: (contents.status == Loader.Ready)
64− }
65−
66− Connections {
67− target: contents.item ? contents.item : null
68− onActivateMenu: activateMenu()
69− onDeactivateMenu: deactivateMenu()
70− }
71− }
72−
73−
74− function loadItem()
75− {
76− var parameterType = ""
77− for (var actIndex in actionsDescription) {
78− var desc = actionsDescription[actIndex];
79− if (desc["parameter-type"] !== undefined) {
80− parameterType += desc["parameter-type"];
81− } else {
82− parameterType += "_";
83− }
84− }
85−
86− if (parameterType === "") {
87− contents.source = "SimpleTextMessage.qml";
88− } else if (parameterType === "s") {
89− contents.source = "TextMessage.qml";
90− } else if (parameterType === "_s") {
91− contents.source = "SnapDecision.qml";
92− } else {
93− console.debug("Unknown paramater type: " + parameterType);
94− }
95− }
96−}
plugins/Unity/IndicatorsLegacy/qml/MenuItemFactory.qml−8
@@ -19,7 +19,6 @@
19
19
20import QtQuick 2.0
20import QtQuick 2.0
21import Unity.IndicatorsLegacy 0.1 as Indicators
21import Unity.IndicatorsLegacy 0.1 as Indicators
22−import Unity.IndicatorsLegacy.Messaging 0.1 as ICMessaging
23import Unity.IndicatorsLegacy.Network 0.1 as ICNetwork
22import Unity.IndicatorsLegacy.Network 0.1 as ICNetwork
24
23
25Item {
24Item {
@@ -47,10 +46,6 @@ Item {
47 "com.canonical.indicator.slider" : sliderMenu,
46 "com.canonical.indicator.slider" : sliderMenu,
48 "com.canonical.indicator.switch" : switchMenu,
47 "com.canonical.indicator.switch" : switchMenu,
49
48
50− "com.canonical.indicator.messages.messageitem" : messageItem,
51− "com.canonical.indicator.messages.snapdecision" : snapDecision,
52− "com.canonical.indicator.messages.sourceitem" : groupedMessage,
53−
54 "unity.widget.systemsettings.tablet.sectiontitle" : wifiSection,
49 "unity.widget.systemsettings.tablet.sectiontitle" : wifiSection,
55 "unity.widgets.systemsettings.tablet.wifisection" : wifiSection,
50 "unity.widgets.systemsettings.tablet.wifisection" : wifiSection,
56 "unity.widgets.systemsettings.tablet.accesspoint" : accessPoint,
51 "unity.widgets.systemsettings.tablet.accesspoint" : accessPoint,
@@ -62,9 +57,6 @@ Item {
62 Component { id: divMenu; Indicators.DivMenuItem {} }
57 Component { id: divMenu; Indicators.DivMenuItem {} }
63 Component { id: sectionMenu; Indicators.SectionMenuItem {} }
58 Component { id: sectionMenu; Indicators.SectionMenuItem {} }
64 Component { id: progressMenu; Indicators.ProgressMenuItem {} }
59 Component { id: progressMenu; Indicators.ProgressMenuItem {} }
65− Component { id: messageItem; ICMessaging.MessageMenuItem {} }
66− Component { id: snapDecision; ICMessaging.SnapDecision {} }
67− Component { id: groupedMessage; ICMessaging.GroupedMessage {} }
68 Component { id: wifiSection; ICNetwork.WifiSection {} }
60 Component { id: wifiSection; ICNetwork.WifiSection {} }
69 Component { id: accessPoint; ICNetwork.AccessPoint {} }
61 Component { id: accessPoint; ICNetwork.AccessPoint {} }
70 Component { id: indicatorMenu; Indicators.MenuItem {} }
62 Component { id: indicatorMenu; Indicators.MenuItem {} }
plugins/Unity/IndicatorsLegacy/resources/indicators.qrc−3
@@ -1,7 +1,4 @@
1<RCC>
1<RCC>
2 <qresource prefix="/indicators">
2 <qresource prefix="/indicators">
3− <file>artwork/messaging/default_contact.png</file>
4− <file>artwork/messaging/default_app.svg</file>
5− <file>artwork/messaging/message_sms01_54px.png</file>
6 </qresource>
3 </qresource>
7</RCC>
4</RCC>
src/Panel/Indicators/CMakeLists.txt−1
@@ -1,2 +1 @@
1add_subdirectory(client)
1add_subdirectory(client)
2−add_subdirectory(servicefiles)
src/Panel/Indicators/servicefiles/CMakeLists.txtdeleted−14
@@ -1,14 +0,0 @@
1−file(GLOB INDICATOR_SERVICE_FILES
2− ${CMAKE_CURRENT_SOURCE_DIR}/com.canonical.indicator.messages
3−)
4−
5−# copy indicators files into build directory for shadow builds
6−add_custom_target(IndicatorsServiceFiles ALL
7− COMMAND mkdir -p ${CMAKE_BINARY_DIR}/share/unity/indicators
8− COMMAND cp ${INDICATOR_SERVICE_FILES} ${CMAKE_BINARY_DIR}/share/unity/indicators
9− DEPENDS ${INDICATOR_SERVICE_FILES}
10−)
11−
12−install(FILES ${INDICATOR_SERVICE_FILES}
13− DESTINATION ${SHELL_APP_DIR}/unity/indicators
14−)
src/Panel/Indicators/servicefiles/com.canonical.indicator.messagesdeleted−10
@@ -1,10 +0,0 @@
1−[Indicator Service]
2−Name=indicator-messages
3−ObjectPath=/com/canonical/indicator/messages
4−Position=50
5−
6−[phone]
7−ObjectPath=/com/canonical/indicator/messages/phone
8−
9−[desktop]
10−ObjectPath=/com/canonical/indicator/messages/menu