on xenial help sign in
s/iconQml/widgetSource & s/pageQml/pageSource. Renamed indicator icons to widgets.
f943e0cNick Dedekind
Panel/IndicatorItem.qml+1−1
@@ -21,7 +21,7 @@ import Unity.Indicators 0.1 as Indicators
21Item {
21Item {
22 id: indicatorItem
22 id: indicatorItem
23
23
24− property alias iconQml: loader.source
24+ property alias widgetSource: loader.source
25 property bool highlighted: false
25 property bool highlighted: false
26 property bool dimmed: false
26 property bool dimmed: false
27 property var indicatorProperties: undefined
27 property var indicatorProperties: undefined
Panel/IndicatorRow.qml+1−1
@@ -60,7 +60,7 @@ Item {
60
60
61 property int ownIndex: index
61 property int ownIndex: index
62
62
63− iconQml: model.iconQml
63+ widgetSource: model.widgetSource
64
64
65 indicatorProperties : model.indicatorProperties
65 indicatorProperties : model.indicatorProperties
66 highlighted: indicatorRow.state == "reveal" || indicatorRow.state == "locked" || indicatorRow.state == "commit" ? ownIndex == indicatorRow.currentItemIndex : false
66 highlighted: indicatorRow.state == "reveal" || indicatorRow.state == "locked" || indicatorRow.state == "commit" ? ownIndex == indicatorRow.currentItemIndex : false
Panel/Indicators/DatetimeIndicatorIcon.qml → Panel/Indicators/DatetimeIndicatorWidget.qmlrenamed

The content is the same.

Panel/Indicators/DefaultIndicatorIcon.qml → Panel/Indicators/DefaultIndicatorWidget.qmlrenamed

The content is the same.

Panel/Indicators/MessagingIndicatorIcon.qml → Panel/Indicators/MessagingIndicatorWidget.qmlrenamed+1−1
@@ -19,7 +19,7 @@
19
19
20import QtQuick 2.0
20import QtQuick 2.0
21
21
22−DefaultIndicatorIcon {
22+DefaultIndicatorWidget {
23 // default the icon so we have something to show when we don't have the bus.
23 // default the icon so we have something to show when we don't have the bus.
24 iconSource: "image://gicon/indicator-messages"
24 iconSource: "image://gicon/indicator-messages"
25}
25}
Panel/Indicators/NetworkIndicatorIcon.qml → Panel/Indicators/NetworkIndicatorWidget.qmlrenamed

The content is the same.

Panel/Indicators/SoundIndicatorIcon.qml → Panel/Indicators/SoundIndicatorWidget.qmlrenamed+1−1
@@ -19,7 +19,7 @@
19
19
20import QtQuick 2.0
20import QtQuick 2.0
21
21
22−DefaultIndicatorIcon {
22+DefaultIndicatorWidget {
23 // default the icon so we have something to show when we don't have the bus.
23 // default the icon so we have something to show when we don't have the bus.
24 iconSource: "image://gicon/audio-volume-high"
24 iconSource: "image://gicon/audio-volume-high"
25}
25}
Panel/Indicators/client/IndicatorsList.qml+1−1
@@ -55,7 +55,7 @@ Page {
55 onClicked: {
55 onClicked: {
56 if (progression) {
56 if (progression) {
57 var page = Qt.createComponent("IndicatorsPage.qml")
57 var page = Qt.createComponent("IndicatorsPage.qml")
58− pages.push(page.createObject(pages), {"indicatorProperties" : model.indicatorProperties, "pageQml" : model.pageQml})
58+ pages.push(page.createObject(pages), {"indicatorProperties" : model.indicatorProperties, "pageSource" : model.pageSource})
59 }
59 }
60 }
60 }
61 }
61 }
Panel/Indicators/client/IndicatorsPage.qml+1−1
@@ -25,7 +25,7 @@ Page {
25
25
26 title: indicatorProperties && indicatorProperties.title ? indicatorProperties.title : ""
26 title: indicatorProperties && indicatorProperties.title ? indicatorProperties.title : ""
27 property variant indicatorProperties
27 property variant indicatorProperties
28− property alias pageQml : page_loader.source
28+ property alias pageSource : page_loader.source
29
29
30 anchors.fill: parent
30 anchors.fill: parent
31
31
Panel/IndicatorsDataModel.qml+10−10
@@ -33,36 +33,36 @@ Indicators.IndicatorsModel {
33 'title': 'Messaging',
33 'title': 'Messaging',
34 'description' : '',
34 'description' : '',
35 'priority': 10,
35 'priority': 10,
36− 'iconQml' : applicationPaths.shellAppDirectory()+'/Panel/Indicators/MessagingIndicatorIcon.qml',
36+ 'widgetSource' : applicationPaths.shellAppDirectory()+'/Panel/Indicators/MessagingIndicatorWidget.qml',
37− 'pageQml' : applicationPaths.shellAppDirectory()+'/Panel/Indicators/MessagingIndicatorPage.qml'
37+ 'pageSource' : applicationPaths.shellAppDirectory()+'/Panel/Indicators/MessagingIndicatorPage.qml'
38 },
38 },
39 'indicator-sound' : {
39 'indicator-sound' : {
40 'title': 'Sound',
40 'title': 'Sound',
41 'description' : '',
41 'description' : '',
42 'priority': 20,
42 'priority': 20,
43− 'iconQml' : applicationPaths.shellAppDirectory()+'/Panel/Indicators/SoundIndicatorIcon.qml',
43+ 'widgetSource' : applicationPaths.shellAppDirectory()+'/Panel/Indicators/SoundIndicatorWidget.qml',
44− 'pageQml' : applicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorPage.qml'
44+ 'pageSource' : applicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorPage.qml'
45 },
45 },
46 'indicator-network' : {
46 'indicator-network' : {
47 'title': 'Networks',
47 'title': 'Networks',
48 'description' : '',
48 'description' : '',
49 'priority': 30,
49 'priority': 30,
50− 'iconQml' : applicationPaths.shellAppDirectory()+'/Panel/Indicators/NetworkIndicatorIcon.qml',
50+ 'widgetSource' : applicationPaths.shellAppDirectory()+'/Panel/Indicators/NetworkIndicatorWidget.qml',
51− 'pageQml' : applicationPaths.shellAppDirectory()+'/Panel/Indicators/NetworkIndicatorPage.qml'
51+ 'pageSource' : applicationPaths.shellAppDirectory()+'/Panel/Indicators/NetworkIndicatorPage.qml'
52 },
52 },
53 'indicator-power' : {
53 'indicator-power' : {
54 'title': 'Battery',
54 'title': 'Battery',
55 'description' : '',
55 'description' : '',
56 'priority': 40,
56 'priority': 40,
57− 'iconQml' : applicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorIcon.qml',
57+ 'widgetSource' : applicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorWidget.qml',
58− 'pageQml' : applicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorPage.qml'
58+ 'pageSource' : applicationPaths.shellAppDirectory()+'/Panel/Indicators/DefaultIndicatorPage.qml'
59 },
59 },
60 'indicator-datetime' : {
60 'indicator-datetime' : {
61 'title': 'Date and Time',
61 'title': 'Date and Time',
62 'description' : '',
62 'description' : '',
63 'priority': 100,
63 'priority': 100,
64− 'iconQml' : applicationPaths.shellAppDirectory()+'/Panel/Indicators/DatetimeIndicatorIcon.qml',
64+ 'widgetSource' : applicationPaths.shellAppDirectory()+'/Panel/Indicators/DatetimeIndicatorWidget.qml',
65− 'pageQml' : applicationPaths.shellAppDirectory()+'/Panel/Indicators/DatetimeIndicatorPage.qml'
65+ 'pageSource' : applicationPaths.shellAppDirectory()+'/Panel/Indicators/DatetimeIndicatorPage.qml'
66 }
66 }
67 }
67 }
68}
68}
Panel/MenuContent.qml+1−1
@@ -94,7 +94,7 @@ Rectangle {
94
94
95 width: menus.width
95 width: menus.width
96 height: menus.height
96 height: menus.height
97− source: pageQml
97+ source: pageSource
98 visible: content.__shown
98 visible: content.__shown
99 onVisibleChanged: {
99 onVisibleChanged: {
100 // Reset the indicator states
100 // Reset the indicator states
Panel/Menus/Overview/OverviewGrid.qml+1−1
@@ -63,7 +63,7 @@ Item {
63
63
64 Loader {
64 Loader {
65 id: loader
65 id: loader
66− source: iconQml
66+ source: widgetSource
67
67
68 onStatusChanged: {
68 onStatusChanged: {
69 item.width = units.gu(5)
69 item.width = units.gu(5)
modules/Unity/Indicators/indicatorsmodel.cpp+7−7
@@ -213,8 +213,8 @@ QHash<int, QByteArray> IndicatorsModel::roleNames() const
213 roles[Priority] = "priority";
213 roles[Priority] = "priority";
214 roles[Title] = "title";
214 roles[Title] = "title";
215 roles[Description] = "description";
215 roles[Description] = "description";
216− roles[IconQml] = "iconQml";
216+ roles[WidgetSource] = "widgetSource";
217− roles[PageQml] = "pageQml";
217+ roles[PageSource] = "pageSource";
218 roles[IndicatorProperties] = "indicatorProperties";
218 roles[IndicatorProperties] = "indicatorProperties";
219 roles[IsValid] = "isValid";
219 roles[IsValid] = "isValid";
220 }
220 }
@@ -238,9 +238,9 @@ QVariant IndicatorsModel::defaultData(Indicator::Ptr plugin, int role)
238 return plugin ? plugin->identifier() : "Unknown";
238 return plugin ? plugin->identifier() : "Unknown";
239 case Description:
239 case Description:
240 return "";
240 return "";
241− case IconQml:
241+ case WidgetSource:
242− return shellAppDirectory()+"/Panel/Indicators/DefaultIndicatorIcon.qml";
242+ return shellAppDirectory()+"/Panel/Indicators/DefaultIndicatorWidget.qml";
243− case PageQml:
243+ case PageSource:
244 return shellAppDirectory()+"/Panel/Indicators/DefaultIndicatorPage.qml";
244 return shellAppDirectory()+"/Panel/Indicators/DefaultIndicatorPage.qml";
245 }
245 }
246 return QVariant();
246 return QVariant();
@@ -273,8 +273,8 @@ QVariant IndicatorsModel::data(const QModelIndex &index, int role) const
273 case Priority:
273 case Priority:
274 case Title:
274 case Title:
275 case Description:
275 case Description:
276− case IconQml:
276+ case WidgetSource:
277− case PageQml:
277+ case PageSource:
278 return indicatorData(plugin, role);
278 return indicatorData(plugin, role);
279 default:
279 default:
280 break;
280 break;
modules/Unity/Indicators/indicatorsmodel.h+2−2
@@ -41,8 +41,8 @@ public:
41 Priority,
41 Priority,
42 Title,
42 Title,
43 Description,
43 Description,
44− IconQml,
44+ WidgetSource,
45− PageQml,
45+ PageSource,
46 IndicatorProperties,
46 IndicatorProperties,
47 IsValid
47 IsValid
48 };
48 };
tests/qmltests/Panel/tst_IndicatorItem.qml+1−1
@@ -60,7 +60,7 @@ Rectangle {
60 init_test()
60 init_test()
61
61
62 compare(indicatorItem.visible, false, "IndicatorItem should not be visible.")
62 compare(indicatorItem.visible, false, "IndicatorItem should not be visible.")
63− indicatorItem.iconQml = "qrc:/tests/indciatorsclient/qml/fake_menu_icon1.qml";
63+ indicatorItem.widgetSource = "qrc:/tests/indciatorsclient/qml/fake_menu_widget1.qml";
64 tryCompare(indicatorItem, "visible", true)
64 tryCompare(indicatorItem, "visible", true)
65 }
65 }
66 }
66 }
tests/qmltests/Panel/tst_Overview.qml+4−4
@@ -48,9 +48,9 @@ Rectangle {
48
48
49 ListModel {
49 ListModel {
50 id: mockModel
50 id: mockModel
51− ListElement {title: "fake1"; iconQml: "qrc:/tests/indciatorsclient/qml/fake_menu_icon1.qml"; indicatorProperties: ""}
51+ ListElement {title: "fake1"; widgetSource: "qrc:/tests/indciatorsclient/qml/fake_menu_widget1.qml"; indicatorProperties: ""}
52− ListElement {title: "fake2"; iconQml: "qrc:/tests/indciatorsclient/qml/fake_menu_icon2.qml"; indicatorProperties: ""}
52+ ListElement {title: "fake2"; widgetSource: "qrc:/tests/indciatorsclient/qml/fake_menu_widget2.qml"; indicatorProperties: ""}
53− ListElement {title: "fake3"; iconQml: "qrc:/tests/indciatorsclient/qml/fake_menu_icon3.qml"; indicatorProperties: ""}
53+ ListElement {title: "fake3"; widgetSource: "qrc:/tests/indciatorsclient/qml/fake_menu_widget3.qml"; indicatorProperties: ""}
54 }
54 }
55
55
56 ListModel {
56 ListModel {
@@ -99,7 +99,7 @@ Rectangle {
99 button = findChild(overview, "overviewGridButton3");
99 button = findChild(overview, "overviewGridButton3");
100 compare(button, undefined, "There should only be 3 buttons... found at least 4...");
100 compare(button, undefined, "There should only be 3 buttons... found at least 4...");
101
101
102− mockModel2.append({title: "humppa", iconQml: "qrc:/tests/indciatorsclient/qml/fake_menu_icon4.qml", indicatorProperties: ""})
102+ mockModel2.append({title: "humppa", widgetSource: "qrc:/tests/indciatorsclient/qml/fake_menu_widget4.qml", indicatorProperties: ""})
103 overviewGrid.forceLayout();
103 overviewGrid.forceLayout();
104 waitForRendering(overviewGrid);
104 waitForRendering(overviewGrid);
105
105
tests/qmltests/modules/Unity/Indicators/IndicatorsModel.qml+10−10
@@ -27,8 +27,8 @@ ListModel {
27 priority: 0
27 priority: 0
28 title: "Menu1";
28 title: "Menu1";
29 description: "";
29 description: "";
30− iconQml: "qrc:/tests/indciators/qml/fake_menu_icon1.qml";
30+ widgetSource: "qrc:/tests/indciators/qml/fake_menu_widget1.qml";
31− pageQml: "qrc:/tests/indciators/qml/fake_menu_page1.qml";
31+ pageSource: "qrc:/tests/indciators/qml/fake_menu_page1.qml";
32 indicatorProperties: "";
32 indicatorProperties: "";
33 isValid: "";
33 isValid: "";
34 }
34 }
@@ -37,8 +37,8 @@ ListModel {
37 priority: 1
37 priority: 1
38 title: "Menu2";
38 title: "Menu2";
39 description: "";
39 description: "";
40− iconQml: "qrc:/tests/indciators/qml/fake_menu_icon2.qml";
40+ widgetSource: "qrc:/tests/indciators/qml/fake_menu_widget2.qml";
41− pageQml: "qrc:/tests/indciators/qml/fake_menu_page2.qml";
41+ pageSource: "qrc:/tests/indciators/qml/fake_menu_page2.qml";
42 indicatorProperties: "";
42 indicatorProperties: "";
43 isValid: "";
43 isValid: "";
44 }
44 }
@@ -47,8 +47,8 @@ ListModel {
47 priority: 2
47 priority: 2
48 title: "Menu3";
48 title: "Menu3";
49 description: "";
49 description: "";
50− iconQml: "qrc:/tests/indciators/qml/fake_menu_icon3.qml";
50+ widgetSource: "qrc:/tests/indciators/qml/fake_menu_widget3.qml";
51− pageQml: "qrc:/tests/indciators/qml/fake_menu_page3.qml";
51+ pageSource: "qrc:/tests/indciators/qml/fake_menu_page3.qml";
52 indicatorProperties: "";
52 indicatorProperties: "";
53 isValid: "";
53 isValid: "";
54 }
54 }
@@ -57,8 +57,8 @@ ListModel {
57 priority: 3
57 priority: 3
58 title: "Menu4";
58 title: "Menu4";
59 description: "";
59 description: "";
60− iconQml: "qrc:/tests/indciators/qml/fake_menu_icon4.qml";
60+ widgetSource: "qrc:/tests/indciators/qml/fake_menu_widget4.qml";
61− pageQml: "qrc:/tests/indciators/qml/fake_menu_page4.qml";
61+ pageSource: "qrc:/tests/indciators/qml/fake_menu_page4.qml";
62 indicatorProperties: "";
62 indicatorProperties: "";
63 isValid: "";
63 isValid: "";
64 }
64 }
@@ -67,8 +67,8 @@ ListModel {
67 priority: 4
67 priority: 4
68 title: "Menu5";
68 title: "Menu5";
69 description: "";
69 description: "";
70− iconQml: "qrc:/tests/indciators/qml/fake_menu_icon5.qml";
70+ widgetSource: "qrc:/tests/indciators/qml/fake_menu_widget5.qml";
71− pageQml: "qrc:/tests/indciators/qml/fake_menu_page5.qml";
71+ pageSource: "qrc:/tests/indciators/qml/fake_menu_page5.qml";
72 indicatorProperties: "";
72 indicatorProperties: "";
73 isValid: "";
73 isValid: "";
74 }
74 }
tests/qmltests/modules/Unity/Indicators/indicators_fake.qrc+5−5
@@ -1,10 +1,10 @@
1<RCC>
1<RCC>
2 <qresource prefix="/tests/indciators">
2 <qresource prefix="/tests/indciators">
3− <file>qml/fake_menu_icon1.qml</file>
3+ <file>qml/fake_menu_widget1.qml</file>
4− <file>qml/fake_menu_icon2.qml</file>
4+ <file>qml/fake_menu_widget2.qml</file>
5− <file>qml/fake_menu_icon3.qml</file>
5+ <file>qml/fake_menu_widget3.qml</file>
6− <file>qml/fake_menu_icon4.qml</file>
6+ <file>qml/fake_menu_widget4.qml</file>
7− <file>qml/fake_menu_icon5.qml</file>
7+ <file>qml/fake_menu_widget5.qml</file>
8 <file>qml/fake_menu_page1.qml</file>
8 <file>qml/fake_menu_page1.qml</file>
9 <file>qml/fake_menu_page2.qml</file>
9 <file>qml/fake_menu_page2.qml</file>
10 <file>qml/fake_menu_page3.qml</file>
10 <file>qml/fake_menu_page3.qml</file>
tests/qmltests/modules/Unity/Indicators/qml/fake_menu_icon1.qml → tests/qmltests/modules/Unity/Indicators/qml/fake_menu_widget1.qmlrenamed

The content is the same.

tests/qmltests/modules/Unity/Indicators/qml/fake_menu_icon2.qml → tests/qmltests/modules/Unity/Indicators/qml/fake_menu_widget2.qmlrenamed

The content is the same.

tests/qmltests/modules/Unity/Indicators/qml/fake_menu_icon3.qml → tests/qmltests/modules/Unity/Indicators/qml/fake_menu_widget3.qmlrenamed

The content is the same.

tests/qmltests/modules/Unity/Indicators/qml/fake_menu_icon4.qml → tests/qmltests/modules/Unity/Indicators/qml/fake_menu_widget4.qmlrenamed

The content is the same.

tests/qmltests/modules/Unity/Indicators/qml/fake_menu_icon5.qml → tests/qmltests/modules/Unity/Indicators/qml/fake_menu_widget5.qmlrenamed

The content is the same.