summaryrefslogtreecommitdiff
path: root/main.qml
diff options
context:
space:
mode:
Diffstat (limited to 'main.qml')
-rw-r--r--main.qml20
1 files changed, 11 insertions, 9 deletions
diff --git a/main.qml b/main.qml
index e1052fd..9623c04 100644
--- a/main.qml
+++ b/main.qml
@@ -27,18 +27,20 @@ ApplicationWindow {
id: channel_tabs
objectName: "channel_tabs"
TabButton {
- text: "a"
+ objectName: "channel-status"
+ text: "status"
}
- function add_channel(channel){
+ function add_channel(channel) {
var newTab = tabButton.createObject(channel_tabs, {"text": channel})
- channel_tabs.addItem(newTab)
- var newChannel = Qt.createComponent("Page1.qml").createObject(swipeView, {"objectName": "channel"+channel})
-
+ channel_tabs.insertItem(channel_tabs.count, newTab)
+ var newChannel = Qt.createComponent("IrcChannel.qml").createObject(swipeView, {"objectName": "channel-"+channel})
+ channel_tabs.currentIndex = channel_tabs.count-1
+ for (var i = 0; i < newChannel.children.length; ++i) {
+ if (newChannel.children[i].objectName === "input") {
+ newChannel.children[i].focus = true
+ }
+ }
}
-
-
-
}
-
}