@@ -1,7 +1,7 @@
11import QtQuick 2.4
22import Ubuntu.Components 1.3
33import Ubuntu.Components.Popups 1.3
4−import Unity.Screens 0.1
4+import WindowManager 1.0
55import Unity.Application 0.1
66import ".."
77
@@ -91,7 +91,10 @@ Item {
9191 actions: ActionList {
9292 Action {
9393 text: "Add workspace"
94− onTriggered: workspaces.workspaceModel.append({text: "" + (workspaces.workspaceModel.count + 1)})
94+ onTriggered: {
95+ var workspace = WorkspaceManager.createWorkspace();
96+ workspaces.workspaceModel.append(workspace);
97+ }
9598 }
9699 }
97100 }
@@ -110,18 +113,7 @@ Item {
110113 screen: model.screen
111114 background: root.background
112115
113− workspaceModel: ListModel {
114− onCountChanged: print("model count changed to", count)
115− ListElement {text: "1"}
116− ListElement {text: "2"}
117− ListElement {text: "3"}
118− ListElement {text: "4"}
119− ListElement {text: "5"}
120− ListElement {text: "6"}
121−// ListElement {text: "7"}
122−// ListElement {text: "8"}
123−// ListElement {text: "9"}
124− }
116+ workspaceModel: model.screen.workspaces
125117 }
126118 }
127119 }