on xenial help sign in
Moved [Message]MenuItemFacotory from Unity.Indicators plugin to qml folder.
commitc0edd753b08606987f3c71b5adc4060b5536533f authorNick Dedekind <nicholas.dedekind@gmail.com> dateThu 3 Jul 2014, 14:46 (12 years ago) parent6ce91e052f87fe
17 files changed+14−99
plugins/Unity/Indicators/CMakeLists.txt+1−4 plugins/Unity/Indicators/qml/CachedUnityMenuModel.qml → plugins/Unity/Indicators/CachedUnityMenuModel.qml plugins/Unity/Indicators/qml/qmldir → plugins/Unity/Indicators/qmldir−4 qml/Panel/Indicators/DefaultIndicatorPage.qml+2−2 qml/Panel/Indicators/DefaultIndicatorWidget.qml+1−2 plugins/Unity/Indicators/qml/IndicatorBase.qml → qml/Panel/Indicators/IndicatorBase.qml+2−3 qml/Panel/Indicators/IndicatorDelegate.qml+1−2 plugins/Unity/Indicators/qml/MenuItemFactory.qml → qml/Panel/Indicators/MenuItemFactory.qml plugins/Unity/Indicators/qml/MessageMenuItemFactory.qml → qml/Panel/Indicators/MessageMenuItemFactory.qml plugins/Unity/Indicators/qml/RemoveBackground.qml → qml/Panel/Indicators/RemoveBackground.qml tests/mocks/Unity/Indicators/IndicatorBase.qml−38 tests/mocks/Unity/Indicators/MenuItemFactory.qml−38 tests/mocks/Unity/Indicators/qmldir−2 tests/qmltests/Panel/Indicators/tst_DefaultIndicatorPage.qml+1 tests/qmltests/Panel/Indicators/tst_DefaultIndicatorWidget.qml+1 tests/qmltests/Panel/Indicators/tst_MenuItemFactory.qml+3−2 tests/qmltests/Panel/Indicators/tst_MessageMenuItemFactory.qml+2−2
plugins/Unity/Indicators/CMakeLists.txt+1−4
@@ -51,7 +51,4 @@ target_link_libraries(IndicatorsQml
5151
5252qt5_use_modules(IndicatorsQml Core Qml Quick)
5353
54−add_unity8_plugin(Unity.Indicators 0.1 Unity/Indicators
55− SEARCH_PATH qml
56− TARGETS IndicatorsQml
57−)
54+add_unity8_plugin(Unity.Indicators 0.1 Unity/Indicators TARGETS IndicatorsQml)
plugins/Unity/Indicators/qml/CachedUnityMenuModel.qml → plugins/Unity/Indicators/CachedUnityMenuModel.qmlrenamed

The content is the same.

plugins/Unity/Indicators/qml/qmldir → plugins/Unity/Indicators/qmldirrenamed−4
@@ -4,7 +4,3 @@ typeinfo Indicators.qmltypes
44
55CachedUnityMenuModel 0.1 CachedUnityMenuModel.qml
66IndicatorBase 0.1 IndicatorBase.qml
7−MenuItemFactory 0.1 MenuItemFactory.qml
8−MessageMenuItemFactory 0.1 MessageMenuItemFactory.qml
9−
10−internal RemoveBackground RemoveBackground.qml
qml/Panel/Indicators/DefaultIndicatorPage.qml+2−2
@@ -22,7 +22,7 @@ import QtQuick 2.0
2222import Ubuntu.Components 0.1 as Components
2323import Unity.Indicators 0.1 as Indicators
2424
25−Indicators.IndicatorBase {
25+IndicatorBase {
2626 id: main
2727
2828 //const
@@ -174,7 +174,7 @@ Indicators.IndicatorBase {
174174 }
175175 }
176176
177− Indicators.MenuItemFactory {
177+ MenuItemFactory {
178178 id: factory
179179 menuModel: mainMenu.model ? mainMenu.model : null
180180 }
qml/Panel/Indicators/DefaultIndicatorWidget.qml+1−2
@@ -20,9 +20,8 @@
2020import QtQuick 2.0
2121import Ubuntu.Components 0.1
2222import Ubuntu.Settings.Components 0.1
23−import Unity.Indicators 0.1 as Indicators
2423
25−Indicators.IndicatorBase {
24+IndicatorBase {
2625 id: indicatorWidget
2726
2827 property int iconSize: units.gu(2)
plugins/Unity/Indicators/qml/IndicatorBase.qml → qml/Panel/Indicators/IndicatorBase.qmlrenamed+2−3
@@ -18,8 +18,7 @@
1818 */
1919
2020import QtQuick 2.0
21−import QMenuModel 0.1 as QMenuModel
22−import Unity.Indicators 0.1 as Indicators
21+import Unity.Indicators 0.1
2322
2423Item {
2524 id: indicatorItem
@@ -43,7 +42,7 @@ Item {
4342 menuObjectPath: indicatorItem.deviceMenuObjectPath
4443 }
4544
46− property var rootActionState: Indicators.RootActionState {
45+ property RootActionState rootActionState: RootActionState {
4746 menu: menuModel
4847 onUpdated: indicatorItem.rootActionStateChanged()
4948 }
qml/Panel/Indicators/IndicatorDelegate.qml+1−2
@@ -18,9 +18,8 @@
1818 */
1919
2020import QtQuick 2.0
21−import Unity.Indicators 0.1 as Indicators
2221
23−Indicators.IndicatorBase {
22+IndicatorBase {
2423 enabled: false
2524
2625 onRootActionStateChanged: {
plugins/Unity/Indicators/qml/MenuItemFactory.qml → qml/Panel/Indicators/MenuItemFactory.qmlrenamed

The content is the same.

plugins/Unity/Indicators/qml/MessageMenuItemFactory.qml → qml/Panel/Indicators/MessageMenuItemFactory.qmlrenamed

The content is the same.

plugins/Unity/Indicators/qml/RemoveBackground.qml → qml/Panel/Indicators/RemoveBackground.qmlrenamed

The content is the same.

tests/mocks/Unity/Indicators/IndicatorBase.qmldeleted−38
@@ -1,38 +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− * Nick Dedekind <nick.dedekind@canonical.com>
18− */
19−
20−import QtQuick 2.0
21−import QMenuModel 0.1
22−
23−Item {
24− id: indicatorBase
25−
26− //const
27− property string busName
28− property string actionsObjectPath
29− property string menuObjectPath
30− property string rootMenuType: "com.canonical.indicator.root"
31− property string deviceMenuObjectPath: menuObjectPath
32−
33− property var menuModel: UnityMenuModel {}
34−
35− property RootActionState rootActionState: RootActionState {
36− onUpdated: indicatorBase.rootActionStateChanged()
37− }
38−}
tests/mocks/Unity/Indicators/MenuItemFactory.qmldeleted−38
@@ -1,38 +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− * Nick Dedekind <nick.dedekind@canonical.com>
18− */
19−
20−import QtQuick 2.0
21−import Ubuntu.Components.ListItems 0.1 as ListItem
22−
23−Item {
24− id: menuFactory
25−
26− property var menuModel: null
27−
28− Component {
29− id: standardMenu;
30− ListItem.Standard {
31− objectName: "standardMenu"
32− }
33− }
34−
35− function load(modelData) {
36− return standardMenu;
37− }
38−}
tests/mocks/Unity/Indicators/qmldir−2
@@ -3,8 +3,6 @@ plugin IndicatorsFakeQml
33typeinfo Indicators.qmltypes
44
55CachedUnityMenuModel 0.1 CachedUnityMenuModel.qml
6−IndicatorBase 0.1 IndicatorBase.qml
76IndicatorsModel 0.1 IndicatorsModel.qml
87FakeMenuPage 0.1 FakeMenuPage.qml
9−MenuItemFactory 0.1 MenuItemFactory.qml
108RootActionState 0.1 RootActionState.qml
tests/qmltests/Panel/Indicators/tst_DefaultIndicatorPage.qml+1
@@ -31,6 +31,7 @@ Item {
3131 anchors.fill: parent
3232 contentActive: true
3333
34+ menuModel: UnityMenuModel {}
3435 busName: "test"
3536 actionsObjectPath: "test"
3637 menuObjectPath: "test"
tests/qmltests/Panel/Indicators/tst_DefaultIndicatorWidget.qml+1
@@ -33,6 +33,7 @@ Item {
3333 top: parent.top
3434 }
3535
36+ menuModel: UnityMenuModel {}
3637 busName: "test"
3738 actionsObjectPath: "test"
3839 deviceMenuObjectPath: "test"
tests/qmltests/Panel/Indicators/tst_MenuItemFactory.qml+3−2
@@ -18,15 +18,16 @@ import QtQuick 2.0
1818import QtTest 1.0
1919import Unity.Test 0.1 as UT
2020import QMenuModel 0.1
21−import Unity.Indicators 0.1 as Indicators
2221import Utils 0.1 as Utils
22+import "../../../../qml/Panel/Indicators"
23+
2324
2425Item {
2526 id: testView
2627 width: units.gu(40)
2728 height: units.gu(70)
2829
29− Indicators.MenuItemFactory {
30+ MenuItemFactory {
3031 id: factory
3132 menuModel: UnityMenuModel {}
3233 }
tests/qmltests/Panel/Indicators/tst_MessageMenuItemFactory.qml+2−2
@@ -18,15 +18,15 @@ import QtQuick 2.0
1818import QtTest 1.0
1919import Unity.Test 0.1 as UT
2020import QMenuModel 0.1
21−import Unity.Indicators 0.1 as Indicators
2221import Utils 0.1 as Utils
22+import "../../../../qml/Panel/Indicators"
2323
2424Item {
2525 id: testView
2626 width: units.gu(40)
2727 height: units.gu(70)
2828
29− Indicators.MessageMenuItemFactory {
29+ MessageMenuItemFactory {
3030 id: factory
3131 menuModel: UnityMenuModel {}
3232 menuIndex: 0