diff --git a/applets/activities/contents/ui/main.qml b/applets/activities/contents/ui/main.qml index e5ac9a0d..469e6b1b 100644 --- a/applets/activities/contents/ui/main.qml +++ b/applets/activities/contents/ui/main.qml @@ -24,6 +24,32 @@ import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.activities 0.1 as Activities ColumnLayout { + PlasmaComponents.ToolButton { + Layout.fillWidth: true + text: i18n("New Activity...") + onClicked: { + newEdit.visible = true; + newEdit.forceActiveFocus(); + } + PlasmaComponents.TextField { + id: newEdit + visible: false + width: parent.width + onFocusChanged: { + if (!focus) { + visible = false + } + } + onAccepted: { + if (text != "") { + activityModel.addActivity(text, function(id) { + visible = false; + activityModel.setCurrentActivity(id, function() {}); + }); + } + } + } + } ListView { id: listView Layout.fillWidth: true @@ -107,31 +133,4 @@ ColumnLayout { } } } - PlasmaComponents.ToolButton { - Layout.fillWidth: true - text: i18n("New Activity...") - onClicked: { - newEdit.visible = true; - newEdit.forceActiveFocus(); - } - PlasmaComponents.TextField { - id: newEdit - visible: false - width: parent.width - onFocusChanged: { - if (!focus) { - visible = false - } - } - onAccepted: { - if (text != "") { - activityModel.addActivity(text, function(id) { - visible = false; - print("AAA"+id) - activityModel.setCurrentActivity(id, function() {}); - }); - } - } - } - } }